Fixes js error in ie8 see #3750

skala
Julio Montoya 15 years ago
parent 2bf55932d2
commit 5344bf6d8c
  1. 4
      main/inc/lib/main_api.lib.php
  2. 1
      main/inc/reduced_header.inc.php
  3. 2
      main/newscorm/learnpath.class.php
  4. 4
      main/newscorm/lp_controller.php
  5. 23
      main/newscorm/lp_nav.php
  6. 9
      main/newscorm/lp_view.php
  7. 8
      main/newscorm/scorm_api.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 <florespaz@bidsoftperu.com>
* @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 '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/'.$file.'" type="text/javascript" language="javascript"></script>';
return '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/'.$file.'"></script>';
}

@ -106,7 +106,6 @@ if ($my_style != '') {
}
?>
<script src="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/jquery.min.js" type="text/javascript" ></script>
<script src="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/thickbox.js" type="text/javascript" ></script>
<link rel="stylesheet" href="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/thickbox.css" type="text/css" media="projection, screen" />

@ -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");
</script></div>';
</script></div>';
}
return $output;
}

@ -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';

@ -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 <ywarnier@beeznest.org>
* @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[] = '<script language="JavaScript" type="text/javascript">
$htmlHeadXtra[] = '<script type="text/javascript">
var dokeos_xajax_handler = window.parent.oxajax;
</script>';
@ -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();
?>
<span><?php echo (!empty($mediaplayer)) ? $mediaplayer : '&nbsp;' ?></span>
<span><?php echo (!empty($mediaplayer)) ? $mediaplayer : '&nbsp;' ?></span>

@ -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);

@ -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");
<?php if($oLP->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;
}
/**

Loading…
Cancel
Save