diff --git a/application/controllers/lehre/Pruefungsprotokoll.php b/application/controllers/lehre/Pruefungsprotokoll.php index 594d3a9e1..d9793ef06 100644 --- a/application/controllers/lehre/Pruefungsprotokoll.php +++ b/application/controllers/lehre/Pruefungsprotokoll.php @@ -51,7 +51,14 @@ class Pruefungsprotokoll extends Auth_Controller public function index() { $this->load->library('WidgetLib'); - $this->load->view('lehre/pruefungsprotokollUebersicht.php'); + + // Protokolle anzeigen seit heute / letzte Woche / alle + $period = $this->input->post('period'); + $period = (!is_null($period)) ? $period : 'today'; + + $data = array('period' => $period); + + $this->load->view('lehre/pruefungsprotokollUebersicht.php', $data); } /** diff --git a/application/views/lehre/pruefungsprotokollUebersichtData.php b/application/views/lehre/pruefungsprotokollUebersichtData.php index d7bf3c9d0..dd247c2eb 100644 --- a/application/views/lehre/pruefungsprotokollUebersichtData.php +++ b/application/views/lehre/pruefungsprotokollUebersichtData.php @@ -1,5 +1,6 @@ ='2020-05-27' + AND ( + '". $PERIOD. "' = 'today' AND datum = NOW()::date OR + '". $PERIOD. "' = 'lastWeek' AND datum = (NOW() - interval '1 week')::date OR + '". $PERIOD. "' = 'all' AND datum >= '2020-05-27' + ) ORDER BY datum, nachname, vorname ";