diff --git a/application/libraries/AntragLib.php b/application/libraries/AntragLib.php
index a026ce19f..5d3560cbc 100644
--- a/application/libraries/AntragLib.php
+++ b/application/libraries/AntragLib.php
@@ -1511,6 +1511,32 @@ class AntragLib
if (hasData($result)) {
$kontakt = current(getData($result));
$email = $kontakt->kontakt;
+
+ $sem_not_allowed = $sem_to_repeat = '';
+ $list_not_allowed = $list_to_repeat = $this->_ci->p->t('studierendenantrag', 'mail_part_error_no_lvs');
+
+ $result = $this->getLvsForAntrag($antrag_id);
+ if (hasData($result)) {
+ $lvs = getData($result);
+ foreach ($lvs as $semester => $lv_list) {
+ $lvs_filtered = array_filter($lv_list, function ($el) {
+ return $el->antrag_zugelassen;
+ });
+ if (substr($semester, 0, 1) == '1') {
+ $sem_not_allowed = substr($semester, 1);
+ $list_not_allowed = array_map(function ($el) {
+ return $el->bezeichnung . '(' . $el->lehrform_kurzbz . ')';
+ }, $lvs_filtered);
+ $list_not_allowed = '
- ' . implode('
- ', $list_not_allowed) . '
';
+ } else {
+ $sem_to_repeat = substr($semester, 1);
+ $list_to_repeat = array_map(function ($el) {
+ return $el->bezeichnung . '(' . $el->lehrform_kurzbz . ')';
+ }, $lvs_filtered);
+ $list_to_repeat = '- ' . implode('
- ', $list_to_repeat) . '
';
+ }
+ }
+ }
// NOTE(chris): Sancho mail
sendSanchoMail(
@@ -1520,7 +1546,11 @@ class AntragLib
'stg' => $stg->bezeichnung,
'sem' => $semester,
'mitarbeiter' => $mitarbeiter,
- 'name' => $student
+ 'student' => $student,
+ 'sem_not_allowed' => $sem_not_allowed,
+ 'list_not_allowed' => $list_not_allowed,
+ 'sem_to_repeat' => $sem_to_repeat,
+ 'list_to_repeat' => $list_to_repeat
],
$email,
$this->_ci->p->t('studierendenantrag', 'mail_subject_W_Student')
diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php
index c86d51d81..b395c3e74 100644
--- a/system/phrasesupdate.php
+++ b/system/phrasesupdate.php
@@ -20746,6 +20746,26 @@ array(
)
)
),
+ array(
+ 'app' => 'core',
+ 'category' => 'studierendenantrag',
+ 'phrase' => 'mail_part_error_no_lvs',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Keine Lehrveranstaltungen gefunden',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'No courses found',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
array(
'app' => 'core',
'category' => 'studierendenantrag',