3131class ilCronFinishUnfinishedTestPasses extends ilCronJob
3232{
3333 protected readonly TestLogger $ logger ;
34-
35- protected readonly ilLanguage $ lng ;
3634 protected readonly ilDBInterface $ db ;
3735 protected readonly ilObjUser $ user ;
3836 protected readonly ilObjectDataCache $ obj_data_cache ;
@@ -43,15 +41,25 @@ class ilCronFinishUnfinishedTestPasses extends ilCronJob
4341 protected ilTestProcessLockerFactory $ processLockerFactory ;
4442 protected TestResultRepository $ test_pass_result_repository ;
4543
46- public function __construct ()
44+ public function __construct (
45+ string $ component ,
46+ \ILIAS \Language \Language $ lng ,
47+ bool $ registration = false
48+ ) {
49+ parent ::__construct ($ component , $ lng );
50+ $ this ->lng ->loadLanguageModule ('assessment ' );
51+ if (!$ registration ) {
52+ $ this ->additionalConstruct ();
53+ }
54+ }
55+
56+ private function additionalConstruct ()
4757 {
4858 /** @var ILIAS\DI\Container $DIC */
4959 global $ DIC ;
5060
5161 $ this ->logger = TestDIC::dic ()['logging.logger ' ];
52- $ this ->lng = $ DIC ['lng ' ];
5362 $ this ->user = $ DIC ['ilUser ' ];
54- $ this ->lng ->loadLanguageModule ('assessment ' );
5563 $ this ->db = $ DIC ->database ();
5664 $ this ->obj_data_cache = $ DIC ['ilObjDataCache ' ];
5765 $ this ->now = time ();
0 commit comments