mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
Merge branch 'master' into feature-7423/infocenter_udf_schule_job
This commit is contained in:
@@ -27,7 +27,7 @@ $config['navigation_header'] = array(
|
||||
'oehbeitragsverwaltung' => array(
|
||||
'link' => site_url('codex/Oehbeitrag'),
|
||||
'icon' => '',
|
||||
'description' => 'Öhbeitragsverwaltung',
|
||||
'description' => 'ÖH-Beitragsverwaltung',
|
||||
'expand' => true,
|
||||
'sort' => 20,
|
||||
'requiredPermissions' => 'admin:w'
|
||||
@@ -102,6 +102,13 @@ $config['navigation_header'] = array(
|
||||
'description' => 'BPK Wartung',
|
||||
'sort' => 20,
|
||||
'requiredPermissions' => 'admin:r'
|
||||
),
|
||||
'errormonitoring' => array(
|
||||
'link' => site_url('system/issues/Issues'),
|
||||
'description' => 'Fehler Monitoring',
|
||||
'expand' => true,
|
||||
'sort' => 30,
|
||||
'requiredPermissions' => 'system/issues_verwalten:r'
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -133,13 +140,6 @@ $config['navigation_header'] = array(
|
||||
'expand' => true,
|
||||
'sort' => 20,
|
||||
'requiredPermissions' => 'system/developer:r'
|
||||
),
|
||||
'errormonitoring' => array(
|
||||
'link' => site_url('system/issues/Issues'),
|
||||
'description' => 'Fehler Monitoring',
|
||||
'expand' => true,
|
||||
'sort' => 20,
|
||||
'requiredPermissions' => 'system/issues_verwalten:r'
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ if (! defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
class Oehbeitrag extends Auth_Controller
|
||||
{
|
||||
const STUDIENSEMESTER_START = 'WS2020';
|
||||
const STUDIENSEMESTER_START = 'WS2020'; // Öhbeitrage can be assigned beginning with this Studiensemester
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -23,6 +23,14 @@ class Oehbeitrag extends Auth_Controller
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui',
|
||||
'oehbeitrag'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function index()
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -921,7 +933,8 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
$this->_log($person_id, 'freigegeben', $logparams);
|
||||
|
||||
$this->_sendFreigabeMail($prestudent_id);
|
||||
if (is_numeric($statusgrund_id) || $logdata['studiengang_typ'] === 'm')
|
||||
$this->_sendFreigabeMail($prestudent_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1199,6 +1212,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 +1439,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 +1485,18 @@ class InfoCenter extends Auth_Controller
|
||||
null, // subscriptLinkValue
|
||||
'', // target
|
||||
20 // sort
|
||||
),
|
||||
'abgewiesen' => $this->navigationlib->oneLevel(
|
||||
'Abgewiesene', // description
|
||||
$abgewiesenLink, // link
|
||||
null, // children
|
||||
'close', // icon
|
||||
null, // subscriptDescription
|
||||
false, // expand
|
||||
null, // subscriptLinkClass
|
||||
null, // subscriptLinkValue
|
||||
'', // target
|
||||
30 // sort
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1491,6 +1522,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 +1561,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 +1620,24 @@ class InfoCenter extends Auth_Controller
|
||||
)
|
||||
);
|
||||
}
|
||||
if($page == self::ABGEWIESEN_PAGE)
|
||||
{
|
||||
$this->navigationlib->setSessionElementMenu(
|
||||
'abgewiesen',
|
||||
$this->navigationlib->oneLevel(
|
||||
'Abgewiesene', // description
|
||||
$abgewiesenLink, // link
|
||||
null, // children
|
||||
'close', // icon
|
||||
null, // subscriptDescription
|
||||
false, // expand
|
||||
null, // subscriptLinkClass
|
||||
null, // subscriptLinkValue
|
||||
'', // target
|
||||
40 // sort
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,18 +23,21 @@ class Issues extends Auth_Controller
|
||||
$this->load->library('PermissionLib');
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
// Load models
|
||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui',
|
||||
'filter'
|
||||
'filter',
|
||||
'lehre',
|
||||
'person',
|
||||
'fehlermonitoring'
|
||||
)
|
||||
);
|
||||
|
||||
// Load models
|
||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
|
||||
|
||||
$this->_setAuthUID(); // sets property uid
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ class FilterWidgetLib
|
||||
// Loops in the session for all the filter widgets
|
||||
foreach ($filterWidgetsSession as $filterWidget => $filterWidgetData)
|
||||
{
|
||||
// If this filter widget is not the currrent used filter widget and the it is expired...
|
||||
// If this filter widget is not the current used filter widget and the it is expired...
|
||||
if ($this->_filterUniqueId != $filterWidget && $filterWidgetData[self::SESSION_TIMEOUT] <= time())
|
||||
{
|
||||
cleanSessionElement(self::SESSION_NAME, $filterWidget); // ...remove it
|
||||
@@ -232,7 +232,7 @@ class FilterWidgetLib
|
||||
if ($filterId != null && is_numeric($filterId) && $filterId > 0)
|
||||
{
|
||||
$whereParameters = array(
|
||||
'filter_id' => $filterId
|
||||
self::FILTER_ID => $filterId
|
||||
);
|
||||
}
|
||||
else
|
||||
@@ -279,6 +279,18 @@ class FilterWidgetLib
|
||||
if ($definition == null && $whereParameters != null)
|
||||
{
|
||||
$definition = $this->_ci->FiltersModel->loadWhere($whereParameters);
|
||||
|
||||
// Last chance!!!
|
||||
if (!hasData($definition)) // If no data have been found until now the tries the most desperate query
|
||||
{
|
||||
$this->_ci->FiltersModel->addOrder('filter_id', 'ASC'); // sort on column filter_id to get the oldest
|
||||
$whereParameters = array(
|
||||
'app' => $app,
|
||||
'dataset_name' => $datasetName
|
||||
);
|
||||
|
||||
$definition = $this->_ci->FiltersModel->loadWhere($whereParameters);
|
||||
}
|
||||
}
|
||||
|
||||
return $definition;
|
||||
@@ -712,8 +724,11 @@ class FilterWidgetLib
|
||||
{
|
||||
$this->_ci->load->model('system/Filters_model', 'FiltersModel'); // to remove the filter definitions from DB
|
||||
|
||||
// delete it!
|
||||
$this->_ci->FiltersModel->delete(array('filter_id' => $filterId));
|
||||
// Delete it from database
|
||||
$this->_ci->FiltersModel->delete(array(self::FILTER_ID => $filterId));
|
||||
|
||||
// Delete it from session
|
||||
$this->_dropFromSessionFilterWidgetById($filterId);
|
||||
|
||||
$removeCustomFilter = true;
|
||||
}
|
||||
@@ -735,7 +750,7 @@ class FilterWidgetLib
|
||||
$session = $this->getSession(); // The filter currently stored in session (the one that is currently used)
|
||||
if ($session != null)
|
||||
{
|
||||
// Loads the Fitlers model
|
||||
// Loads the Filters model
|
||||
$this->_ci->load->model('system/Filters_model', 'FiltersModel');
|
||||
|
||||
// Loads all the filters related to this page (same dataset_name and same app name)
|
||||
@@ -761,7 +776,7 @@ class FilterWidgetLib
|
||||
'%s?%s=%s',
|
||||
site_url($navigationPage),
|
||||
self::FILTER_ID,
|
||||
$filter->filter_id
|
||||
$filter->{self::FILTER_ID}
|
||||
) // link
|
||||
);
|
||||
|
||||
@@ -774,7 +789,7 @@ class FilterWidgetLib
|
||||
{
|
||||
$menuEntry['subscriptDescription'] = 'Remove';
|
||||
$menuEntry['subscriptLinkClass'] = 'remove-custom-filter';
|
||||
$menuEntry['subscriptLinkValue'] = $filter->filter_id;
|
||||
$menuEntry['subscriptLinkValue'] = $filter->{self::FILTER_ID};
|
||||
$childrenPersonalArray[] = $menuEntry; // adds to personal filters menu array
|
||||
}
|
||||
}
|
||||
@@ -974,5 +989,29 @@ class FilterWidgetLib
|
||||
|
||||
return $pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove from the session the given filter widget
|
||||
*/
|
||||
private function _dropFromSessionFilterWidgetById($filterId)
|
||||
{
|
||||
// Loads the session for all the filter widgets
|
||||
$filterWidgetsSession = getSession(self::SESSION_NAME);
|
||||
|
||||
// If something is present in session
|
||||
if ($filterWidgetsSession != null)
|
||||
{
|
||||
// Loops in the session for all the filter widgets
|
||||
foreach ($filterWidgetsSession as $filterWidget => $filterWidgetData)
|
||||
{
|
||||
// If this filter widget is not the one that we are looking for
|
||||
if ($filterWidgetData[self::FILTER_ID] == $filterId)
|
||||
{
|
||||
cleanSessionElement(self::SESSION_NAME, $filterWidget); // ...remove it
|
||||
break; // stop to search
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ class VorlageLib
|
||||
if (!hasData($vorlage))
|
||||
{
|
||||
// Builds where clause
|
||||
$where = $this->_where($vorlage_kurzbz, $orgform_kurzbz, $sprache);
|
||||
$where = $this->_where($vorlage_kurzbz);
|
||||
|
||||
$vorlage = $this->ci->organisationseinheitlib->treeSearch(
|
||||
'public',
|
||||
@@ -134,20 +134,11 @@ class VorlageLib
|
||||
/**
|
||||
* _where
|
||||
*/
|
||||
private function _where($vorlage_kurzbz, $orgform_kurzbz, $sprache)
|
||||
private function _where($vorlage_kurzbz)
|
||||
{
|
||||
// Builds where clause
|
||||
$where = "vorlage_kurzbz = ".$this->ci->VorlageModel->escape($vorlage_kurzbz);
|
||||
|
||||
if (is_null($sprache))
|
||||
{
|
||||
$where .= " AND sprache IS NULL";
|
||||
}
|
||||
else
|
||||
{
|
||||
$where .= " AND sprache = ".$this->ci->VorlageModel->escape($sprache);
|
||||
}
|
||||
|
||||
$where .= " AND aktiv = true";
|
||||
|
||||
return $where;
|
||||
|
||||
@@ -12,6 +12,14 @@ $this->load->view(
|
||||
'dialoglib' => true,
|
||||
'ajaxlib' => true,
|
||||
'navigationwidget' => true,
|
||||
'phrases' => array(
|
||||
'person' => array('vorname', 'nachname'),
|
||||
'global' => array('unbeschraenkt'),
|
||||
'ui' => array('bearbeiten', 'loeschen', 'speichern', 'entfernen'),
|
||||
'oehbeitrag' => array('oehbeitraegeFestgelegt', 'fehlerHolenOehbeitraege', 'fehlerHolenSemester',
|
||||
'fehlerHinzufuegenOehbeitrag', 'fehlerAktualisierenOehbeitrag',
|
||||
'fehlerLoeschenOehbeitrag')
|
||||
),
|
||||
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/codex/oehbeitrag.css'),
|
||||
'customJSs' => array('public/js/tablesort/tablesort.js', 'public/js/codex/oehbeitrag.js')
|
||||
)
|
||||
@@ -28,23 +36,23 @@ $this->load->view(
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
Öhbeitragsverwaltung
|
||||
<?php echo $this->p->t('oehbeitrag', 'oehbeitragsVerwaltung') ?>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<button class="btn btn-default" id="addNewOeh">Neuen Öhbeitrag hinzufügen</button>
|
||||
<button class="btn btn-default" id="addNewOeh"><?php echo $this->p->t('oehbeitrag', 'oehbeitragHinzufuegen') ?></button>
|
||||
<br />
|
||||
<br />
|
||||
<table class="table table-bordered table-condensed" id="oehbeitraegeTbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Gültig von</th>
|
||||
<th>Gültig bis</th>
|
||||
<th>Studierendenbetrag</th>
|
||||
<th>Versicherungsbetrag</th>
|
||||
<th id="actionHeading">Aktion</th>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'gueltigVon')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global', 'gueltigBis')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('oehbeitrag', 'studierendenbetrag')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('oehbeitrag', 'versicherungsbetrag')) ?></th>
|
||||
<th id="actionHeading"><?php echo ucfirst($this->p->t('ui', 'aktion')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -187,7 +187,7 @@ FROM
|
||||
(SELECT
|
||||
uid
|
||||
FROM
|
||||
public.tbl_benutzer JOIN public.tbl_mitarbeiter ma
|
||||
public.tbl_benutzer JOIN public.tbl_mitarbeiter ma
|
||||
ON tbl_benutzer.uid = ma.mitarbeiter_uid
|
||||
WHERE
|
||||
person_id = tmp_projektbetreuung.person_id
|
||||
@@ -268,7 +268,7 @@ FROM
|
||||
ELSE (oe.organisationseinheittyp_kurzbz ||
|
||||
\' \' || oe.bezeichnung)
|
||||
END AS "lv_oe_kurzbz",
|
||||
(vorname || \' \' || nachname) AS "lektor",
|
||||
(nachname || \' \' || vorname) AS "lektor",
|
||||
TRUNC(pb.stunden, 1) AS "stunden",
|
||||
TRUNC((pb.stunden * pb.stundensatz), 2) AS "betrag",
|
||||
vertrag_id,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<a href="outputAkteContent/<?php echo $dokument->akte_id ?>"><?php echo isEmptyString($dokument->titel) ? $dokument->bezeichnung : $dokument->titel ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<select class="aktenid" id="aktenid_<?php echo $dokument->akte_id?>" <?php echo (isset($formalReadonly) ? 'disabled' : '') ?>>
|
||||
<select class="aktenid" id="aktenid_<?php echo $dokument->akte_id?>" <?php echo (isset($formalReadonly) ? 'disabled' : '') ?> autocomplete="off">
|
||||
<?php
|
||||
foreach($dokumententypen as $dokumenttyp)
|
||||
echo "<option " . ($dokumenttyp->bezeichnung === $dokument->dokument_bezeichnung ? 'selected' : '') . " value = " . $dokumenttyp->dokument_kurzbz . ">" . $dokumenttyp->bezeichnung . "</option>"
|
||||
|
||||
@@ -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
|
||||
</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,85 @@
|
||||
<?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';
|
||||
}
|
||||
|
||||
$datasetRaw->{'AbgewiesenAm'} = date_format(date_create($datasetRaw->{'AbgewiesenAm'}),'Y-m-d H:i');
|
||||
return $datasetRaw;
|
||||
}
|
||||
);
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
@@ -15,10 +15,11 @@ $this->load->view(
|
||||
'navigationwidget' => true,
|
||||
'dialoglib' => true,
|
||||
'phrases' => array(
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
'ui',
|
||||
'fehlermonitoring'
|
||||
),
|
||||
'customCSSs' => array('public/css/issues/issuesDataset.css', 'public/css/sbadmin2/tablesort_bootstrap.css'),
|
||||
'customJSs' => array('public/js/issues/issuesDataset.js', 'public/js/bootstrapper.js')
|
||||
'customJSs' => array('public/js/issues/issuesDataset.js', 'public/js/bootstrapper.js'),
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -33,7 +34,7 @@ $this->load->view(
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
Fehler Monitoring
|
||||
<?php echo $this->p->t('fehlermonitoring', 'fehlerMonitoring') ?>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,40 +4,64 @@ $PERSON_ID = getAuthPersonId();
|
||||
$ALL_FUNKTIONEN_OE_KURZBZ = "('" . implode("','", array_keys($all_funktionen_oe_kurzbz)) . "')";
|
||||
$ALL_OE_KURZBZ_BERECHTIGT = "('" . implode("','", $all_oe_kurzbz_berechtigt) . "')";
|
||||
$RELEVANT_PRESTUDENT_STATUS = "('Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')";
|
||||
$LANGUAGE_INDEX = getUserLanguage() == 'German' ? '1' : '2';
|
||||
|
||||
// get issues for the oes of the uid or for the persons (students, oe-zuordnung) of the oes
|
||||
$query = "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern AS \"Fehlercode extern\", datum AS \"Datum\",
|
||||
// get issues for the oes of the logged user or for the persons (students, oe-zuordnung) of the oes
|
||||
$query = "WITH zustaendigkeiten AS (
|
||||
SELECT fehlercode,
|
||||
CASE
|
||||
WHEN zst.person_id = ".$PERSON_ID;
|
||||
|
||||
if (!isEmptyArray($all_funktionen_oe_kurzbz))
|
||||
{
|
||||
$query .= " OR (zst.oe_kurzbz IN $ALL_FUNKTIONEN_OE_KURZBZ AND zst.funktion_kurzbz IS NULL) /* if oe is specified in fehler_zustaendigkeiten */";
|
||||
|
||||
// check for each oe for each function if zustaendig
|
||||
foreach ($all_funktionen_oe_kurzbz as $oe_kurzbz => $funktionen_kurzbz)
|
||||
{
|
||||
foreach ($funktionen_kurzbz as $funktion_kurzbz)
|
||||
{
|
||||
$query .= " OR (zst.oe_kurzbz = '$oe_kurzbz' AND zst.funktion_kurzbz = '$funktion_kurzbz')";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$query .= " THEN TRUE
|
||||
ELSE FALSE
|
||||
END AS \"zustaendig\"
|
||||
FROM system.tbl_fehler_zustaendigkeiten zst
|
||||
)";
|
||||
|
||||
$query .= "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern AS \"Fehlercode extern\", datum AS \"Datum\",
|
||||
inhalt AS \"Inhalt\", inhalt_extern AS \"Inhalt extern\", iss.person_id AS \"PersonId\", iss.oe_kurzbz AS \"OE\",
|
||||
ftyp.bezeichnung_mehrsprachig[1] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[1] AS \"Fehlerstatus\",
|
||||
ftyp.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlerstatus\",
|
||||
verarbeitetvon AS \"Verarbeitet von\",verarbeitetamum AS \"Verarbeitet am\", fr.app AS \"Applikation\",
|
||||
fr.fehlertyp_kurzbz as \"Fehlertypcode\", iss.status_kurzbz AS \"Statuscode\",
|
||||
pers.vorname AS \"Vorname\", pers.nachname AS \"Nachname\"
|
||||
fr.fehlertyp_kurzbz AS \"Fehlertypcode\", iss.status_kurzbz AS \"Statuscode\",
|
||||
pers.vorname AS \"Vorname\", pers.nachname AS \"Nachname\",
|
||||
CASE
|
||||
WHEN
|
||||
EXISTS(SELECT 1
|
||||
FROM zustaendigkeiten
|
||||
WHERE fehlercode = iss.fehlercode
|
||||
AND zustaendig = TRUE) /* If Zuständigkeit is defined for the oe/person, zustaendig. */
|
||||
THEN 'Ja'
|
||||
WHEN
|
||||
EXISTS(SELECT 1
|
||||
FROM zustaendigkeiten
|
||||
WHERE fehlercode = iss.fehlercode
|
||||
AND zustaendig = FALSE) /* If Zuständigkeit is defined for different oe/person, not zustaendig. */
|
||||
THEN 'Nein'
|
||||
ELSE 'Ja' /* If no Zuständigkeit defined, zustaendig by default. */
|
||||
END AS \"Hauptzuständig\"
|
||||
FROM system.tbl_issue iss
|
||||
JOIN system.tbl_fehler fr USING (fehlercode)
|
||||
JOIN system.tbl_fehlertyp ftyp USING (fehlertyp_kurzbz)
|
||||
JOIN system.tbl_issue_status stat USING (status_kurzbz)
|
||||
LEFT JOIN public.tbl_person pers ON iss.person_id = pers.person_id
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM system.tbl_fehler_zustaendigkeiten zst
|
||||
WHERE EXISTS ( /* if oe or person is specified in fehler_zustaendigkeiten */
|
||||
SELECT 1 FROM zustaendigkeiten
|
||||
WHERE fehlercode = iss.fehlercode
|
||||
AND (
|
||||
person_id = ".$PERSON_ID." /* person_id in fehler_zustaendigkeit for individual persons */";
|
||||
|
||||
if (!isEmptyArray($all_funktionen_oe_kurzbz))
|
||||
{
|
||||
$query .= " OR (zst.oe_kurzbz IN $ALL_FUNKTIONEN_OE_KURZBZ AND zst.funktion_kurzbz IS NULL) /* if oe is specified in fehler_zustaendigkeiten */";
|
||||
|
||||
// check for each oe for each function if zustaendig
|
||||
foreach ($all_funktionen_oe_kurzbz as $oe_kurzbz => $funktionen_kurzbz)
|
||||
{
|
||||
foreach ($funktionen_kurzbz as $funktion_kurzbz)
|
||||
{
|
||||
$query .= " OR (zst.oe_kurzbz = '$oe_kurzbz' AND zst.funktion_kurzbz = '$funktion_kurzbz')";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$query .= "))"; // close AND of exists, and exists
|
||||
AND zustaendig = TRUE)";
|
||||
|
||||
// show issue if it is assigend to oe of logged in user or to student of oe of logged in user
|
||||
if (!isEmptyArray($all_oe_kurzbz_berechtigt))
|
||||
@@ -92,22 +116,23 @@ $filterWidgetArray = array(
|
||||
'checkboxes' => 'issue_id',
|
||||
'columnsAliases' => array(
|
||||
'ID',
|
||||
'Fehlercode',
|
||||
'Fehlercode extern',
|
||||
'Datum',
|
||||
'Inhalt',
|
||||
'Inhalt extern',
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlercode')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlercodeExtern')),
|
||||
ucfirst($this->p->t('global', 'datum')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'inhalt')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'inhaltExtern')),
|
||||
'PersonId',
|
||||
'OE',
|
||||
'Fehlertyp',
|
||||
'Fehlerstatus',
|
||||
'Verarbeitet von',
|
||||
'Verarbeitet am',
|
||||
'Applikation',
|
||||
'Fehlertypcode',
|
||||
'Statuscode',
|
||||
'Vorname',
|
||||
'Nachname'
|
||||
ucfirst($this->p->t('lehre', 'organisationseinheit')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlertyp')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlerstatus')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'verarbeitetVon')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'verarbeitetAm')),
|
||||
ucfirst($this->p->t('global', 'applikation')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlertypcode')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'statuscode')),
|
||||
ucfirst($this->p->t('person', 'vorname')),
|
||||
ucfirst($this->p->t('person', 'nachname')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'hauptzustaendig'))
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
<?php FilterWidget::loadViewSelectFilters(); ?>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Filter save options -->
|
||||
<div>
|
||||
<?php FilterWidget::loadViewSaveFilter(); ?>
|
||||
|
||||
@@ -1,17 +1,28 @@
|
||||
<div class="up-down-border">
|
||||
|
||||
<br>
|
||||
<div>
|
||||
<span class="filter-span-label">
|
||||
<?php echo ucfirst($this->p->t('filter', 'filterHinzufuegen')); ?>:
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<select id="addFilter" class="drop-down-filters"></select>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div id="appliedFilters"></div>
|
||||
|
||||
<div class="margin-left-25">
|
||||
<span>
|
||||
<input id="applyFilter" type="button" value="<?php echo ucfirst($this->p->t('filter', 'filterApply')); ?>">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div id="appliedFilters"></div>
|
||||
|
||||
<div>
|
||||
<span class="filter-span-label">
|
||||
<?php echo ucfirst($this->p->t('filter', 'filterHinzufuegen')); ?>:
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<select id="addFilter" class="drop-down-filters"></select>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<input id="applyFilter" type="button" value="<?php echo ucfirst($this->p->t('global', 'hinzufuegen')); ?>">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user