mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
fixed a missing <li> tag in package TOC
This commit is contained in:
parent
9368476553
commit
9b60b28a52
1 changed files with 4 additions and 7 deletions
|
@ -11,7 +11,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
|||
$scormpixdir = $CFG->modpixpath.'/scorm/pix';
|
||||
|
||||
$result = new stdClass();
|
||||
$result->toc = "<ul id='0' class='$liststyle'>\n";
|
||||
$result->toc = "<ul id='s0' class='$liststyle'>\n";
|
||||
$tocmenus = array();
|
||||
$result->prerequisites = true;
|
||||
$incomplete = false;
|
||||
|
@ -87,7 +87,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
|||
if (isset($_COOKIE['hide:SCORMitem'.$sco->id])) {
|
||||
$style = ' style="display: none;"';
|
||||
}
|
||||
$result->toc .= "\t\t<li><ul id='$sublist' class='$liststyle'$style>\n";
|
||||
$result->toc .= "\t\t<li><ul id='s$sublist' class='$liststyle'$style>\n";
|
||||
$level++;
|
||||
} else {
|
||||
$result->toc .= $closelist;
|
||||
|
@ -96,9 +96,6 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
|||
$parents[$level]=$sco->parent;
|
||||
}
|
||||
}
|
||||
if ($isvisible) {
|
||||
$result->toc .= "\t\t<li>";
|
||||
}
|
||||
$nextsco = next($scoes);
|
||||
$nextisvisible = false;
|
||||
if (($nextsco !== false) && (isset($optionaldatas[$nextsco->identifier]))) {
|
||||
|
@ -114,10 +111,10 @@ 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.');">'.
|
||||
$result->toc .= "\t\t".'<li><a href="javascript:expandCollide(img'.$sublist.',s'.$sublist.','.$nextsco->id.');">'.
|
||||
'<img id="img'.$sublist.'" src="'.$scormpixdir.'/'.$icon.'.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
|
||||
} else if ($isvisible) {
|
||||
$result->toc .= '<img src="'.$scormpixdir.'/spacer.gif" />';
|
||||
$result->toc .= "\t\t".'<li><img src="'.$scormpixdir.'/spacer.gif" />';
|
||||
}
|
||||
if (empty($sco->title)) {
|
||||
$sco->title = $sco->identifier;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue