6 declare(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');
95 return self::SCHEDULE_TYPE_IN_DAYS;
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)) {
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());
hasFlexibleSchedule()
Can the schedule be configured?
Cron job application base class.
hasAutoActivation()
Is to be activated on "installation".
getDefaultScheduleType()
Get schedule type.
getDefaultScheduleValue()
Get schedule value.
Cron job result data container.
getDescription()
Get description.