Modified to request recommendation (+send mails) ONLY if LV has lectors

Modifications done for STGL Overview and Detailview

Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
Cris
2021-03-24 16:22:56 +01:00
committed by cris-technikum
parent 3a0720e4de
commit 683e9ffdda
6 changed files with 125 additions and 48 deletions
+20 -2
View File
@@ -464,7 +464,7 @@ class AnrechnungLib
|| $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED
|| $status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR)
{
return success(false); // dont ask for recommendation
return false; // dont ask for recommendation
}
// Start DB transaction
@@ -494,7 +494,7 @@ class AnrechnungLib
return error($result->msg, EXIT_ERROR);
}
return success(true); // recommended
return true; // recommended
}
/**
@@ -639,6 +639,24 @@ class AnrechnungLib
// Return filename
return 'Anrechnungsantrag'. $orgform_kurzbz .'_LV-'. $lehrveranstaltung_id. '_'. $fullname;
}
public function LVhasLector($anrechnung_id)
{
$result = $this->ci->AnrechnungModel->load($anrechnung_id);
if (!hasData($result))
{
showError('Anrechnung existiert nicht');
}
// Get lectors of lehrveranstaltung
$result = $this->ci->LehrveranstaltungModel->getLecturersByLv(
$result->retval[0]->studiensemester_kurzbz,
$result->retval[0]->lehrveranstaltung_id
);
// Continue, if LV has no lector (there is no one to ask for recommendation)
return hasData($result) ? true : false;
}
// Return an object with Anrechnungdata
private function _setAnrechnungDataObject($anrechnung)