MDL-38336 SCORM: incorrect TOC bulding when 'Display course structure' is on

This commit is contained in:
Matteo Scaramuccia 2013-03-05 23:39:24 +01:00
parent 373a8e052c
commit 724dc929c7

View file

@ -1625,13 +1625,21 @@ function scorm_format_toc_for_treeview($user, $scorm, $scoes, $usertracks, $cmid
} }
} else if ($toclink == TOCFULLURL) { } else if ($toclink == TOCFULLURL) {
$url = $CFG->wwwroot.'/mod/scorm/player.php?'.$sco->url; $url = $CFG->wwwroot.'/mod/scorm/player.php?'.$sco->url;
if ($sco->scormtype == 'sco') { if (!empty($sco->launch)) {
$result->toc .= $sco->statusicon.'&nbsp;<a href="'.$url.'">'.format_string($sco->title).'</a>'.$score."\n"; if ($sco->scormtype == 'sco') {
$result->toc .= $sco->statusicon.'&nbsp;<a href="'.$url.'">'.format_string($sco->title).'</a>'.$score."\n";
} else {
$result->toc .= '&nbsp;<a href="'.$url.'">'.format_string($sco->title).'</a>'.$score."\n";
}
} else { } else {
$result->toc .= '&nbsp;<a href="'.$url.'">'.format_string($sco->title).'</a>'.$score."\n"; if ($sco->scormtype == 'sco') {
$result->toc .= $sco->statusicon.'&nbsp;'.format_string($sco->title).$score."\n";
} else {
$result->toc .= '&nbsp;'.format_string($sco->title).$score."\n";
}
} }
} else { } else {
if ($sco->launch) { if (!empty($sco->launch)) {
if ($sco->scormtype == 'sco') { if ($sco->scormtype == 'sco') {
$result->toc .= '<a title="'.$sco->url.'">'.$sco->statusicon.'&nbsp;'.format_string($sco->title).'&nbsp;'.$score.'</a>'; $result->toc .= '<a title="'.$sco->url.'">'.$sco->statusicon.'&nbsp;'.format_string($sco->title).'&nbsp;'.$score.'</a>';
} else { } else {