From cc1759d1f29a6a56cf51a5743e979e9319b84886 Mon Sep 17 00:00:00 2001 From: Luka Stocker Date: Thu, 19 Dec 2024 16:44:37 +0100 Subject: [PATCH] LSO: 43208, fix sending a globalScreen message after completing a learning sequence. https://mantis.ilias.de/view.php?id=43208 --- .../class.ilLSCompletionNotificationProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/ILIAS/LearningSequence/classes/GlobalScreen/class.ilLSCompletionNotificationProvider.php b/components/ILIAS/LearningSequence/classes/GlobalScreen/class.ilLSCompletionNotificationProvider.php index 9f7216cce918..d81a9ecf1831 100755 --- a/components/ILIAS/LearningSequence/classes/GlobalScreen/class.ilLSCompletionNotificationProvider.php +++ b/components/ILIAS/LearningSequence/classes/GlobalScreen/class.ilLSCompletionNotificationProvider.php @@ -32,7 +32,7 @@ public function getNotifications(): array { $current_user = $this->dic['ilUser']; - if ($current_user->getId() === 0 || $current_user->isAnonymous()) { + if ($current_user->getId() === 0 || $current_user->isAnonymous()) { return []; } @@ -55,7 +55,7 @@ public function getNotifications(): array $lng->loadLanguageModule('lso'); - $group = $this->globalScreen()->notifications()->factory()->standardGroup( + $group = $this->globalScreen()->notifications()->factory()->standardGroup( $this->if->identifier('lso_bucket_group') ) ->withTitle($lng->txt('obj_lso')); @@ -70,7 +70,6 @@ public function getNotifications(): array $this->if->identifier('lso_bucket') ) ->withNotificationItem($notification_item) - ->withNewAmount(count($notifications)) ->withClosedCallable( function () use ($current_user, $osd_notification_handler): void { $current_user->writePref(self::NOTIFICATION_TIME_PREFERENCE_KEY, (string) time()); @@ -80,6 +79,7 @@ function () use ($current_user, $osd_notification_handler): void { ); } ) + ->withNewAmount(count($notifications)) ); }