From e5a6af7eb3e50ea9124fe38261450ad3c65da76a Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Fri, 18 Jun 2021 09:16:02 +0200 Subject: [PATCH 1/4] first guess adding filter for upcoming exams --- .../lehre/pruefungsprotokollUebersicht.php | 2 ++ .../pruefungsprotokollUebersichtData.php | 1 + system/phrasesupdate.php | 20 +++++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/application/views/lehre/pruefungsprotokollUebersicht.php b/application/views/lehre/pruefungsprotokollUebersicht.php index 35bea7963..2416b30bd 100644 --- a/application/views/lehre/pruefungsprotokollUebersicht.php +++ b/application/views/lehre/pruefungsprotokollUebersicht.php @@ -48,6 +48,8 @@ name="period" value="today">p->t('ui','heute'); ?> + diff --git a/application/views/lehre/pruefungsprotokollUebersichtData.php b/application/views/lehre/pruefungsprotokollUebersichtData.php index dd247c2eb..caee939a5 100644 --- a/application/views/lehre/pruefungsprotokollUebersichtData.php +++ b/application/views/lehre/pruefungsprotokollUebersichtData.php @@ -21,6 +21,7 @@ WHERE AND ( '". $PERIOD. "' = 'today' AND datum = NOW()::date OR '". $PERIOD. "' = 'lastWeek' AND datum = (NOW() - interval '1 week')::date OR + '". $PERIOD. "' = 'upcoming' AND datum > NOW()::date OR '". $PERIOD. "' = 'all' AND datum >= '2020-05-27' ) ORDER BY datum, nachname, vorname diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index b49aa6044..18098af91 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -7949,6 +7949,26 @@ Any unusual occurrences ) ) ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'zukuenftige', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zukünftige', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'upcoming', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'ui', From a0b86b6207cdf25cd1a897554dd7728c36180842 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Fri, 18 Jun 2021 09:21:39 +0200 Subject: [PATCH 2/4] rename in_the_future to upcoming consistently --- application/views/lehre/pruefungsprotokollUebersicht.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/lehre/pruefungsprotokollUebersicht.php b/application/views/lehre/pruefungsprotokollUebersicht.php index 2416b30bd..c7de8fcd0 100644 --- a/application/views/lehre/pruefungsprotokollUebersicht.php +++ b/application/views/lehre/pruefungsprotokollUebersicht.php @@ -48,7 +48,7 @@ name="period" value="today">p->t('ui','heute'); ?> - From cea673fa824c4db5e6c3c6e6a4cdf8ceb04ed156 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Fri, 18 Jun 2021 12:45:44 +0200 Subject: [PATCH 3/4] adjust indentation, changed filter lastWeek to cover last 7 days and not only a week ago today --- application/views/lehre/pruefungsprotokollUebersichtData.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/lehre/pruefungsprotokollUebersichtData.php b/application/views/lehre/pruefungsprotokollUebersichtData.php index caee939a5..1450c7f93 100644 --- a/application/views/lehre/pruefungsprotokollUebersichtData.php +++ b/application/views/lehre/pruefungsprotokollUebersichtData.php @@ -20,8 +20,8 @@ WHERE vorsitz='".$UID."' AND ( '". $PERIOD. "' = 'today' AND datum = NOW()::date OR - '". $PERIOD. "' = 'lastWeek' AND datum = (NOW() - interval '1 week')::date OR - '". $PERIOD. "' = 'upcoming' AND datum > NOW()::date OR + '". $PERIOD. "' = 'lastWeek' AND datum >= (NOW() - interval '1 week')::date AND datum < NOW()::date OR + '". $PERIOD. "' = 'upcoming' AND datum > NOW()::date OR '". $PERIOD. "' = 'all' AND datum >= '2020-05-27' ) ORDER BY datum, nachname, vorname From e76dead57076bc23d1b7f9ba4958d3274f16bc21 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Fri, 18 Jun 2021 14:45:05 +0200 Subject: [PATCH 4/4] add parantheses although not explicitly needed for correct function --- .../views/lehre/pruefungsprotokollUebersichtData.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/views/lehre/pruefungsprotokollUebersichtData.php b/application/views/lehre/pruefungsprotokollUebersichtData.php index 1450c7f93..ff2caa774 100644 --- a/application/views/lehre/pruefungsprotokollUebersichtData.php +++ b/application/views/lehre/pruefungsprotokollUebersichtData.php @@ -19,10 +19,10 @@ FROM WHERE vorsitz='".$UID."' AND ( - '". $PERIOD. "' = 'today' AND datum = NOW()::date OR - '". $PERIOD. "' = 'lastWeek' AND datum >= (NOW() - interval '1 week')::date AND datum < NOW()::date OR - '". $PERIOD. "' = 'upcoming' AND datum > NOW()::date OR - '". $PERIOD. "' = 'all' AND datum >= '2020-05-27' + ('". $PERIOD. "' = 'today' AND datum = NOW()::date) OR + ('". $PERIOD. "' = 'lastWeek' AND datum >= (NOW() - interval '1 week')::date AND datum < NOW()::date) OR + ('". $PERIOD. "' = 'upcoming' AND datum > NOW()::date) OR + ('". $PERIOD. "' = 'all' AND datum >= '2020-05-27') ) ORDER BY datum, nachname, vorname ";