Fixed next sco search

This commit is contained in:
bobopinna 2005-08-30 11:48:22 +00:00
parent 4478a12b56
commit 699927cf78

View File

@ -1381,11 +1381,6 @@ function scorm_get_toc($scorm,$liststyle,$currentorg='',$scoid='',$mode='normal'
if (empty($sco->title)) {
$sco->title = $sco->identifier;
}
if (($nextsco !== false) && ($nextid == 0) && ($findnext)) {
if (!empty($nextsco->launch)) {
$nextid = $nextsco->id;
}
}
if (!empty($sco->launch)) {
$startbold = '';
$endbold = '';
@ -1444,6 +1439,11 @@ function scorm_get_toc($scorm,$liststyle,$currentorg='',$scoid='',$mode='normal'
} else {
$result->toc .= "&nbsp;$sco->title</li>\n";
}
if (($nextsco !== false) && ($nextid == 0) && ($findnext)) {
if (!empty($nextsco->launch)) {
$nextid = $nextsco->id;
}
}
}
for ($i=0;$i<$level;$i++) {
$result->toc .= "\t\t</ul></li>\n";