Adapted STGL Views to display Fachbereichsleitung (as 'Empfaenger') after recommendation

This commit is contained in:
Cris
2022-12-06 13:33:28 +01:00
parent fe2601b29a
commit 0197e5b175
2 changed files with 30 additions and 16 deletions
@@ -33,6 +33,9 @@ class approveAnrechnungDetail extends Auth_Controller
)
);
//Load configs
$this->load->config('anrechnung');
// Load models
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
@@ -227,16 +230,18 @@ class approveAnrechnungDetail extends Auth_Controller
// Count up LV with no lector
$counter++;
// Break, if LV has no lector
break;
}
// Get Fachbereichsleitung or LV Leitung.
if($this->config->item('fbl') === TRUE)
{
$result = $this->anrechnunglib->getFachbereichleitung($anrechnung_id);
}
else
{
// If LV Leitung is not present, gets all LV lectors.
$result = $this->anrechnunglib->getLectors($anrechnung_id);
}
// Get full name of LV Leitung.
// If LV Leitung is not present, get full name of LV lectors.
$lector_arr = $this->anrechnunglib->getLectors($item['anrechnung_id']);
$empfehlungsanfrage_an = !isEmptyArray($lector_arr)
? implode(', ', array_column($lector_arr, 'fullname'))
: '';
$empfehlungsanfrage_an = !isEmptyArray($result) ? implode(', ', array_column($result, 'fullname')) : '';
// Request Recommendation
if($this->anrechnunglib->requestRecommendation($item['anrechnung_id']))
@@ -28,6 +28,9 @@ class approveAnrechnungUebersicht extends Auth_Controller
)
);
// Load configs
$this->load->config('anrechnung');
// Load models
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
@@ -207,14 +210,20 @@ class approveAnrechnungUebersicht extends Auth_Controller
// Request Recommendation
if($this->anrechnunglib->requestRecommendation($item['anrechnung_id']))
{
// Get full name of LV Leitung.
// If LV Leitung is not present, get full name of LV lectors.
$lector_arr = $this->anrechnunglib->getLectors($item['anrechnung_id']);
$empfehlungsanfrage_an = !isEmptyArray($lector_arr)
? implode(', ', array_column($lector_arr, 'fullname'))
: '';
// Get full name of Fachbereichsleitung or LV Leitung.
if($this->config->item('fbl') === TRUE)
{
$result = $this->anrechnunglib->getFachbereichleitung($item['anrechnung_id']);
}
else
{
// If LV Leitung is not present, get full name of LV lectors.
$result = $this->anrechnunglib->getLectors($item['anrechnung_id']);
}
$retval[]= array(
$empfehlungsanfrage_an = !isEmptyArray($result) ? implode(', ', array_column($result, 'fullname')) : '';
$retval[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR,
'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR),