eigenen filter fuer abgewiesene studenten hinzugefuegt

This commit is contained in:
ma0048
2021-11-11 15:52:39 +01:00
parent 63105951a0
commit 15176e7ce6
5 changed files with 209 additions and 1 deletions
@@ -20,6 +20,7 @@ class InfoCenter extends Auth_Controller
const INDEX_PAGE = 'index';
const FREIGEGEBEN_PAGE = 'freigegeben';
const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert';
const ABGEWIESEN_PAGE = 'abgewiesen';
const SHOW_DETAILS_PAGE = 'showDetails';
const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails';
const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung';
@@ -107,6 +108,7 @@ class InfoCenter extends Auth_Controller
array(
'index' => 'infocenter:r',
'freigegeben' => 'infocenter:r',
'abgewiesen' => 'infocenter:r',
'reihungstestAbsolviert' => 'infocenter:r',
'showDetails' => 'infocenter:r',
'showZGVDetails' => 'lehre/zgvpruefung:r',
@@ -203,6 +205,16 @@ class InfoCenter extends Auth_Controller
$this->load->view('system/infocenter/infocenterFreigegeben.php');
}
/**
* Abgewiesen page of the InfoCenter tool
*/
public function abgewiesen()
{
$this->_setNavigationMenu(self::ABGEWIESEN_PAGE); // define the navigation menu for this page
$this->load->view('system/infocenter/infocenterAbgewiesen.php');
}
/**
*
*/
@@ -1199,6 +1211,10 @@ class InfoCenter extends Auth_Controller
{
$this->_setNavigationMenu(self::REIHUNGSTESTABSOLVIERT_PAGE);
}
elseif (strpos($navigation_page, self::ABGEWIESEN_PAGE) !== false)
{
$this->_setNavigationMenu(self::ABGEWIESEN_PAGE);
}
$this->outputJsonSuccess('success');
}
@@ -1422,12 +1438,14 @@ 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);
$currentFilterId = $this->input->get(self::FILTER_ID);
if (isset($currentFilterId))
{
$freigegebenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
$reihungstestAbsolviertLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
$abgewiesenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
}
$this->navigationlib->setSessionMenu(
@@ -1466,6 +1484,18 @@ class InfoCenter extends Auth_Controller
null, // subscriptLinkValue
'', // target
20 // sort
),
'abgewiesen' => $this->navigationlib->oneLevel(
'Abgewiesene Studenten', // description
$abgewiesenLink, // link
null, // children
'close', // icon
null, // subscriptDescription
false, // expand
null, // subscriptLinkClass
null, // subscriptLinkValue
'', // target
30 // sort
)
)
);
@@ -1491,6 +1521,8 @@ class InfoCenter extends Auth_Controller
}
if ($origin_page === self::ZGV_UBERPRUEFUNG_PAGE)
$link = site_url(self::ZGV_UEBERPRUEFUNG_URI);
if ($origin_page === self::ABGEWIESEN_PAGE)
$link = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
$prevFilterId = $this->input->get(self::PREV_FILTER_ID);
if (isset($prevFilterId))
@@ -1528,6 +1560,7 @@ class InfoCenter extends Auth_Controller
$homeLink = site_url(self::INFOCENTER_URI.'/'.self::INDEX_PAGE);
$freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE);
$absolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE);
$abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
$prevFilterId = $this->input->get(self::PREV_FILTER_ID);
if (isset($prevFilterId))
{
@@ -1586,6 +1619,24 @@ class InfoCenter extends Auth_Controller
)
);
}
if($page == self::ABGEWIESEN_PAGE)
{
$this->navigationlib->setSessionElementMenu(
'abgewiesen',
$this->navigationlib->oneLevel(
'Abgewiesene Studenten', // description
$abgewiesenLink, // link
null, // children
'close', // icon
null, // subscriptDescription
false, // expand
null, // subscriptLinkClass
null, // subscriptLinkValue
'', // target
40 // sort
)
);
}
}
/**
@@ -0,0 +1,50 @@
<?php
$this->load->view(
'templates/FHC-Header',
array(
'title' => 'Info Center',
'jquery' => true,
'jqueryui' => true,
'jquerycheckboxes' => true,
'bootstrap' => true,
'fontawesome' => true,
'sbadmintemplate' => true,
'tablesorter' => 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')
)
);
?>
<body>
<div id="wrapper">
<?php echo $this->widgetlib->widget('NavigationWidget'); ?>
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">
Abgewiesene Studenten
</h3>
</div>
</div>
<div>
<?php $this->load->view('system/infocenter/infocenterAbgewiesenData.php'); ?>
</div>
</div>
</div>
</div>
</body>
<?php $this->load->view('templates/FHC-Footer'); ?>
@@ -0,0 +1,84 @@
<?php
$this->config->load('infocenter');
$ABGEWIESENEN_STATUS = '\'Abgewiesener\'';
$STUDIENGANG_TYP = '\''.$this->variablelib->getVar('infocenter_studiensgangtyp').'\'';
$ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz');
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
$LOGDATA_NAME = '\'Message sent\'';
$LOGDATA_VON = '\'online\'';
$query = '
SELECT
p.person_id AS "PersonID",
ps.prestudent_id AS "PreStudentID",
p.vorname AS "Vorname",
p.nachname AS "Nachname",
pss.insertamum AS "AbgewiesenAm",
(
SELECT l.zeitpunkt
FROM system.tbl_log l
WHERE l.person_id = p.person_id
AND '. $LOGDATA_NAME .' = (
SELECT l.logdata->>\'name\'
FROM system.tbl_log l
WHERE l.person_id = p.person_id
ORDER BY l.log_id DESC
LIMIT 1
)
AND '. $LOGDATA_VON .' = (
SELECT l.insertvon
FROM system.tbl_log l
WHERE l.person_id = p.person_id
ORDER BY l.log_id DESC
LIMIT 1
)
AND l.zeitpunkt >= pss.insertamum
ORDER BY l.log_id DESC
LIMIT 1
) AS "Nachricht"
FROM
public.tbl_prestudentstatus pss
JOIN public.tbl_prestudent ps USING(prestudent_id)
JOIN public.tbl_person p USING(person_id)
JOIN public.tbl_studiengang sg USING(studiengang_kz)
WHERE pss.status_kurzbz = '. $ABGEWIESENEN_STATUS .'
AND pss.studiensemester_kurzbz = '. $STUDIENSEMESTER .'
AND (sg.typ IN ('. $STUDIENGANG_TYP .')
OR
sg.studiengang_kz IN ('. $ADDITIONAL_STG .')
)
ORDER BY "AbgewiesenAm" DESC';
$filterWidgetArray = array(
'query' => $query,
'app' => InfoCenter::APP,
'datasetName' => 'abgewiesen',
'filter_id' => $this->input->get('filter_id'),
'requiredPermissions' => 'infocenter',
'datasetRepresentation' => 'tablesorter',
'columnsAliases' => array(
'PersonID',
'PreStudentID',
'Vorname',
'Nachname',
'Abgewiesen am',
'Nachricht'
),
'formatRow' => function($datasetRaw) {
if ($datasetRaw->{'Nachricht'} === null)
{
$datasetRaw->{'Nachricht'} = 'Nein';
}
else
{
$datasetRaw->{'Nachricht'} = 'Ja';
}
return $datasetRaw;
}
);
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
?>
@@ -62,7 +62,7 @@ var InfocenterPersonDataset = {
'<i class="fa fa-chevron-left"></i>' +
'</button>&nbsp;' +
infocenter_studiensemester +
'&nbsp;<button class="btn btn-default btn-sm incStudiensemester">' +
'&nbsp;<button class="btn btn-default btn-xs incStudiensemester">' +
'<i class="fa fa-chevron-right"></i>' +
'</button>';
+23
View File
@@ -471,6 +471,29 @@ $filters = array(
',
'oe_kurzbz' => null,
),
array(
'app' => 'infocenter',
'dataset_name' => 'abgewiesen',
'filter_kurzbz' => 'InfoCenterAbgewiesenAlle',
'description' => '{Alle}',
'sort' => 1,
'default_filter' => true,
'filter' => '
{
"name": "Abgewiesen - Alle",
"columns": [
{"name": "PersonID"},
{"name": "PreStudentID"},
{"name": "Vorname"},
{"name": "Nachname"},
{"name": "AbgewiesenAm"},
{"name": "Nachricht"}
],
"filters": []
}
',
'oe_kurzbz' => null,
),
array(
'app' => 'budget',
'dataset_name' => 'budgetoverview',