Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed bug MDL-7516

  • Loading branch information...
commit 57fead95277a8f96b49ec388d0cbd9e281a3b144 1 parent 5394e9c
authored June 15, 2007

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. 8  mod/scorm/locallib.php
8  mod/scorm/locallib.php
@@ -1349,7 +1349,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
1349 1349
                 if (isset($_COOKIE['hide:SCORMitem'.$nextsco->id])) {
1350 1350
                     $icon = 'plus';
1351 1351
                 }
1352  
-                $result->toc .= '<a href="javascript:expandCollide(img'.$sublist.','.$sublist.','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
  1352
+                $result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\','.$sublist.','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
1353 1353
             } else {
1354 1354
                 $result->toc .= '<img src="'.$scormpixdir.'/spacer.gif" />';
1355 1355
             }
@@ -1446,13 +1446,15 @@ function expandCollide(which,list,item) {
1446 1446
                   var w3c=document.getElementById?true:false
1447 1447
                   var beg=nn?"document.ids.":w3c?"document.getElementById(":"document.all.";
1448 1448
                   var mid=w3c?").style":".style";
  1449
+                  which = which.substring(0,(which.length));
1449 1450
 
1450 1451
                   if (eval(beg+list+mid+".display") != "none") {
1451  
-                      which.src = "'.$scormpixdir.'/plus.gif";
  1452
+                      document.getElementById(which).src = "'.$scormpixdir.'/plus.gif";
1452 1453
                       eval(beg+list+mid+".display=\'none\';");
1453 1454
                       new cookie("hide:SCORMitem" + item, 1, 356, "/").set();
1454 1455
                   } else {
1455  
-                      which.src = "'.$scormpixdir.'/minus.gif";
  1456
+                      document.getElementById(which).src = "'.$scormpixdir.'/minus.gif";
  1457
+
1456 1458
                       eval(beg+list+mid+".display=\'block\';");
1457 1459
                       new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
1458 1460
                   }

0 notes on commit 57fead9

Please sign in to comment.
Something went wrong with that request. Please try again.