3 declare(strict_types=1);
30 private const ID =
'prg_invalidate_expired_progresses';
40 $this->log = $DIC[
'ilLog'];
41 $this->
lng = $DIC[
'lng'];
42 $this->
lng->loadLanguageModule(
'prg');
45 $this->assignment_repo =
$dic[
'repo.assignment'];
46 $this->settings_repo =
$dic[
'model.Settings.ilStudyProgrammeSettingsRepository'];
51 return $this->
lng->txt(
'prg_invalidate_expired_progresses_title');
56 return $this->
lng->txt(
'prg_invalidate_expired_progresses_desc');
76 return self::SCHEDULE_TYPE_IN_DAYS;
87 foreach ($this->assignment_repo->getExpiredAndNotInvalidated() as $assignment) {
89 $assignment = $assignment->invalidate($this->settings_repo);
90 $this->assignment_repo->store($assignment);
92 $this->log->write(
'an error occured: ' . $e->getMessage());
ilPRGAssignmentDBRepository $assignment_repo
ilStudyProgrammeSettingsDBRepository $settings_repo
Component logger with individual log levels by component id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDefaultScheduleValue()