mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-11892 Propogate Fixes for 'calls to expand javascript' to SCORM 1.2 code. Minor syntax alignment in player.php.
This commit is contained in:
parent
4644313b7c
commit
97852875da
3 changed files with 18 additions and 25 deletions
|
@ -272,8 +272,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||||
if (isset($_COOKIE['hide:SCORMitem'.$nextsco->id])) {
|
if (isset($_COOKIE['hide:SCORMitem'.$nextsco->id])) {
|
||||||
$icon = 'plus';
|
$icon = 'plus';
|
||||||
}
|
}
|
||||||
$result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\','.$sublist.','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
|
$result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\',\'s'.$sublist.'\','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
|
||||||
// $result->toc .= '<a href="#" onclick="elementToggleHide(\''.$sublist.'\',true);"><img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
|
|
||||||
} else if ($isvisible) {
|
} else if ($isvisible) {
|
||||||
$result->toc .= '<img src="'.$scormpixdir.'/spacer.gif" />';
|
$result->toc .= '<img src="'.$scormpixdir.'/spacer.gif" />';
|
||||||
}
|
}
|
||||||
|
@ -380,21 +379,17 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||||
$result->toc .= '
|
$result->toc .= '
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function expandCollide(which,list,item) {
|
function expandCollide(which,list,item) {
|
||||||
var nn=document.ids?true:false
|
var el = document.ids ? document.ids[list] : document.getElementById ? document.getElementById(list) : document.all[list];
|
||||||
var w3c=document.getElementById?true:false
|
|
||||||
var beg=nn?"document.ids.":w3c?"document.getElementById(":"document.all.";
|
|
||||||
|
|
||||||
var mid=w3c?").style":".style";
|
|
||||||
which = which.substring(0,(which.length));
|
which = which.substring(0,(which.length));
|
||||||
|
var el2 = document.ids ? document.ids[which] : document.getElementById ? document.getElementById(which) : document.all[which];
|
||||||
if (eval(beg+list+mid+".display") != "none") {
|
if (el.style.display != "none") {
|
||||||
document.getElementById(which).src = "'.$scormpixdir.'/plus.gif";
|
el2.src = "'.$scormpixdir.'/plus.gif";
|
||||||
eval(beg+list+mid+".display=\'none\';");
|
el.style.display=\'none\';
|
||||||
new cookie("hide:SCORMitem" + item, 1, 356, "/").set();
|
new cookie("hide:SCORMitem" + item, 1, 356, "/").set();
|
||||||
} else {
|
} else {
|
||||||
document.getElementById(which).src = "'.$scormpixdir.'/minus.gif";
|
el2.src = "'.$scormpixdir.'/minus.gif";
|
||||||
eval(beg+list+mid+".display=\'block\';");
|
el.style.display=\'block\';
|
||||||
new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
|
new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,19 +226,16 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function expandCollide(which,list,item) {
|
function expandCollide(which,list,item) {
|
||||||
var nn=document.ids?true:false
|
var el = document.ids ? document.ids[list] : document.getElementById ? document.getElementById(list) : document.all[list];
|
||||||
var w3c=document.getElementById?true:false
|
|
||||||
var beg=nn?"document.ids.":w3c?"document.getElementById(\'":"document.all.";
|
|
||||||
var mid=w3c?"\').style":".style";
|
|
||||||
|
|
||||||
which = which.substring(0,(which.length));
|
which = which.substring(0,(which.length));
|
||||||
if (eval(beg+list+mid+".display") != "none") {
|
var el2 = document.ids ? document.ids[which] : document.getElementById ? document.getElementById(which) : document.all[which];
|
||||||
document.getElementById(which).src = "'.$scormpixdir.'/plus.gif";
|
if (el.style.display != "none") {
|
||||||
eval(beg+list+mid+".display=\'none\';");
|
el2.src = "'.$scormpixdir.'/plus.gif";
|
||||||
|
el.style.display=\'none\';
|
||||||
new cookie("hide:SCORMitem" + item, 1, 356, "/").set();
|
new cookie("hide:SCORMitem" + item, 1, 356, "/").set();
|
||||||
} else {
|
} else {
|
||||||
document.getElementById(which).src = "'.$scormpixdir.'/minus.gif";
|
el2.src = "'.$scormpixdir.'/minus.gif";
|
||||||
eval(beg+list+mid+".display=\'block\';");
|
el.style.display=\'block\';
|
||||||
new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
|
new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,9 +351,10 @@
|
||||||
width = <?php p($scorm->width) ?>;
|
width = <?php p($scorm->width) ?>;
|
||||||
height = <?php p($scorm->height) ?>;
|
height = <?php p($scorm->height) ?>;
|
||||||
var main = openpopup(url, "<?php p($scorm->name) ?>", "<?php p($scorm->options) ?>", width, height);
|
var main = openpopup(url, "<?php p($scorm->name) ?>", "<?php p($scorm->options) ?>", width, height);
|
||||||
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
<noscript>
|
<noscript>
|
||||||
<iframe id="main" class="scoframe" src="loadSCO.php?id=<?php echo $cm->id.$scoidstr.$modestr ?>">
|
<iframe id="main" class="scoframe" src="loadSCO.php?id=<?php echo $cm->id.$scoidstr.$modestr ?>">
|
||||||
</iframe>
|
</iframe>
|
||||||
</noscript>
|
</noscript>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue