From 643291a8452fef350361af6e683b5a49a96e851a Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Fri, 15 Jul 2016 11:56:34 +0200 Subject: [PATCH] Fix condition --- main/inc/lib/usermanager.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main/inc/lib/usermanager.lib.php b/main/inc/lib/usermanager.lib.php index 54e869ce12..b801f3a263 100755 --- a/main/inc/lib/usermanager.lib.php +++ b/main/inc/lib/usermanager.lib.php @@ -2427,7 +2427,6 @@ class UserManager $ignore_visibility_for_admins ); - // Course Coach session visibility. $blockedCourseCount = 0; $closedVisibilityList = array( @@ -2437,14 +2436,14 @@ class UserManager foreach ($courseList as $course) { // Checking session visibility - $visibility = api_get_session_visibility( + $sessionCourseVisibility = api_get_session_visibility( $session_id, $course['real_id'], $ignore_visibility_for_admins ); $courseIsVisible = !in_array($course['visibility'], $closedVisibilityList); - if ($courseIsVisible == false || $visibility == SESSION_INVISIBLE) { + if ($courseIsVisible === false || $sessionCourseVisibility == SESSION_INVISIBLE) { $blockedCourseCount++; } }