Skip to content

Commit c293f4d

Browse files
committed
Component/Survey: contribute cron jobs
1 parent 080b5df commit c293f4d

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

components/ILIAS/Survey/Survey.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,11 @@ public function init(
3434
): void {
3535
$contribute[Component\Resource\PublicAsset::class] = fn() =>
3636
new Component\Resource\ComponentCSS($this, "survey.css");
37+
$contribute[\ILIAS\Cron\CronJob::class] = static fn() =>
38+
new \ilSurveyCronNotification(
39+
self::class,
40+
$use[\ILIAS\Language\Language::class],
41+
$use[\ILIAS\Logging\LoggerFactory::class]
42+
);
3743
}
3844
}

components/ILIAS/Survey/classes/class.ilSurveyCronNotification.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,11 @@
2626
*/
2727
class ilSurveyCronNotification extends ilCronJob
2828
{
29-
protected ilLanguage $lng;
3029
protected ilTree $tree;
3130

32-
public function __construct()
31+
public function init(): void
3332
{
3433
global $DIC;
35-
36-
$this->lng = $DIC->language();
3734
if (isset($DIC["tree"])) {
3835
$this->tree = $DIC->repositoryTree();
3936
}

components/ILIAS/Survey/module.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
<parent id="adm" max="1">adm</parent>
2222
</object>
2323
</objects>
24-
<crons>
25-
<cron id="survey_notification" class="ilSurveyCronNotification" />
26-
</crons>
2724
<mailtemplates>
2825
<context id="svy_context_rmd" class="ilSurveyMailTemplateReminderContext" />
2926
<context id="svy_rater_inv" class="ilSurveyMailTemplateRaterInvitationContext" />

0 commit comments

Comments
 (0)