MDL-33053 AICC: Incorrect Table Of Content hierarchy using "structured" AICC

courses
[Fix] 'scorm_scoes' doesn't contain all the entries described in the DES file
[Fix] HTMLizing the parent relationship, described in the CST file,
      fails: it considers 'index = 0' (found) equals to 'false' (not found)
This commit is contained in:
Matteo Scaramuccia 2012-05-22 00:47:01 +02:00
parent 4f7f2a8828
commit 8ac8aae4f4
2 changed files with 55 additions and 48 deletions

View file

@ -1338,7 +1338,8 @@ function scorm_get_toc($user,$scorm,$cmid,$toclink=TOCJSLINK,$currentorg='',$sco
$isvisible = true;
}
if ($parents[$level] != $sco->parent) {
if ($newlevel = array_search($sco->parent,$parents)) {
$newlevel = array_search($sco->parent,$parents);
if ($newlevel !== false) {
for ($i=0; $i<($level-$newlevel); $i++) {
$result->toc .= "\t\t</li></ul></li>\n";
}