send to all private email addresses marked as zustellung

This commit is contained in:
Harald Bamberger
2025-12-16 15:27:31 +01:00
parent a3b5718422
commit 4f5e49a93c
2 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ $config['wiederholung_note_nicht_zugelassen'] = 20;
* @var string A string formated as PHP DateTime modifier
* @see https://www.php.net/manual/de/datetime.modify.php
*/
$config['unterbrechung_job_remind_wiedereinstieg_date_modifier'] = '+166 days';
$config['unterbrechung_job_remind_wiedereinstieg_date_modifier'] = '+3 days';
/**
* The Job will sent a request to everyone who faild the 3rd committee exam
+9 -5
View File
@@ -265,22 +265,26 @@ class AntragJob extends JOB_Controller
$person_id = $dataPrestudent->person_id;
$this->KontaktModel->addSelect('kontakt');
$this->KontaktModel->addLimit(1);
$result = $this->KontaktModel->loadWhere([
'person_id'=> $person_id,
'zustellung' => true,
'kontakttyp' => 'email'
]);
if (hasData($result)) {
$dataKontakt = current(getData($result));
$email_student_privat = $dataKontakt->kontakt;
$email_student_privat = null;
$dataKontakt = getData($result);
if ($dataKontakt) {
$stud_private_zustell_emails = array_map(function($kontakt) {
return $kontakt->kontakt;
}, $dataKontakt);
$email_student_privat = implode(', ', $stud_private_zustell_emails);
}
$email_student_FH = $this->StudentModel->getEmailFH($this->StudentModel->getUID($antrag->prestudent_id));
//studiensemester
$result = $this->StudiensemesterModel->getByDate($datum->format('d.m.Y'));
$result = $this->StudiensemesterModel->getByDate($datum->format('Y-m-d'));
if (hasData($result)) {
$dataSem = current(getData($result));
}