File tree Expand file tree Collapse file tree
components/ILIAS/LTIProvider Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,5 +39,12 @@ public function init(
3939
4040 $ contribute [Component \Resource \PublicAsset::class] = fn () =>
4141 new Component \Resource \Endpoint ($ this , "lti.php " );
42+
43+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
44+ new \ilLTICronOutcomeService (
45+ 'components \\' . self ::class,
46+ $ use [\ILIAS \Language \Language::class],
47+ true
48+ );
4249 }
4350}
Original file line number Diff line number Diff line change 2828 */
2929class ilLTICronOutcomeService extends ilCronJob
3030{
31- private ilLanguage $ lng ;
3231 private ilCronJobRepository $ cronRepo ;
3332
34- public function __construct ()
33+ public function __construct (
34+ string $ component ,
35+ \ILIAS \Language \Language $ lng ,
36+ bool $ registration = false
37+ ) {
38+ parent ::__construct ($ component , $ lng );
39+ $ this ->lng ->loadLanguageModule ('lti ' );
40+ if (!$ registration ) {
41+ $ this ->additionalConstruct ();
42+ }
43+ }
44+
45+ private function additionalConstruct ()
3546 {
3647 global $ DIC ;
37- $ this ->lng = $ DIC ->language ();
38- $ this ->lng ->loadLanguageModule ("lti " );
3948 $ this ->cronRepo = $ DIC ->cron ()->repository ();
4049 }
4150
Original file line number Diff line number Diff line change 1313 <event type =" listen" id =" components/ILIAS/User" />
1414
1515 </events >
16- <crons >
17- <cron id =" lti_outcome" class =" ilLTICronOutcomeService" />
18- </crons >
1916 <logging />
2017</service >
You can’t perform that action at this time.
0 commit comments