Example #1
0
 function room($roomId)
 {
     $data['system'] = $this->system;
     $room = Classroom::findOrFail($roomId);
     $data['room_id'] = $roomId;
     $data['room_name'] = $room->legacycode;
     $data['location'] = $room->location;
     $data['days'] = Day::where('id', '!=', 8)->get();
     $data['times'] = Time::all();
     $schedCollection = new SchedCollection();
     $data['table_day'] = $schedCollection->getSchedRoom($roomId, $this->system);
     return view('edp.room_sched', $data);
 }
Example #2
0
 public function show($id)
 {
     $inst = Party::find($id);
     if ($inst instanceof ModelNotFoundException) {
         return view('errors.404');
     }
     $data['instructor'] = $inst;
     $data['classes'] = Classallocation::where('academicterm', $this->system->phaseterm)->where('instructor', $id);
     $data['days'] = Day::where('id', '!=', 8)->get();
     $data['times'] = Time::all();
     $schedCollection = new SchedCollection();
     $data['table_day'] = $schedCollection->getSchedInstructor($id, $this->system);
     return view('instructor.sched', $data);
 }
Example #3
0
 function add_day_period(Request $request, $id)
 {
     if ($request->has('day')) {
         $valid = $this->assign($request);
         if ($valid) {
             return redirect('add_day_period/' . $id);
         }
     } elseif ($request->has('submit')) {
         $this->error = htmlAlert('Please select a day');
     }
     $data['cid'] = $id;
     $data['error'] = $this->error;
     $data['cl'] = Classallocation::find($id);
     $data['days'] = Day::where('id', '!=', 8)->get();
     $data['times'] = Time::where('id', '!=', 12)->get();
     return view('dean.assigned_subj', $data);
 }