3 declare(strict_types=1);
35 $this->
lng->loadLanguageModule(
"prg");
36 $this->
lng->loadLanguageModule(
"mail");
45 $ass = $prg->getSpecificAssignment($assignment_id);
56 $gender = $user_info->getGender() ?:
'anonymous';
57 $name = $user_info->getFullname();
58 $login = $user_info->getLogin();
62 $this->
lng->txt(
"mail_salutation_" . $gender),
69 $mail->enqueue($login,
'',
'', $subject, $body, []);
72 $this->log->write($e->getMessage());
81 if (! $prg->getSettings()->getAutoMailSettings()->getReminderNotRestartedByUserDays() > 0) {
82 $this->log->write(
"Send info to re-assign mail is deactivated in study programme settings");
86 $subject = $this->
lng->txt(
"info_to_re_assign_mail_subject");
87 $body_template = $this->
lng->txt(
"info_to_re_assign_mail_body");
88 $sent = $this->
sendMail($prg, $ass, $subject, $body_template);
91 $prg->storeExpiryInfoSentFor($ass);
98 $now = new \DateTimeImmutable();
99 $vq = $ass->getProgressTree()->getValidityOfQualification();
101 if ($vq && $vq > $now) {
102 $prg->resetExpiryInfoSentFor($ass);
110 if (! $prg->getSettings()->getAutoMailSettings()->getProcessingEndsNotSuccessfulDays() > 0) {
111 $this->log->write(
"Send risky to fail mail is deactivated in study programme settings");
115 $subject = $this->
lng->txt(
"risky_to_fail_mail_subject");
116 $body_template = $this->
lng->txt(
"risky_to_fail_mail_body");
117 $sent = $this->
sendMail($prg, $ass, $subject, $body_template);
120 $prg->storeRiskyToFailSentFor($ass);
127 $now = new \DateTimeImmutable();
128 $deadline = $ass->getProgressTree()->getDeadline();
129 if ($deadline && $deadline > $now) {
130 $prg->resetRiskyToFailSentFor($ass);
138 if (! $prg->getSettings()->getAutoMailSettings()->getSendReAssignedMail()) {
139 $this->log->write(
"Send re assign mail is deactivated in study programme settings");
143 $subject = $this->
lng->txt(
"re_assigned_mail_subject");
144 $body_template = $this->
lng->txt(
"re_assigned_mail_body");
145 $sent = $this->
sendMail($prg, $ass, $subject, $body_template);
sendReAssignedMail(int $assignment_id, int $root_prg_id)
resetRiskyToFailSentFor(int $assignment_id, int $root_prg_id)
Component logger with individual log levels by component id.
__construct(ilComponentLogger $log, ilLanguage $lng)
resetExpiryInfoSentFor(int $assignment_id, int $root_prg_id)
sendMail(ilObjStudyProgramme $prg, ilPRGAssignment $assignment, string $subject, string $body_template)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAssignmentAndProgramme(int $assignment_id, int $root_prg_id)
static getInstanceByObjId(int $obj_id)
sendInformToReAssignMail(int $assignment_id, int $root_prg_id)
sendRiskyToFailMail(int $assignment_id, int $root_prg_id)
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...