From: stronk7 Date: Sun, 23 Apr 2006 01:57:02 +0000 (+0000) Subject: Now double-headers are out 100% X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=dce3a7cb6198f1d8d05b797f5140c56dd53581d2;p=moodle.git Now double-headers are out 100% Some incorrect targets are out. Scorm API (dummy) is working fine. TODO: Move css styles to standard. --- diff --git a/mod/resource/type/ims/javascript.php b/mod/resource/type/ims/javascript.php new file mode 100644 index 0000000000..60741a9d2e --- /dev/null +++ b/mod/resource/type/ims/javascript.php @@ -0,0 +1,29 @@ +wwwroot/mod/resource/type/ims/dummyapi.js\">\n"; +/// The resize iframe script + echo " \n"; + echo " \n"; + +/// Load standard JavaScript + include("$standard_javascript"); +?> diff --git a/mod/resource/type/ims/resource.class.php b/mod/resource/type/ims/resource.class.php index 442e0d0aa3..ec36be56e7 100644 --- a/mod/resource/type/ims/resource.class.php +++ b/mod/resource/type/ims/resource.class.php @@ -438,46 +438,21 @@ class resource_ims extends resource_base { /// iframe. if (empty($frameset) || $frameset=='ims') { - /// Select encoding - $encoding = current_charset(); - - /// Select direction - if (get_string('thisdirection') == 'rtl') { - $direction = ' dir="rtl"'; - } else { - $direction = ' dir="ltr"'; - } - - /// The output here - - echo "\n"; - echo "\n"; - echo ''; - echo ''; + /// Conditional argument to pass to IMS JavaScript. Need to be global to retrieve it from our custom javascript! :-( + global $jsarg; + $jsarg = 'false'; if (!empty($this->parameters->navigationmenu)) { $jsarg = 'true'; } - else { - $jsarg = 'false'; - } + /// Define $CFG->javascript to use our custom javascript. Save the original one to add it from ours. Global too! :-( + global $standard_javascript; + $standard_javascript = $CFG->javascript; // Save original javascript file + $CFG->javascript = $CFG->dirroot.'/mod/resource/type/ims/javascript.php'; //Use our custom IMS javascript code - /// The dummy LMS API hack to stop some SCORM packages giving errors. - echo ""; - - /// All this sets up script and style stuff to position and + /// All this sets up style stuff to position and /// resize the menus and stuff. The CSS is here because it - /// differs depending on some php variables. The javascript - /// uses resize.js. + /// differs depending on some php variables. echo " - -