File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,5 +40,11 @@ public function init(
4040 new \ilCourseSetupAgent (
4141 $ pull [\ILIAS \Refinery \Factory::class]
4242 );
43+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
44+ new \ilTimingsCronReminder (
45+ self ::class,
46+ $ use [\ILIAS \Language \Language::class],
47+ $ use [\ILIAS \Logging \LoggerFactory::class]
48+ );
4349 }
4450}
Original file line number Diff line number Diff line change 11<?php
22
3- declare (strict_types=0 );
4-
5- use ILIAS \Cron \Schedule \CronJobScheduleType ;
6-
73/**
84 * This file is part of ILIAS, a powerful learning management system
95 * published by ILIAS open source e-Learning e.V.
2016 *
2117 *********************************************************************/
2218
19+ declare (strict_types=0 );
20+
21+ use ILIAS \Cron \Schedule \CronJobScheduleType ;
22+
2323class ilTimingsCronReminder extends ilCronJob
2424{
2525 private static array $ objects_information ;
@@ -29,21 +29,16 @@ class ilTimingsCronReminder extends ilCronJob
2929 private int $ now ;
3030
3131 protected ilLogger $ log ;
32- protected ilLanguage $ lng ;
3332 protected ilLanguage $ user_lang ;
3433 protected ilDBInterface $ db ;
3534 protected ilObjectDataCache $ obj_data_cache ;
3635
37- /**
38- * Constructor
39- */
40- public function __construct ()
36+ public function init (): void
4137 {
42- global $ DIC ;
43-
44- $ this ->log = $ DIC ->logger ()->crs ();
45- $ this ->lng = $ DIC ->language ();
4638 $ this ->lng ->loadLanguageModule ('crs ' );
39+ $ this ->log = $ this ->logger_factory ->getLogger ('crs ' );
40+
41+ global $ DIC ;
4742 $ this ->db = $ DIC ->database ();
4843 $ this ->obj_data_cache = $ DIC ['ilObjDataCache ' ];
4944
Original file line number Diff line number Diff line change 4141 <event type =" raise" id =" addSubscriber" />
4242 <event type =" raise" id =" participantHasPassedCourse" />
4343 </events >
44- <crons >
45- <cron id =" crs_timings_reminder" class =" ilTimingsCronReminder" />
46- </crons >
4744 <copage >
4845 <pageobject parent_type =" lobj" class_name =" ilLOPage" directory =" classes/Objectives" />
4946 </copage >
You can’t perform that action at this time.
0 commit comments