From bc797636ac144bc990beddb9e2ab46652e2498ba Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 20 Dec 2012 10:44:37 +0100 Subject: [PATCH] Fixing LP link in course home see #5593 --- main/inc/lib/course_home.lib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main/inc/lib/course_home.lib.php b/main/inc/lib/course_home.lib.php index ca31029b68..94450a2caa 100644 --- a/main/inc/lib/course_home.lib.php +++ b/main/inc/lib/course_home.lib.php @@ -201,8 +201,6 @@ class CourseHome return $table->toHtml(); } -// end - /** * Displays the tools of a certain category. * @@ -744,7 +742,7 @@ class CourseHome $icon = Display::return_icon($tool['image'], $tool_name, array('class' => 'tool-icon', 'id' => 'toolimage_'.$tool['id']), ICON_SIZE_BIG, false); - // Validacion when belongs to a session + // Validation when belongs to a session $session_img = api_get_session_image($tool['session_id'], $_user['status']); $item['url_params'] = $tool_link_params; $item['icon'] = Display::url($icon, $tool_link_params['href'], $tool_link_params); @@ -776,6 +774,9 @@ class CourseHome switch ($image) { case 'scormbuilder.png': + if (api_is_allowed_to_edit(null, true)) { + $item['url_params']['href'] .= '&isStudentView=true'; + } $image = $original_image; $lp_id = self::get_published_lp_id_from_link($item['link']); if ($lp_id) {