diff --git a/main/css/default_with_tabs/scorm.css b/main/css/default_with_tabs/scorm.css index 88c96d83d2..f71bb4ad45 100644 --- a/main/css/default_with_tabs/scorm.css +++ b/main/css/default_with_tabs/scorm.css @@ -20,53 +20,96 @@ border-right: 1px none; overflow: auto; background-color: white; height: 325px; -width: 99%; +width: 92%; border-right: 1px #999999 solid; border-left: 15px #FFF solid; } .inner_lp_toc .scorm_item{ -font-size: 11px; -margin-left: 10px; -margin-right:25px; -padding-bottom: 2px; -text-decoration: none; + + font-size: 11px; + margin-left: 10px; + margin-right:20px; + padding-bottom: 2px; + text-decoration: none; +} + +.inner_lp_toc .scorm_item A +{ + font-size: 11px; + margin-right: 1px; + padding-bottom: 2px; + text-decoration: none; + font-weight: normal; } - .inner_lp_toc .scorm_item A{ - font-weight: normal; - } +.inner_lp_toc .scorm_item A.chapter_module{ + font-weight: normal; + margin-right: 10px; +} + + +.inner_lp_toc .scorm_item_highlight +{ + font-size: 11px; + margin-right: 1px; + padding-bottom: 2px; + text-decoration: none; + font-weight: normal; - .inner_lp_toc .scorm_item A.chapter_module{ - font-weight: normal; - } - -.inner_lp_toc .scorm_item_highlight{ -font-size: 11px; -margin-left: 10px; -margin-right: 25px; -padding-bottom: 2px; -text-decoration: none; -background:#F8F8F8; border:1px dashed #999999; -} - - .inner_lp_toc .scorm_item_highlight A{ - font-weight: normal; - } + background:#aaa; +} + +.inner_lp_toc .scorm_item_highlight A +{ + font-size: 11px; + margin-right: 1px; + text-decoration: none; + font-weight: normal; + +} +.inner_lp_toc .scorm_item_1 +{ + font-size: 11px; + margin-right: 1px; + padding-bottom: 2px; + text-decoration: none; + font-weight: normal; -.inner_lp_toc .scorm_item_highlight .highlight{ - font-weight: normal; - background:#F3F3F3; border:1px dashed #949494; + background:#ddd; +} + +.inner_lp_toc .scorm_item_2 +{ + font-size: 11px; margin-right: 1px; + padding-bottom: 2px; + text-decoration: none; + font-weight: normal; + + background:#eee; } + +.inner_lp_toc .scorm_title +{ + font-weight: bold; + background:#4271B5; + + font-size: 12px; + color: #fff; +} + + .inner_lp_toc .scorm_status_img{ -margin:0px; -margin-left: -10px; -width:10px; + margin:0px; + margin-left: -10px; + width:10px; } + + .lp_navigation{ overflow: auto; background-color: white; diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 238d70fd28..16e8c723e1 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -2445,8 +2445,12 @@ class learnpath { //echo $this->current; //$parent = $this->items[$this->current]->get_parent(); //if(empty($parent)){$parent = $this->ordered_items[$this->items[$this->current]->get_previous_index()];} - $html .= '
'."\n" ; - if(api_is_allowed_to_edit()){ + $html.= '
'."\n" ; + $html.= '
    '.$this->get_name().'
'; + + // build, display + if(api_is_allowed_to_edit()) + { $mych = api_get_setting('platform_charset'); $html.="

    ".mb_convert_encoding(get_lang("Build"),$this->encoding,$mych)." | ".mb_convert_encoding(get_lang("BasicOverview"),$this->encoding,$mych)." | ".mb_convert_encoding(get_lang("Display"),$this->encoding,$mych)."

"; unset($mych); @@ -2456,7 +2460,8 @@ class learnpath { //temp variables $mycurrentitemid = $this->get_current_item_id(); - + $color_counter=0; + $i=0; foreach($list as $item) { if($this->debug>2){error_log('New LP - learnpath::get_html_toc(): using item '.$item['id'],0);} @@ -2469,56 +2474,86 @@ class learnpath { 'succeeded' => 'succeeded.png', 'browsed' => 'completed.png'); - $style = 'scorm_item'; + $style = 'scorm_item'; + $scorm_color_background='scorm_item'; + $style_item ='scorm_item'; + $current=false; + if($item['id'] == $this->current) { $style = 'scorm_item_highlight'; - } - //the anchor will let us center the TOC on the currently viewed item &^D - - if($item['type']!='dokeos_module' AND $item['type']!='dokeos_chapter'){ + $scorm_color_background ='scorm_item_highlight'; + } + else - $html .= '
' . - ''; - } - - else{ + if ($color_counter%2==0) + { + $scorm_color_background='scorm_item_1'; + } + else + { + $scorm_color_background='scorm_item_2'; + } + + if ($scorm_color_background!='') + { + $html .= '
'; + } + + //the anchor will let us center the TOC on the currently viewed item &^D + if($item['type']!='dokeos_module' AND $item['type']!='dokeos_chapter') + { + $html .= ''; + $html .= '
'; + } + else + { + $html .= '
'; + } - $html .= '
' . - ''; + $title=$item['title']; - } - $title=$item['title']; if(empty($title)) { $title = rl_get_resource_name(api_get_course_id(),$this->get_id(),$item['id']); } + $title = html_entity_decode($title,ENT_QUOTES,$this->encoding); - if($item['type']!='dokeos_chapter' and $item['type']!='dir' AND $item['type']!='dokeos_module') { - //$html .= "".$title."" ; - $url = $this->get_link('http',$item['id']); - //$html .= ''.$title.'' ; - //$html .= ''.$title.'' ; - - //  - $html .= ''.stripslashes($title).'' ; + //$html .= "".$title."" ; + $url = $this->get_link('http',$item['id']); + //$html .= ''.$title.'' ; + //$html .= ''.$title.'' ; + + //  + $html .= ''.stripslashes($title).'' ; } elseif($item['type']=='dokeos_module' || $item['type']=='dokeos_chapter') { - $html .= " ".stripslashes($title); - } - + $html .= " ".stripslashes($title); + } elseif($item['type']=='dir') { - $html .= stripslashes($title); - } - $html .= "".substr($item[
\n"; + $html .= stripslashes($title); + } + + $html .= "".substr($item["; + $html .= "
"; + + if ($scorm_color_background!='') + { + $html .= '
'; + } + + + + + $color_counter++; } $html .= "
\n"; return $html; diff --git a/main/newscorm/scorm_api.php b/main/newscorm/scorm_api.php index 9c28bb97d6..650e1aeb33 100644 --- a/main/newscorm/scorm_api.php +++ b/main/newscorm/scorm_api.php @@ -834,10 +834,20 @@ function update_toc(update_action,update_id) var myelem = myframe.document.getElementById("toc_"+update_id); var myelemimg = myframe.document.getElementById("toc_img_"+update_id); logit_lms('update_toc("'+update_action+'",'+update_id+')',2); - if(update_id != 0){ - switch(update_action){ + + if(update_id != 0) + { + switch(update_action) + { case 'unhighlight': - myelem.className = "scorm_item"; + if (update_id%2==0) + { + myelem.className = "scorm_item_2"; + } + else + { + myelem.className = "scorm_item_1"; + } break; case 'highlight': myelem.className = "scorm_item_highlight";