Esempio n. 1
0
 public function edit($epreuve_id)
 {
     if (!Test::exists($epreuve_id)) {
         return redirect('/');
     }
     if (!Test::isTutorTest(User::id(), $epreuve_id)) {
         return redirect('/');
     }
     return view('tuteur.modifier_correction')->with(['first_name' => User::firstName(), 'last_name' => User::lastName(), 'corrections' => Test::getCorrection($epreuve_id), 'baremes' => General::getBaremes(), 'epreuve_id' => $epreuve_id, 'obsolete' => Test::isRankingObsolete($epreuve_id)]);
 }
Esempio n. 2
0
 public function show($id)
 {
     //controle que l'épreuve existe
     if (!Test::exists($id)) {
         return redirect('/');
     }
     //contrôle que l'épreuve est visible
     if (!Test::isVisible($id)) {
         return redirect('/');
     }
     //demande si l'épreuve est corrigée
     $is_corrected = Test::isCorrected($id);
     //appelle la vue
     return view('etudiant.epreuve')->with(['nb_results_not_read' => User::nbResultsNotRead(), 'first_name' => User::firstName(), 'last_name' => User::lastName(), 'test' => $is_corrected ? User::getTestWithMark($id) : User::getTestWithoutMark($id), 'is_corrected' => $is_corrected, 'qcms' => User::getGrid($id)]);
 }