예제 #1
0
 /**
  * GET
  * Add grade and feedback for an exam
  */
 public function addGrade($courseName, $studentId)
 {
     $student = User::find($studentId);
     $course = Course::where('name', $courseName)->first();
     $exams = $course->exams()->with('sprint')->get();
     return view('teacher/add_grade', ['student' => $student, 'exams' => $exams, 'course' => $course]);
 }
예제 #2
0
 public function __construct()
 {
     $this->middleware('auth');
     $this->userId = Auth::user()->id;
     $this->navbbs = DB::table('building_block_student')->join('building_blocks', 'building_blocks.id', '=', 'building_block_student.building_block_id')->where('building_block_student.user_id', $this->userId)->get();
     $this->currentCourse = Course::where('start_date', '<=', Carbon::now()->toDateString())->where('end_date', '>=', Carbon::now()->toDateString())->first();
 }