diff --git a/main/document/download.php b/main/document/download.php index ad024d69a7..99029cd1f6 100644 --- a/main/document/download.php +++ b/main/document/download.php @@ -80,6 +80,12 @@ if (Security::check_abs_path($sys_course_path.$doc_url, $sys_course_path.'/')) { // Correct choice for usability $is_visible = DocumentManager::is_visible($doc_url, $_course, api_get_session_id()); //} + + //Documents' slideshow thumbnails + //correct $is_visible used in below and ??. Now the students can view the thumbnails too + $doc_url_thumbs = str_replace('.thumbs/.', '', $doc_url); + $is_visible = DocumentManager::is_visible($doc_url_thumbs, $_course, api_get_session_id()); + if (!api_is_allowed_to_edit() && !$is_visible) { Display::display_error_message(get_lang('ProtectedDocument'));//api_not_allowed backbutton won't work. exit; // You shouldn't be here anyway. diff --git a/main/document/slideshow.php b/main/document/slideshow.php index 7502a4f98a..37605685b1 100644 --- a/main/document/slideshow.php +++ b/main/document/slideshow.php @@ -316,7 +316,7 @@ $html_table = ''; echo '