From 4a1217832d71ba8b3b5c874af70f7b92feb5a20b Mon Sep 17 00:00:00 2001 From: Dennis Benz Date: Tue, 19 Nov 2024 13:43:00 +0100 Subject: [PATCH] Fix missing course acls in studio upload --- bootstrap.php | 2 +- bootstrap_migrations.php | 2 +- cronjobs/opencast_worker.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index 96726b58..4b1b5fbc 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -20,7 +20,7 @@ StudipAutoloader::addAutoloadPath(__DIR__ . '/lib', 'Opencast'); // adding observer +NotificationCenter::addObserver('Opencast\Models\Videos', 'addToCoursePlaylist', 'OpencastCourseSync'); NotificationCenter::addObserver('Opencast\Models\Videos', 'parseEvent', 'OpencastVideoSync'); NotificationCenter::addObserver('Opencast\Models\Videos', 'checkEventACL', 'OpencastVideoSync'); -NotificationCenter::addObserver('Opencast\Models\Videos', 'addToCoursePlaylist', 'OpencastVideoSync'); NotificationCenter::addObserver('Opencast\Models\VideosUserPerms', 'setPermissions', 'OpencastVideoSync'); diff --git a/bootstrap_migrations.php b/bootstrap_migrations.php index d4b43777..c8336e37 100644 --- a/bootstrap_migrations.php +++ b/bootstrap_migrations.php @@ -11,7 +11,7 @@ StudipAutoloader::addAutoloadPath(__DIR__ . '/lib', 'Opencast'); // adding observer +NotificationCenter::addObserver('Opencast\Models\Videos', 'addToCoursePlaylist', 'OpencastCourseSync'); NotificationCenter::addObserver('Opencast\Models\Videos', 'parseEvent', 'OpencastVideoSync'); NotificationCenter::addObserver('Opencast\Models\Videos', 'checkEventACL', 'OpencastVideoSync'); -NotificationCenter::addObserver('Opencast\Models\Videos', 'addToCoursePlaylist', 'OpencastVideoSync'); NotificationCenter::addObserver('Opencast\Models\VideosUserPerms', 'setPermissions', 'OpencastVideoSync'); diff --git a/cronjobs/opencast_worker.php b/cronjobs/opencast_worker.php index 14cfefed..d200e588 100644 --- a/cronjobs/opencast_worker.php +++ b/cronjobs/opencast_worker.php @@ -115,7 +115,8 @@ public function execute($last_result, $parameters = array()) // task is done, delete it $task->delete(); - // send out Notification for video discovery plugins to react + // send out Notifications for video discovery plugins to react + NotificationCenter::postNotification('OpencastCourseSync', $event, $video); NotificationCenter::postNotification('OpencastVideoSync', $event, $video); } else { // event is missing or has no publications.