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)) ); }