diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index a245d783b..8fed40f48 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -535,6 +535,8 @@ class approveAnrechnungDetail extends Auth_Controller * Anyway this function will receive a unique array to avoid sending more mails to one and the same lector. * **/ $lector_arr = $this->_getLectors($anrechnung_arr); + + // Send mail to lectors foreach ($lector_arr as $lector) diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index ca97ee95c..d873d7828 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -61,12 +61,14 @@ class AnrechnungLib } // Get lectors of lehrveranstaltung - $antrag_data->lektoren = array(); - if (!$lv_lektoren = getData($this->ci->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lv_id))) + $result = $this->ci->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lv_id); + if (isError($result)) { show_error('Failed loading course lectors.'); } - + + $lv_lektoren_arr = hasData($result) ? getData($result) : array(); + // Set the given studiensemester $antrag_data->lv_id = $lv_id; $antrag_data->lv_bezeichnung = $lv->bezeichnung; @@ -76,7 +78,7 @@ class AnrechnungLib $antrag_data->nachname = $person->nachname; $antrag_data->matrikelnr = $student->matrikelnr; $antrag_data->stg_bezeichnung = $studiengang->bezeichnung; - $antrag_data->lektoren = $lv_lektoren; + $antrag_data->lektoren = $lv_lektoren_arr; return $antrag_data; }