|
|
@ -221,6 +221,11 @@ function accessToWhoIsOnline() |
|
|
|
$user_id = api_get_user_id(); |
|
|
|
$user_id = api_get_user_id(); |
|
|
|
$course_id = api_get_course_int_id(); |
|
|
|
$course_id = api_get_course_int_id(); |
|
|
|
$access = false; |
|
|
|
$access = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (true === api_get_configuration_value('whoisonline_only_for_admin') && !api_is_platform_admin()) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ((api_get_setting('showonline', 'world') == 'true' && !$user_id) || |
|
|
|
if ((api_get_setting('showonline', 'world') == 'true' && !$user_id) || |
|
|
|
(api_get_setting('showonline', 'users') == 'true' && $user_id) || |
|
|
|
(api_get_setting('showonline', 'users') == 'true' && $user_id) || |
|
|
|
(api_get_setting('showonline', 'course') == 'true' && $user_id && $course_id) |
|
|
|
(api_get_setting('showonline', 'course') == 'true' && $user_id && $course_id) |
|
|
|