Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug MDL-7516

  • Loading branch information...
commit 57fead95277a8f96b49ec388d0cbd9e281a3b144 1 parent 5394e9c
csantossaenz authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 mod/scorm/locallib.php
View
8 mod/scorm/locallib.php
@@ -1349,7 +1349,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
if (isset($_COOKIE['hide:SCORMitem'.$nextsco->id])) {
$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.'\','.$sublist.','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
} else {
$result->toc .= '<img src="'.$scormpixdir.'/spacer.gif" />';
}
@@ -1446,13 +1446,15 @@ function expandCollide(which,list,item) {
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));
if (eval(beg+list+mid+".display") != "none") {
- which.src = "'.$scormpixdir.'/plus.gif";
+ document.getElementById(which).src = "'.$scormpixdir.'/plus.gif";
eval(beg+list+mid+".display=\'none\';");
new cookie("hide:SCORMitem" + item, 1, 356, "/").set();
} else {
- which.src = "'.$scormpixdir.'/minus.gif";
+ document.getElementById(which).src = "'.$scormpixdir.'/minus.gif";
+
eval(beg+list+mid+".display=\'block\';");
new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
}
Please sign in to comment.
Something went wrong with that request. Please try again.