diff --git a/main/inc/lib/main_api.lib.php b/main/inc/lib/main_api.lib.php index ed7032904c..b0a2a3d02d 100755 --- a/main/inc/lib/main_api.lib.php +++ b/main/inc/lib/main_api.lib.php @@ -4583,7 +4583,7 @@ function api_calculate_image_size($image_width, $image_height, $target_width, $t /** * Returns a list of Chamilo's tools or * checks whether a given identificator is a valid Chamilo's tool. - * @author Isaac flores paz + * @author Isaac flores paz * @param string The tool name to filter * @return mixed Filtered string or array */ @@ -4976,7 +4976,7 @@ function api_check_browscap() { function api_get_js($file) { - return ''; + return ''; } diff --git a/main/inc/reduced_header.inc.php b/main/inc/reduced_header.inc.php index a1393b8681..c32aaf9762 100755 --- a/main/inc/reduced_header.inc.php +++ b/main/inc/reduced_header.inc.php @@ -106,7 +106,6 @@ if ($my_style != '') { } ?> - diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index db699e2b5f..1b0bdce682 100755 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -1971,7 +1971,7 @@ class learnpath { s1.addParam("allowscriptaccess","always"); s1.addParam("flashvars","file=' . api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/document/audio/' . $row['audio'] . '&autostart=' . $autostart_audio.'"); s1.write("container"); - '; + '; } return $output; } diff --git a/main/newscorm/lp_controller.php b/main/newscorm/lp_controller.php index b5a68ac0ef..444c8a1abc 100755 --- a/main/newscorm/lp_controller.php +++ b/main/newscorm/lp_controller.php @@ -15,8 +15,7 @@ if ($debug > 0) error_log('New LP -+- Entered lp_controller.php -+- (action: '.$ if (isset($_GET['action'])) { if ($_GET['action'] == 'export') { // Only needed on export. - $language_file[] = 'hotspot'; - $language_file[] = 'exercice'; + $language_file[] = 'hotspot'; } } $language_file[] = 'course_home'; @@ -25,6 +24,7 @@ $language_file[] = 'scorm'; $language_file[] = 'learnpath'; $language_file[] = 'resourcelinker'; $language_file[] = 'registration'; +$language_file[] = 'exercice'; // Including the global initialization file. require_once '../inc/global.inc.php'; diff --git a/main/newscorm/lp_nav.php b/main/newscorm/lp_nav.php index 274bd1c12a..456915b528 100755 --- a/main/newscorm/lp_nav.php +++ b/main/newscorm/lp_nav.php @@ -5,7 +5,6 @@ * Script opened in an iframe and containing the learning path's navigation and progress bar * @package chamilo.learnpath * @author Yannick Warnier - * @license GNU/GPL */ /** * Code @@ -23,8 +22,7 @@ require_once 'learnpath.class.php'; require_once 'scorm.class.php'; require_once 'aicc.class.php'; -//error_log('New LP - Loaded lp_nav: '.$_SERVER['REQUEST_URI'], 0); -$htmlHeadXtra[] = ''; @@ -45,19 +43,28 @@ if (isset($_SESSION['lpobject'])) { $display_mode = $_SESSION['oLP']->mode; $scorm_css_header = true; $lp_theme_css = $_SESSION['oLP']->get_theme(); + + $my_style = api_get_visual_theme(); + + //Setting up the CSS theme if exists - include_once '../inc/reduced_header.inc.php'; + //require_once '../inc/reduced_header.inc.php'; //fixes js bug in ie8 -> "src" not found see # + + $mycourselptheme = null; + if (api_get_setting('allow_course_theme') == 'true') { + $mycourselptheme = api_get_course_setting('allow_learning_path_theme'); + } if (!empty($lp_theme_css) && !empty($mycourselptheme) && $mycourselptheme != -1 && $mycourselptheme == 1) { global $lp_theme_css; } else { $lp_theme_css = $my_style; } - //$progress_bar = $_SESSION['oLP']->get_progress_bar(); - $progress_bar = $_SESSION['oLP']->get_progress_bar('', -1, '', true); + + $progress_bar = $_SESSION['oLP']->get_progress_bar('', -1, '', true); $navigation_bar = $_SESSION['oLP']->get_navigation_bar(); - $mediaplayer = $_SESSION['oLP']->get_mediaplayer($autostart); + $mediaplayer = $_SESSION['oLP']->get_mediaplayer($autostart); } session_write_close(); ?> - + \ No newline at end of file diff --git a/main/newscorm/lp_view.php b/main/newscorm/lp_view.php index e9c798cfee..58eec01df0 100755 --- a/main/newscorm/lp_view.php +++ b/main/newscorm/lp_view.php @@ -185,15 +185,6 @@ if ($type_quiz && !empty($_REQUEST['exeId']) && isset($lp_id) && isset($_GET['lp $score = (float)$row_dates['exe_result']; $max_score = (float)$row_dates['exe_weighting']; - /*require_once '../exercice/exercise.class.php'; - require_once '../exercice/question.class.php'; - require_once '../exercice/answer.class.php'; - require_once '../exercice/exercise.lib.php'; - - $exercise_obj = new Exercise(); - $score_result = $exercise_obj->get_exercise_result($safe_exe_id); - $score = (float)$score_result['score'];*/ - $sql_upd_max_score = "UPDATE $TBL_LP_ITEM SET max_score = '$max_score' WHERE id = '".(int)$safe_item_id."'"; if ($debug) error_log($sql_upd_max_score); Database::query($sql_upd_max_score); diff --git a/main/newscorm/scorm_api.php b/main/newscorm/scorm_api.php index d8602ffc86..7d6466e644 100755 --- a/main/newscorm/scorm_api.php +++ b/main/newscorm/scorm_api.php @@ -1464,7 +1464,7 @@ function switch_item(current_item, next_item){ default: break; } - var mysrc = 'lp_controller.php?action=content&lp_id='+olms.lms_lp_id+'&item_id='+next_item; + var mysrc = 'lp_controller.php?action=content&lp_id='+olms.lms_lp_id+'&item_id='+next_item; var cont_f = $("#content_id"); mode == 'fullscreen'){ ?> @@ -1490,9 +1490,9 @@ function switch_item(current_item, next_item){ url: "lp_nav.php", data: "", success: function(tmp_data) { - $("#media").html(tmp_data); - } - }); + $("#media").html(tmp_data); + } + }); return true; } /**