From 385a3d19e6187c95c85d46778b29366b27f3eeec Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Thu, 8 May 2014 14:20:48 -0500 Subject: [PATCH] Update scorm CSS style to avoid misfit when changing from first opened item to other - refs #6999 --- main/newscorm/learnpath.class.php | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 7386c6a904..17bfd91281 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -2969,27 +2969,23 @@ class learnpath ); $style = 'scorm_item'; - $scorm_color_background = 'scorm_item'; + $scorm_color_background = 'scorm_item_2'; $style_item = 'scorm_item'; $current = false; + if ($color_counter % 2 == 0) { + $scorm_color_background = 'scorm_item_1'; + } + if ($item['type'] == 'dokeos_module' || $item['type'] == 'dokeos_chapter') { + $scorm_color_background =' scorm_item_section '; + } if ($item['id'] == $this->current) { $style = 'scorm_item_highlight'; - $scorm_color_background = 'scorm_item_highlight'; - } else { - if ($color_counter % 2 == 0) { - $scorm_color_background = 'scorm_item_1'; - } else { - $scorm_color_background = 'scorm_item_2'; - } - if ($item['type'] == 'dokeos_module' || $item['type'] == 'dokeos_chapter') { - $scorm_color_background =' scorm_item_section '; - } + $scorm_color_background .= ' scorm_item_highlight'; } - if ($scorm_color_background != '') { - $html .= '
'; - } + $html .= '
'; + // Learning path title $title = $item['title'];