diff --git a/main/inc/lib/sessionmanager.lib.php b/main/inc/lib/sessionmanager.lib.php index 0f6303e07c..437e4e476f 100755 --- a/main/inc/lib/sessionmanager.lib.php +++ b/main/inc/lib/sessionmanager.lib.php @@ -3808,7 +3808,13 @@ class SessionManager CourseManager::unsubscribe_user($teacher['user_id'], $course_code); } } - CourseManager::subscribe_user($teacherToAdd, $course_code, COURSEMANAGER); + foreach ($teacherToAdd as $teacherId) { + CourseManager::subscribe_user( + $teacherId, + $course_code, + COURSEMANAGER + ); + } } }