Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed a bad id definition for toc sublists

  • Loading branch information...
commit 3f7cc1f86184bcd1a42a089c96b0df1227150aa3 1 parent 6a51d6a
bobopinna authored
6 mod/scorm/datamodels/scorm_12lib.php
@@ -165,7 +165,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
165 165 $scormpixdir = $CFG->modpixpath.'/scorm/pix';
166 166
167 167 $result = new stdClass();
168   - $result->toc = "<ul id='0' class='$liststyle'>\n";
  168 + $result->toc = "<ul id='s0' class='$liststyle'>\n";
169 169 $tocmenus = array();
170 170 $result->prerequisites = true;
171 171 $incomplete = false;
@@ -238,7 +238,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
238 238 if (isset($_COOKIE['hide:SCORMitem'.$sco->id])) {
239 239 $style = ' style="display: none;"';
240 240 }
241   - $result->toc .= "\t\t<li><ul id='$sublist' class='$liststyle'$style>\n";
  241 + $result->toc .= "\t\t<li><ul id='s$sublist' class='$liststyle'$style>\n";
242 242 $level++;
243 243 } else {
244 244 $result->toc .= $closelist;
@@ -263,7 +263,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
263 263 if (isset($_COOKIE['hide:SCORMitem'.$nextsco->id])) {
264 264 $icon = 'plus';
265 265 }
266   - $result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\','.$sublist.','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
  266 + $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>';
267 267 } else if ($isvisible) {
268 268 $result->toc .= '<img src="'.$scormpixdir.'/spacer.gif" />';
269 269 }
6 mod/scorm/datamodels/scorm_13lib.php
@@ -11,7 +11,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
11 11 $scormpixdir = $CFG->modpixpath.'/scorm/pix';
12 12
13 13 $result = new stdClass();
14   - $result->toc = "<ul id='0' class='$liststyle'>\n";
  14 + $result->toc = "<ul id='s0' class='$liststyle'>\n";
15 15 $tocmenus = array();
16 16 $result->prerequisites = true;
17 17 $incomplete = false;
@@ -87,7 +87,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
87 87 if (isset($_COOKIE['hide:SCORMitem'.$sco->id])) {
88 88 $style = ' style="display: none;"';
89 89 }
90   - $result->toc .= "\t\t<li><ul id='$sublist' class='$liststyle'$style>\n";
  90 + $result->toc .= "\t\t<li><ul id='s$sublist' class='$liststyle'$style>\n";
91 91 $level++;
92 92 } else {
93 93 $result->toc .= $closelist;
@@ -114,7 +114,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
114 114 if (isset($_COOKIE['hide:SCORMitem'.$nextsco->id])) {
115 115 $icon = 'plus';
116 116 }
117   - $result->toc .= '<a href="javascript:expandCollide(img'.$sublist.','.$sublist.','.$nextsco->id.');">'.
  117 + $result->toc .= '<a href="javascript:expandCollide(img'.$sublist.',s'.$sublist.','.$nextsco->id.');">'.
118 118 '<img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
119 119 } else if ($isvisible) {
120 120 $result->toc .= '<img src="'.$scormpixdir.'/spacer.gif" />';

0 comments on commit 3f7cc1f

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