@@ -39,19 +39,15 @@ class ilCmiXapiDelCron extends ilCronJob
3939
4040 private \ILIAS \DI \Container $ dic ;
4141
42- public function __construct ()
42+ public function init (): void
4343 {
44- global $ DIC ; /* @var \ILIAS\DI\Container $DIC */
45- $ this ->dic = $ DIC ;
46-
47- $ DIC ->language ()->loadLanguageModule ('cmix ' );
48-
49- $ this ->log = ilLoggerFactory::getLogger ('cmix ' );
44+ $ this ->lng ->loadLanguageModule ('cmix ' );
45+ $ this ->log = $ this ->logger_factory ->getLogger ('cmix ' );
5046
5147 $ settings = new ilSetting (self ::JOB_ID );
5248 $ lrsTypeId = $ settings ->get ('lrs_type_id ' , '0 ' );
5349
54- if ($ lrsTypeId ) {
50+ if ($ lrsTypeId ) {
5551 $ this ->lrsType = new ilCmiXapiLrsType ((int ) $ lrsTypeId );
5652 } else {
5753 $ this ->lrsType = null ;
@@ -67,12 +63,12 @@ public function getId(): string
6763
6864 public function getTitle (): string
6965 {
70- return $ this ->dic -> language () ->txt ("cron_xapi_del " );
66+ return $ this ->lng ->txt ("cron_xapi_del " );
7167 }
7268
7369 public function getDescription (): string
7470 {
75- return $ this ->dic -> language () ->txt ("cron_xapi_del_desc " );
71+ return $ this ->lng ->txt ("cron_xapi_del_desc " );
7672 }
7773
7874 /**
@@ -224,7 +220,7 @@ public function run(): ilCronJobResult
224220 $ deletedObjectData = array ();
225221 $ allDone = true ;
226222 foreach ($ newDeletedObjects as $ deletedObject ) {
227- $ this ->log ->debug ("delete for " . (string )$ deletedObject ['obj_id ' ]);
223+ $ this ->log ->debug ("delete for " . (string ) $ deletedObject ['obj_id ' ]);
228224 // set object to updated
229225 $ this ->model ->setXapiObjAsUpdated ($ deletedObject ['obj_id ' ]);
230226 // delete data
@@ -239,7 +235,7 @@ public function run(): ilCronJobResult
239235 // entry in xxcf_users is already deleted from ilXapiCmi5StatementsDeleteRequest
240236 // delete in obj_id from xxcf_data_settings
241237 if ($ done ) {
242- $ this ->log ->debug ("deleted data for object: " . (string )$ deletedObject ['obj_id ' ]);
238+ $ this ->log ->debug ("deleted data for object: " . (string ) $ deletedObject ['obj_id ' ]);
243239 $ deletedObjectData [] = $ deletedObject ['obj_id ' ];
244240 $ this ->model ->deleteXapiObjectEntry ($ deletedObject ['obj_id ' ]);
245241 } else {
0 commit comments