19 declare(strict_types=1);
32 private const ID =
'prg_invalidate_expired_progresses';
42 $this->log = $DIC[
'ilLog'];
43 $this->
lng = $DIC[
'lng'];
44 $this->
lng->loadLanguageModule(
'prg');
47 $this->assignment_repo =
$dic[
'repo.assignment'];
48 $this->settings_repo =
$dic[
'model.Settings.ilStudyProgrammeSettingsRepository'];
53 return $this->
lng->txt(
'prg_invalidate_expired_progresses_title');
58 return $this->
lng->txt(
'prg_invalidate_expired_progresses_desc');
78 return CronJobScheduleType::SCHEDULE_TYPE_IN_DAYS;
89 $expired = $this->assignment_repo->getExpiredAndNotInvalidated();
91 if ($expired === []) {
96 foreach ($expired as $assignment) {
98 $assignment = $assignment->invalidate($this->settings_repo);
99 $this->assignment_repo->store($assignment);
101 $this->log->write(
'an error occured: ' . $e->getMessage());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
final const STATUS_NO_ACTION
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...
getDefaultScheduleValue()