From d28548d5e43a291fa46a7663a0511cacc1b63730 Mon Sep 17 00:00:00 2001 From: mchurch Date: Thu, 5 Jun 2008 21:07:09 +0000 Subject: [PATCH] MDL-11892 Fixed calls to expand javascript to correctly use quoted strings in all necessary places. --- mod/scorm/datamodels/scorm_13lib.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mod/scorm/datamodels/scorm_13lib.php b/mod/scorm/datamodels/scorm_13lib.php index 53656c14df..6cef7b0565 100644 --- a/mod/scorm/datamodels/scorm_13lib.php +++ b/mod/scorm/datamodels/scorm_13lib.php @@ -119,7 +119,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n if (isset($_COOKIE['hide:SCORMitem'.$nextsco->id])) { $icon = 'plus'; } - $result->toc .= "\t\t".'
  • '. + $result->toc .= "\t\t".'
  • '. ''.$strexpand.''; } else if ($isvisible) { $result->toc .= "\t\t".'
  • '; @@ -228,15 +228,16 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n function expandCollide(which,list,item) { var nn=document.ids?true:false var w3c=document.getElementById?true:false - var beg=nn?"document.ids.":w3c?"document.getElementById(":"document.all."; - var mid=w3c?").style":".style"; + 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(); } -- 2.39.5