From cfe76e09b1ffeb176408051dae936d854e7d1a52 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Mon, 7 Jul 2025 11:47:06 +0200 Subject: [PATCH] AntragJob StglSammelmail an alle Stgleiter senden --- application/controllers/jobs/AntragJob.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/application/controllers/jobs/AntragJob.php b/application/controllers/jobs/AntragJob.php index 11b950174..debcfe391 100644 --- a/application/controllers/jobs/AntragJob.php +++ b/application/controllers/jobs/AntragJob.php @@ -95,12 +95,15 @@ class AntragJob extends JOB_Controller continue; } - $leitung = current(getData($result)); - if (!isset($stgLeitungen[$leitung->uid])) + $leitungen = getData($result); + foreach ($leitungen as $leitung) { - $stgLeitungen[$leitung->uid] = [ 'Details' => $leitung, 'stgs' => [] ]; + if (!isset($stgLeitungen[$leitung->uid])) + { + $stgLeitungen[$leitung->uid] = ['Details' => $leitung, 'stgs' => []]; + } + $stgLeitungen[$leitung->uid]['stgs'][] = $antrag->studiengang_kz; } - $stgLeitungen[$leitung->uid]['stgs'][] = $antrag->studiengang_kz; $result = $this->StudierendenantragModel->getStgAndSem($antrag->studierendenantrag_id); if (isError($result))