From 618644d41f210de940bef099b2571f145e1f8232 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 20 Jul 2020 16:48:48 +0200 Subject: [PATCH 1/2] Added GUI buttons to display Pruefungsprotokolle of certain time period Possible time periods: today / last week / all Signed-off-by: Cris --- .../lehre/pruefungsprotokollUebersicht.php | 20 ++++ system/phrasesupdate.php | 100 ++++++++++++++++++ 2 files changed, 120 insertions(+) diff --git a/application/views/lehre/pruefungsprotokollUebersicht.php b/application/views/lehre/pruefungsprotokollUebersicht.php index d14ec670a..35bea7963 100644 --- a/application/views/lehre/pruefungsprotokollUebersicht.php +++ b/application/views/lehre/pruefungsprotokollUebersicht.php @@ -15,6 +15,10 @@ 'phrases' => array( 'ui' => array( 'keineDatenVorhanden', + 'heute', + 'letzteWoche', + 'alle', + 'zeitraum' ) ), 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css'), @@ -34,6 +38,22 @@ p->t('abschlusspruefung','einfuehrungstext'); ?> +

+
+
+
+ +
+ + + +
+
+
+
load->view('lehre/pruefungsprotokollUebersichtData.php'); ?> diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index c2afb39c8..14d9f4f31 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -7868,6 +7868,106 @@ Any unusual occurrences 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'alle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Alle', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'All', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'heute', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Heute', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Today', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'letzteWoche', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Letzte Woche', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Last week', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'gestern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Gestern', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Yesterday', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'zeitraum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zeitraum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Period', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) ); From 82c8ca7f80a279159420cc0111def0943072a5ad Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 20 Jul 2020 16:50:29 +0200 Subject: [PATCH 2/2] Adapted logic to display Pruefungsprotokolle of certain time period Signed-off-by: Cris --- application/controllers/lehre/Pruefungsprotokoll.php | 9 ++++++++- .../views/lehre/pruefungsprotokollUebersichtData.php | 9 +++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) 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 ";