3declare(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');
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());
Component logger with individual log levels by component id.
const SCHEDULE_TYPE_IN_DAYS
@depracated This will be replaced with an ENUM in ILIAS 9
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()
ilStudyProgrammeSettingsDBRepository $settings_repo
ilPRGAssignmentDBRepository $assignment_repo
hasAutoActivation()
Is to be activated on "installation", does only work for ILIAS core cron jobs.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...