diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php
index 2fb5dcd8804..1e41d5db73f 100644
--- a/mod/scorm/locallib.php
+++ b/mod/scorm/locallib.php
@@ -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.' '.format_string($sco->title).''.$score."\n";
+ if (!empty($sco->launch)) {
+ if ($sco->scormtype == 'sco') {
+ $result->toc .= $sco->statusicon.' '.format_string($sco->title).''.$score."\n";
+ } else {
+ $result->toc .= ' '.format_string($sco->title).''.$score."\n";
+ }
} else {
- $result->toc .= ' '.format_string($sco->title).''.$score."\n";
+ if ($sco->scormtype == 'sco') {
+ $result->toc .= $sco->statusicon.' '.format_string($sco->title).$score."\n";
+ } else {
+ $result->toc .= ' '.format_string($sco->title).$score."\n";
+ }
}
} else {
- if ($sco->launch) {
+ if (!empty($sco->launch)) {
if ($sco->scormtype == 'sco') {
$result->toc .= ''.$sco->statusicon.' '.format_string($sco->title).' '.$score.'';
} else {