Skip to content

Commit

Permalink
MDL-38336 SCORM: incorrect TOC bulding when 'Display course structure…
Browse files Browse the repository at this point in the history
…' is on
  • Loading branch information
scara committed Mar 24, 2013
1 parent 373a8e0 commit 724dc92
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions mod/scorm/locallib.php
Expand Up @@ -1625,13 +1625,21 @@ function scorm_format_toc_for_treeview($user, $scorm, $scoes, $usertracks, $cmid
}
} else if ($toclink == TOCFULLURL) {
$url = $CFG->wwwroot.'/mod/scorm/player.php?'.$sco->url;
if ($sco->scormtype == 'sco') {
$result->toc .= $sco->statusicon.'&nbsp;<a href="'.$url.'">'.format_string($sco->title).'</a>'.$score."\n";
if (!empty($sco->launch)) {
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 {
$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 {
if ($sco->launch) {
if (!empty($sco->launch)) {
if ($sco->scormtype == 'sco') {
$result->toc .= '<a title="'.$sco->url.'">'.$sco->statusicon.'&nbsp;'.format_string($sco->title).'&nbsp;'.$score.'</a>';
} else {
Expand Down

0 comments on commit 724dc92

Please sign in to comment.