From 8a417e5cb8fb0c5b37cfb136dd6deea6d53befd7 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 15 Sep 2021 13:45:43 +0200 Subject: [PATCH] fixed uebersicht nicht abgeschickt --- .../system/infocenter/infocenterData.php | 27 +++++++++++++++++++ system/filtersupdate.php | 6 ++--- system/phrasesupdate.php | 20 ++++++++++++++ 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 4dd897f7f..d0e0a7126 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -184,6 +184,32 @@ ) LIMIT 1 ) AS "StgNichtAbgeschickt", + ( + SELECT COUNT(*) + FROM public.tbl_prestudentstatus pss + JOIN public.tbl_prestudent ps USING(prestudent_id) + JOIN public.tbl_studiengang sg USING(studiengang_kz) + JOIN lehre.tbl_studienplan sp USING(studienplan_id) + WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' + AND pss.bewerbung_abgeschicktamum IS NULL + AND pss.bestaetigtam IS NULL + AND ps.person_id = p.person_id + AND (sg.typ IN ('.$STUDIENGANG_TYP.') + OR + sg.studiengang_kz in('.$ADDITIONAL_STG.') + ) + AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.' + + AND NOT EXISTS ( + SELECT 1 + FROM tbl_prestudentstatus spss + WHERE spss.prestudent_id = pss.prestudent_id + AND spss.status_kurzbz = '.$REJECTED_STATUS.' + AND spss.studiensemester_kurzbz IN (SELECT ss.studiensemester_kurzbz FROM public.tbl_studiensemester ss WHERE ss.ende > + (SELECT start FROM public.tbl_studiensemester sss WHERE studiensemester_kurzbz = '.$STUDIENSEMESTER.')) + ) + LIMIT 1 + ) AS "AnzahlStgNichtAbgeschickt", ( SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss @@ -322,6 +348,7 @@ ucfirst($this->p->t('global', 'abgeschickt')).' ('.$this->p->t('global', 'anzahl').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'gesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'nichtGesendet').')', + ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'anzahlNichtGesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')', 'ZGV Nation BA', 'ZGV Nation MA', diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 77e0c3e3a..b8da24937 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -122,10 +122,10 @@ $filters = array( ], "filters": [ { - "name": "SendDate", + "name": "AnzahlStgNichtAbgeschickt", "option": "", - "condition": "", - "operation": "nset" + "condition": "0", + "operation": "gt" } ] } diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 7cd0419ae..f2be0b9e4 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -568,6 +568,26 @@ $phrases = array( ) ) ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'anzahlNichtGesendet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anzahl (nicht gesendet)', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'amount (not sent)', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'global',