From 3a3bc2a13be8b50e23abefda8675d10a6f6ca77e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?= Date: Thu, 12 Jul 2012 23:09:45 +0200 Subject: [PATCH] #5142 fix students' thumbnail view in slideshow --- main/document/download.php | 6 ++++++ main/document/slideshow.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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 ''; $i = 0; $count_image = count($image_tag); -$number_image = 6; +$number_image = 6;//num icons cols to show $number_iteration = ceil($count_image/$number_image); $p = 0; for ($k = 0; $k < $number_iteration; $k++) {