mod-scorm MDL-16706 Eliminated inline scripts to use PAGE methods

This commit is contained in:
samhemelryk
2009-07-02 06:40:54 +00:00
parent 8f36c245ed
commit 0e2f318080
+2 -19
View File
@@ -534,25 +534,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
}
$result->toc .= "\t</ul>\n";
if ($scorm->hidetoc == 0) {
$result->toc .= '
<script type="text/javascript">
//<![CDATA[
function expandCollide(which,list,item) {
var el = document.ids ? document.ids[list] : document.getElementById ? document.getElementById(list) : document.all[list];
which = which.substring(0,(which.length));
var el2 = document.ids ? document.ids[which] : document.getElementById ? document.getElementById(which) : document.all[which];
if (el.style.display != "none") {
el2.src = "'.$scormpixdir.'/plus.gif";
el.style.display=\'none\';
new cookie("hide:SCORMitem" + item, 1, 356, "/").set();
} else {
el2.src = "'.$scormpixdir.'/minus.gif";
el.style.display=\'block\';
new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
}
}
//]]>
</script>'."\n";
$result->toc .= $PAGE->requires->data_for_js('scormdata', Array('scormpixdir'=>$scormpixdir))->asap();
$result->toc .= $PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js')->asap();
}
$url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&amp;currentorg='.$currentorg.$modestr.'&amp;scoid=';