From 91f79b202186032d9404f5edf4f38aa510268ed6 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 26 Jul 2023 13:27:51 +0200 Subject: [PATCH] - aufgenommen filter infocenter fuer lehrgaenge --- .../system/infocenter/InfoCenter.php | 31 +++++- .../infocenter/infocenterAufgenommen.php | 50 ++++++++++ .../infocenter/infocenterAufgenommenData.php | 95 +++++++++++++++++++ system/filtersupdate.php | 21 ++++ 4 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 application/views/system/infocenter/infocenterAufgenommen.php create mode 100644 application/views/system/infocenter/infocenterAufgenommenData.php diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 548b071d3..e6d307322 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -21,6 +21,7 @@ class InfoCenter extends Auth_Controller const FREIGEGEBEN_PAGE = 'freigegeben'; const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert'; const ABGEWIESEN_PAGE = 'abgewiesen'; + const AUFGENOMMEN_PAGE = 'aufgenommen'; const SHOW_DETAILS_PAGE = 'showDetails'; const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails'; const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung'; @@ -115,6 +116,7 @@ class InfoCenter extends Auth_Controller 'index' => 'infocenter:r', 'freigegeben' => 'infocenter:r', 'abgewiesen' => 'infocenter:r', + 'aufgenommen' => 'infocenter:r', 'reihungstestAbsolviert' => 'infocenter:r', 'showDetails' => 'infocenter:r', 'showZGVDetails' => 'lehre/zgvpruefung:r', @@ -228,6 +230,16 @@ class InfoCenter extends Auth_Controller $this->load->view('system/infocenter/infocenterAbgewiesen.php'); } + + /** + * Aufgenommene page of the InfoCenter tool + */ + public function aufgenommen() + { + $this->_setNavigationMenu(self::AUFGENOMMEN_PAGE); // define the navigation menu for this page + + $this->load->view('system/infocenter/infocenterAufgenommen.php'); + } /** * @@ -1526,6 +1538,7 @@ class InfoCenter extends Auth_Controller $freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE); $reihungstestAbsolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE); $abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE); + $aufgenommenLink = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE); $currentFilterId = $this->input->get(self::FILTER_ID); if (isset($currentFilterId)) @@ -1533,6 +1546,7 @@ class InfoCenter extends Auth_Controller $freigegebenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; $reihungstestAbsolviertLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; $abgewiesenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; + $aufgenommenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; } $this->navigationlib->setSessionMenu( @@ -1583,7 +1597,19 @@ class InfoCenter extends Auth_Controller null, // subscriptLinkValue '', // target 30 // sort - ) + ), + 'aufgenommen' => $this->navigationlib->oneLevel( + 'Aufgenommene', // description + $aufgenommenLink, // link + null, // children + 'check', // icon + null, // subscriptDescription + false, // expand + null, // subscriptLinkClass + null, // subscriptLinkValue + '', // target + 40 // sort + ), ) ); } @@ -1611,6 +1637,9 @@ class InfoCenter extends Auth_Controller if ($origin_page === self::ABGEWIESEN_PAGE) $link = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE); + if ($origin_page === self::AUFGENOMMEN_PAGE) + $link = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE); + $prevFilterId = $this->input->get(self::PREV_FILTER_ID); if (isset($prevFilterId)) { diff --git a/application/views/system/infocenter/infocenterAufgenommen.php b/application/views/system/infocenter/infocenterAufgenommen.php new file mode 100644 index 000000000..6d65c0f7c --- /dev/null +++ b/application/views/system/infocenter/infocenterAufgenommen.php @@ -0,0 +1,50 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'Info Center', + 'jquery3' => true, + 'jqueryui1' => true, + 'jquerycheckboxes1' => true, + 'bootstrap3' => true, + 'fontawesome4' => true, + 'sbadmintemplate3' => true, + 'tablesorter2' => true, + 'ajaxlib' => true, + 'filterwidget' => true, + 'navigationwidget' => true, + 'dialoglib' => true, + 'phrases' => array( + 'person' => array('vorname', 'nachname'), + 'global' => array('mailAnXversandt'), + 'ui' => array('bitteEintragWaehlen') + ), + 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'), + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') + ) + ); +?> + + +
+ + widgetlib->widget('NavigationWidget'); ?> + +
+
+
+
+ +
+
+
+ load->view('system/infocenter/infocenterAufgenommenData.php'); ?> +
+
+
+
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/system/infocenter/infocenterAufgenommenData.php b/application/views/system/infocenter/infocenterAufgenommenData.php new file mode 100644 index 000000000..720d118e3 --- /dev/null +++ b/application/views/system/infocenter/infocenterAufgenommenData.php @@ -0,0 +1,95 @@ +config->load('infocenter'); + $AUFGENOMMENER_STATUS = '\'Aufgenommener\''; + $REJECTED_STATUS = '\'Abgewiesener\''; + $STUDIENGANG_TYP = '\'l\''; + $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; + $LOGDATA_NAME = '\'Message sent\''; + $LOGDATA_VON = '\'online\''; + +$query = ' + SELECT + p.person_id AS "PersonId", + p.vorname AS "Vorname", + p.nachname AS "Nachname", + ( + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ) || UPPER(sg.kurzbz)), \', \') + FROM public.tbl_prestudentstatus pss + JOIN public.tbl_prestudent ps USING(prestudent_id) + JOIN public.tbl_studiengang sg USING(studiengang_kz) + WHERE + pss.status_kurzbz = '. $AUFGENOMMENER_STATUS .' + AND ps.person_id = p.person_id + AND sg.typ IN ('.$STUDIENGANG_TYP.') + 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 "Studiengang" + FROM + public.tbl_person p + WHERE + EXISTS ( + SELECT 1 + FROM public.tbl_prestudent sps + JOIN public.tbl_studiengang ssg USING(studiengang_kz) + WHERE sps.person_id = p.person_id + AND ssg.typ IN (' . $STUDIENGANG_TYP . ') + AND ' . $AUFGENOMMENER_STATUS . ' = ( + SELECT spss.status_kurzbz + FROM public.tbl_prestudentstatus spss + WHERE spss.prestudent_id = sps.prestudent_id + ORDER BY spss.datum DESC, spss.insertamum DESC, spss.ext_id DESC + LIMIT 1 + ) + AND EXISTS ( + SELECT 1 + FROM tbl_prestudentstatus spss + WHERE spss.prestudent_id = sps.prestudent_id + AND spss.status_kurzbz = ' . $AUFGENOMMENER_STATUS . ' + AND spss.studiensemester_kurzbz = ' . $STUDIENSEMESTER . ' + ) + ) + + '; + + $filterWidgetArray = array( + 'query' => $query, + 'app' => InfoCenter::APP, + 'datasetName' => 'aufgenommen', + 'filter_id' => $this->input->get('filter_id'), + 'requiredPermissions' => 'infocenter', + 'datasetRepresentation' => 'tablesorter', + 'checkboxes' => 'PersonId', + 'additionalColumns' => array('Details'), + 'columnsAliases' => array( + 'PersonId', + ucfirst($this->p->t('person', 'vorname')) , + ucfirst($this->p->t('person', 'nachname')), + ucfirst($this->p->t('lehre', 'studiengang')) + ), + + 'formatRow' => function($datasetRaw) + { + $datasetRaw->{'Details'} = sprintf( + 'Details', + site_url('system/infocenter/InfoCenter/showDetails'), + $datasetRaw->{'PersonId'}, + 'aufgenommen', + (isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''), + (isset($_GET['filter_id']) ? $_GET['filter_id'] : '') + ); + return $datasetRaw; + } + ); + + echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); +?> diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 241e44f2f..9f2b2c8e4 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -527,6 +527,27 @@ $filters = array( ', 'oe_kurzbz' => null, ), + array( + 'app' => 'infocenter', + 'dataset_name' => 'aufgenommen', + 'filter_kurzbz' => 'InfoCenterAufgenommenAlle', + 'description' => '{Alle}', + 'sort' => 1, + 'default_filter' => true, + 'filter' => ' + { + "name": "Aufgenommen - Alle", + "columns": [ + {"name": "PersonId"}, + {"name": "Vorname"}, + {"name": "Nachname"}, + {"name": "Studiengang"} + ], + "filters": [] + } + ', + 'oe_kurzbz' => null, + ), array( 'app' => 'budget', 'dataset_name' => 'budgetoverview',