diff --git a/application/controllers/jobs/AnrechnungJob.php b/application/controllers/jobs/AnrechnungJob.php
index f92410dbc..f32a8268a 100644
--- a/application/controllers/jobs/AnrechnungJob.php
+++ b/application/controllers/jobs/AnrechnungJob.php
@@ -188,7 +188,7 @@ class AnrechnungJob extends JOB_Controller
$studiengang_bezeichnung = $this->StudiengangModel->load($studiengang_kz)->retval[0]->stg_bezeichnung;
// Get STGL mail address
- list ($to, $vorname) = self::_getSTGLMailAddress($studiengang_kz);
+ $stglMailReceiver_arr = self::_getSTGLMailAddress($studiengang_kz);
// Get HTML table with new Anrechnungen of that STG plus amount of them
list ($anrechnungen_amount, $anrechnungen_table) = self::_getSTGLMailDataTable($studiengang_kz, $anrechnungen);
@@ -199,22 +199,25 @@ class AnrechnungJob extends JOB_Controller
CIS_ROOT. 'cis/menu.php?content_id=&content='.
CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI;
+ foreach ($stglMailReceiver_arr as $stgl)
+ {
// Prepare mail content
- $body_fields = array(
- 'vorname' => $vorname,
- 'studiengang' => $studiengang_bezeichnung,
- 'anzahl' => $anrechnungen_amount,
- 'datentabelle' => $anrechnungen_table,
- 'link' => anchor($url, 'Anrechnungsanträge Übersicht')
- );
-
- // Send mail
- sendSanchoMail(
- 'AnrechnungAntragStellen',
- $body_fields,
- $to,
- 'Anerkennung nachgewiesener Kenntnisse: Neuer Antrag wurde gestellt'
- );
+ $body_fields = array(
+ 'vorname' => $stgl['vorname'],
+ 'studiengang' => $studiengang_bezeichnung,
+ 'anzahl' => $anrechnungen_amount,
+ 'datentabelle' => $anrechnungen_table,
+ 'link' => anchor($url, 'Anrechnungsanträge Übersicht')
+ );
+
+ // Send mail
+ sendSanchoMail(
+ 'AnrechnungAntragStellen',
+ $body_fields,
+ $stgl['to'],
+ 'Anerkennung nachgewiesener Kenntnisse: Neuer Antrag wurde gestellt'
+ );
+ }
}
$this->logInfo('SUCCEDED: Sending emails to STGL about yesterdays new Anrechnungen succeded.');
@@ -342,15 +345,21 @@ html;
// Get STGL mail address
private function _getSTGLMailAddress($studiengang_kz)
{
+ $stglMailAdress_arr = array();
$result = $this->StudiengangModel->getLeitung($studiengang_kz);
// Get STGL mail address
if (hasData($result))
{
- return array(
- $result->retval[0]->uid. '@'. DOMAIN,
- $result->retval[0]->vorname
- );
+ foreach (getData($result) as $stgl)
+ {
+ $stglMailAdress_arr[]= array(
+ 'to' => $stgl->uid. '@'. DOMAIN,
+ 'vorname' => $stgl->vorname
+ );
+ }
+
+ return $stglMailAdress_arr;
}
// If not available, get assistance mail address
else
diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php
index 8982b9970..8e1b601aa 100644
--- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php
+++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php
@@ -412,28 +412,31 @@ class approveAnrechnungDetail extends Auth_Controller
{
$result = $this->AnrechnungModel->load($anrechnung_id);
- if(!$result = getData($result)[0])
+ if(!hasData($result))
{
show_error('Failed loading Anrechnung');
}
-
+
$result = $this->LehrveranstaltungModel->loadWhere(array(
- 'lehrveranstaltung_id' => $result->lehrveranstaltung_id
+ 'lehrveranstaltung_id' => getData($result)[0]->lehrveranstaltung_id
));
- if(!$result = getData($result)[0])
+ if(!hasData($result))
{
show_error('Failed loading Lehrveranstaltung');
}
// Get STGL
- $result = $this->StudiengangModel->getLeitung($result->studiengang_kz);
-
- if($result = getData($result)[0])
+ $result = $this->StudiengangModel->getLeitung(getData($result)[0]->studiengang_kz);
+
+ if (hasData($result))
{
- if ($result->uid == $this->_uid)
+ foreach (getData($result) as $stgl)
{
- return;
+ if ($stgl->uid == $this->_uid)
+ {
+ return;
+ }
}
}
diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php
index d59d97514..25c802caf 100644
--- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php
+++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php
@@ -285,11 +285,14 @@ class approveAnrechnungUebersicht extends Auth_Controller
// Get STGL
$result = $this->StudiengangModel->getLeitung($result->studiengang_kz);
- if($result = getData($result)[0])
+ if (hasData($result))
{
- if ($result->uid == $this->_uid)
+ foreach (getData($result) as $stgl)
{
- return;
+ if ($stgl->uid == $this->_uid)
+ {
+ return;
+ }
}
}
@@ -376,23 +379,24 @@ class approveAnrechnungUebersicht extends Auth_Controller
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
$result = $this->LehrveranstaltungModel->getLecturersByLv($anrechnung['studiensemester_kurzbz'], $anrechnung['lehrveranstaltung_id']);
- if (!$result = getData($result))
+ if (!hasData($result))
{
show_error('Failed retrieving lectors of Lehrveranstaltung');
}
+ $lecturersByLv = getData($result);
+
// Check if lv has LV-Leitung
- $key = array_search(true, array_column($result, 'lvleiter'));
-
+ $key = array_search(true, array_column($lecturersByLv, 'lvleiter'));
// If lv has LV-Leitung, keep only the one
if ($key !== false)
{
- $lector_arr[]= $result[$key];
+ $lector_arr[]= $lecturersByLv[$key];
}
// ...otherwise keep all lectors
else
{
- $lector_arr = array_merge($lector_arr, $result);
+ $lector_arr = array_merge($lector_arr, $lecturersByLv);
}
}
diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php
index 45a770cf5..bc886a876 100644
--- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php
+++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php
@@ -80,7 +80,7 @@ class requestAnrechnung extends Auth_Controller
$prestudent_id = getData($result)[0]->prestudent_id;
// Check if application deadline is expired
- $is_expired = self::_checkAntragDeadline(
+ $is_expired = self::_isExpired(
$this->config->item('submit_application_start'),
$this->config->item('submit_application_end'),
$studiensemester_kurzbz
@@ -226,10 +226,10 @@ class requestAnrechnung extends Auth_Controller
* @param $start Start date for application submission.
* @param $ende End date for application submission.
* @param $studiensemester_kurzbz
- * @return bool True if today is not during the start- and ending deadlines (= if is expired)
+ * @return bool True if deadline is expired
* @throws Exception
*/
- private function _checkAntragDeadline($start, $ende, $studiensemester_kurzbz)
+ private function _isExpired($start, $ende, $studiensemester_kurzbz)
{
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
@@ -253,8 +253,8 @@ class requestAnrechnung extends Auth_Controller
$start = new DateTime($start);
$ende = new DateTime($ende);
- // True if today is not during the start- and ending deadlines (= if is expired)
- return ($today <= $start || $today >= $ende);
+ // True if expired
+ return ($today < $start || $today > $ende);
}
/**
@@ -324,8 +324,8 @@ class requestAnrechnung extends Auth_Controller
private function _LVhasBlockingGrades($studiensemester_kurzbz, $lehrveranstaltung_id)
{
// Get Note of Lehrveranstaltung
- $this->load->model('education/Lvgesamtnote_model', 'LvgesamtnoteModel');
- $result = $this->LvgesamtnoteModel->load(array(
+ $this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
+ $result = $this->ZeugnisnoteModel->load(array(
'student_uid' => $this->_uid,
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'lehrveranstaltung_id' => $lehrveranstaltung_id
diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php
index 9e68c5cb8..a69a43220 100644
--- a/application/controllers/system/infocenter/InfoCenter.php
+++ b/application/controllers/system/infocenter/InfoCenter.php
@@ -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
+ )
+ );
+ }
}
/**
diff --git a/application/libraries/VorlageLib.php b/application/libraries/VorlageLib.php
index 9679dff1c..d8d443a41 100644
--- a/application/libraries/VorlageLib.php
+++ b/application/libraries/VorlageLib.php
@@ -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;
diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php
index 2d8ac4a7e..5db9a98f1 100644
--- a/application/models/crm/Prestudent_model.php
+++ b/application/models/crm/Prestudent_model.php
@@ -665,4 +665,5 @@ class Prestudent_model extends DB_Model
return $this->execQuery($query, array($prestudent_id));
}
+
}
diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php
index 95e383569..f7446895c 100644
--- a/application/views/system/infocenter/dokpruefung.php
+++ b/application/views/system/infocenter/dokpruefung.php
@@ -22,7 +22,7 @@
titel) ? $dokument->bezeichnung : $dokument->titel ?>
- |