File tree Expand file tree Collapse file tree
components/ILIAS/Exercise Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,5 +42,17 @@ public function init(
4242 new Component \Resource \ComponentJS ($ this , "ilExcPresentation.js " );
4343 $ contribute [Component \Resource \PublicAsset::class] = fn () =>
4444 new Component \Resource \ComponentJS ($ this , "ilExcPeerReview.js " );
45+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
46+ new \ilExcCronFeedbackNotification (
47+ self ::class,
48+ $ use [\ILIAS \Language \Language::class],
49+ $ use [\ILIAS \Logging \LoggerFactory::class]
50+ );
51+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
52+ new \ilExcCronReminders (
53+ self ::class,
54+ $ use [\ILIAS \Language \Language::class],
55+ $ use [\ILIAS \Logging \LoggerFactory::class]
56+ );
4557 }
4658}
Original file line number Diff line number Diff line change 2626 */
2727class ilExcCronFeedbackNotification extends ilCronJob
2828{
29- protected ilLanguage $ lng ;
30-
31-
32- public function __construct ()
29+ public function init (): void
3330 {
34- global $ DIC ;
35-
36- $ this ->lng = $ DIC ->language ();
31+ $ this ->lng ->loadLanguageModule ('exc ' );
3732 }
3833
3934 public function getId (): string
@@ -43,18 +38,12 @@ public function getId(): string
4338
4439 public function getTitle (): string
4540 {
46- $ lng = $ this ->lng ;
47-
48- $ lng ->loadLanguageModule ("exc " );
49- return $ lng ->txt ("exc_global_feedback_file_cron " );
41+ return $ this ->lng ->txt ("exc_global_feedback_file_cron " );
5042 }
5143
5244 public function getDescription (): string
5345 {
54- $ lng = $ this ->lng ;
55-
56- $ lng ->loadLanguageModule ("exc " );
57- return $ lng ->txt ("exc_global_feedback_file_cron_info " );
46+ return $ this ->lng ->txt ("exc_global_feedback_file_cron_info " );
5847 }
5948
6049 public function getDefaultScheduleType (): CronJobScheduleType
Original file line number Diff line number Diff line change 2626 */
2727class ilExcCronReminders extends ilCronJob
2828{
29- protected ilLanguage $ lng ;
30-
31- public function __construct ()
29+ public function init (): void
3230 {
33- global $ DIC ;
34-
35- $ this ->lng = $ DIC ->language ();
31+ $ this ->lng ->loadLanguageModule ('exc ' );
3632 }
3733
3834 public function getId (): string
Original file line number Diff line number Diff line change 2525 <parent id =" wfld" >wfld</parent >
2626 </object >
2727 </objects >
28- <crons >
29- <cron id =" exc_feedback_notification" class =" ilExcCronFeedbackNotification" />
30- <cron id =" exc_reminders" class =" ilExcCronReminders" />
31- </crons >
3228 <mailtemplates >
3329 <context id =" exc_context_submit_rmd" class =" ilExcMailTemplateSubmitReminderContext" />
3430 <context id =" exc_context_grade_rmd" class =" ilExcMailTemplateGradeReminderContext" />
You can’t perform that action at this time.
0 commit comments