public function showNotes($sessionId = null, $examenId = null)
 {
     $note_Examens = Note_Examen::whereIdSessionAndIdExamen($sessionId, $examenId)->join('Etudiant', 'Etudiant.id_Etudiant', '=', 'Note_Examen.id_Etudiant')->get();
     return view('noteExamenViewPublic')->with('note_Examens', $note_Examens)->with('sessionId', $sessionId)->with('examenId', $examenId);
 }
Example #2
0
     Route::match(['get', 'post'], '/', 'InscritController@index');
     Route::post('/add', 'InscritController@store');
     Route::post('/rech', 'InscritController@create');
 });
 //Resultat groupe
 Route::group(['prefix' => '/{examen_id}/resultat', 'before' => 'examenId'], function () {
     // dipslay the hole notes
     Route::match(['get', 'post'], '/', 'ExamenNoteController@show');
     // display the student's exame note
     Route::match(['get', 'post'], '/{examen_note_id}', 'ExamenNoteController@show')->where('examen_note_id', '[0-9]+');
     // test if the a student with specified id not found
     Route::filter('examenNoteId', function (Illuminate\Routing\Route $route) {
         if (is_null($route->getParameter('examen_note_id'))) {
             return Redirect::to('session/' . $route->getParameter('session_id') . '/examen/' . $route->getParameter('examen_id') . '/resultat');
         } else {
             if (is_null(Note_Examen::find($route->getParameter('examen_note_id')))) {
                 return Response::json(['error' => 'reusltat not found'], HttpResponse::HTTP_NOT_FOUND);
             }
         }
     });
     // station note group
     Route::group(['prefix' => '/{examen_note_id}/station', 'before' => 'examenNoteId'], function () {
         // display all station notes
         Route::match(['get', 'post'], '/', 'StationNoteController@show');
         // display specific banque item
         Route::match(['get', 'post'], '/{station_note_id}', 'StationNoteController@show')->where('station_note_id', '[0-9]+');
         // test if the a note exam with specified id not found
         Route::filter('stationNoteId', function (Illuminate\Routing\Route $route) {
             if (is_null($route->getParameter('station_note_id'))) {
                 return Redirect::to('session/' . $route->getParameter('session_id') . '/examan/' . $route->getParameter('examen_id') . '/resultat/' . $route->getParameter('examen_note_id') . '/station');
                 if (is_null(Note_Station::find($route->getParameter('station_note_id')))) {
Example #3
0
 function getExamenNote($examenNoteId)
 {
     return Note_Examen::find($examenNoteId);
 }