6declare(strict_types=1);
11 const ID =
'prg_user_risky_to_fail';
33 $this->log =
$DIC[
'ilLog'];
34 $this->lng =
$DIC[
'lng'];
35 $this->lng->loadLanguageModule(
'prg');
45 return $this->lng->txt(
'prg_user_risky_to_fail_title');
55 return $this->lng->txt(
'prg_user_risky_to_fail_desc');
117 foreach ($this->user_progress_db->getRiskyToFailInstances() as $progress) {
119 $auto_mail_settings = $progress->getStudyProgramme()->getAutoMailSettings();
120 $remind_days = $auto_mail_settings->getProcessingEndsNotSuccessfulDays();
122 if (is_null($remind_days)) {
126 $check_date =
new DateTime();
127 $check_date->sub(
new DateInterval(
'P' . $remind_days .
'D'));
128 if ($progress->getDeadline()->format(
'Y-m-d') < $check_date->format(
'Y-m-d')) {
132 $progress->informUserForRiskToFail();
134 $this->log->write(
'an error occured: ' .
$e->getMessage());
An exception for terminatinating execution or to throw for unit testing.
Cron job result data container.
Cron job application base class.
const SCHEDULE_TYPE_IN_DAYS
Base class for ILIAS Exception handling.
getDefaultScheduleType()
Get schedule type.
getDefaultScheduleValue()
Get schedule value.
hasFlexibleSchedule()
Can the schedule be configured?
hasAutoActivation()
Is to be activated on "installation".
getDescription()
Get description.