diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 6617391377..90f9b04865 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -2440,8 +2440,13 @@ class learnpath $text = $percentage.$text_add; //@todo use Display::display_progress(); $output = '
-
-
+
+ '.$text.'% Complete +
+ + + +
'.$text.'
'; return $output; @@ -3197,7 +3202,6 @@ class learnpath $title = Security::remove_XSS($title); if ($item['type'] != 'dokeos_chapter' && $item['type'] != 'dir' && $item['type'] != 'dokeos_module') { $url = $this->get_link('http', $item['id'], $toc_list); - $html .= ''.stripslashes( $title ).''; @@ -3210,16 +3214,12 @@ class learnpath if ($item['type'] == 'quiz') { if ($item['status'] == 'completed') { $html .= " ".Display::return_icon($icon_name[$item['status']], substr($item['status'], 0, 1), array('id' => "toc_img_".$item['id'], 'width' => '14')); - //$html .= " ".substr($item["; - } else { $html .= " ".Display::return_icon($icon_name['not attempted'], substr('not attempted', 0, 1), array('id' => "toc_img_".$item['id'], 'width' => '14')); -// $html .= " ".substr("; } } else { if ($item['type'] != 'dokeos_chapter' && $item['type'] != 'dokeos_module' && $item['type'] != 'dir') { $html .= " ".Display::return_icon($icon_name[$item['status']], substr($item['status'], 0, 1), array('id' => "toc_img_".$item['id'], 'width' => '14')); - //$html .= " ".substr($item["; } } diff --git a/main/newscorm/scorm_api.php b/main/newscorm/scorm_api.php index a3f25ea4ea..d9dc94e96c 100644 --- a/main/newscorm/scorm_api.php +++ b/main/newscorm/scorm_api.php @@ -46,6 +46,8 @@ if (!is_object($oItem)) { exit; } +$imagePath = api_get_path(WEB_IMG_PATH); + $autocomplete_when_80pct = 0; $user = api_get_user_info(); header('Content-type: text/javascript'); @@ -53,6 +55,12 @@ header('Content-type: text/javascript'); ?>var scorm_logs = scorm_debug) or (!api_is_course_admin() && !api_is_platform_admin()) )?'0':'3');?>; //debug log level for SCORM. 0 = none, 1=light, 2=a lot, 3=all - displays logs in log frame var lms_logs = 0; //debug log level for LMS actions. 0=none, 1=light, 2=a lot, 3=all +var notAttemptedImage = 'notattempted.gif'; +var incompleteImage = 'incomplete.png'; +var completedImage = 'completed.png'; +var deleteImage = 'delete.png'; +var notAttemptedImage = 'notattempted.gif'; + // API Object initialization (eases access later on) function APIobject() { this.LMSInitialize=LMSInitialize; //for Scorm 1.2 @@ -1159,38 +1167,38 @@ function update_toc(update_action, update_id, change_ids) { myelem.attr('class',"scorm_item_highlight"); break; case 'not attempted': - if( myelemimg.attr('src') != '../img/notattempted.gif') { - myelemimg.attr('src','../img/notattempted.gif'); + if( myelemimg.attr('src') != notAttemptedImage) { + myelemimg.attr('src', notAttemptedImage); myelemimg.attr('alt','n'); } break; case 'incomplete': - if( myelemimg.attr('src') != '../img/incomplete.png') { - myelemimg.attr('src','../img/incomplete.png'); + if( myelemimg.attr('src') != incompleteImage) { + myelemimg.attr('src', incompleteImage); myelemimg.attr('alt','i'); } break; case 'completed': - if( myelemimg.attr('src') != '../img/completed.png') { - myelemimg.attr('src','../img/completed.png'); + if( myelemimg.attr('src') != completedImage) { + myelemimg.attr('src', completedImage); myelemimg.attr('alt','c'); } break; case 'failed': - if( myelemimg.attr('src') != '../img/delete.png') { - myelemimg.attr('src','../img/delete.png'); + if( myelemimg.attr('src') != deleteImage) { + myelemimg.attr('src', deleteImage); myelemimg.attr('alt','f'); } break; case 'passed': - if( myelemimg.attr('src') != '../img/completed.png' && myelemimg.attr('alt') != 'passed') { - myelemimg.attr('src','../img/completed.png'); + if( myelemimg.attr('src') != completedImage && myelemimg.attr('alt') != 'passed') { + myelemimg.attr('src', completedImage); myelemimg.attr('alt','p'); } break; case 'browsed': - if( myelemimg.attr('src') != '../img/completed.png' && myelemimg.attr('alt') != 'browsed') { - myelemimg.attr('src','../img/completed.png'); + if( myelemimg.attr('src') != completedImage && myelemimg.attr('alt') != 'browsed') { + myelemimg.attr('src', completedImage); myelemimg.attr('alt','b'); } break;