Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…' is on
  • Loading branch information...
commit 417d004cadd52c45db6d1e56235a78523cd2bfc8 1 parent b9ef2c9
Matteo Scaramuccia scara authored

Showing 1 changed file with 12 additions and 4 deletions. Show diff stats Hide diff stats

  1. +12 4 mod/scorm/locallib.php
16 mod/scorm/locallib.php
@@ -1625,13 +1625,21 @@ function scorm_format_toc_for_treeview($user, $scorm, $scoes, $usertracks, $cmid
1625 1625 }
1626 1626 } else if ($toclink == TOCFULLURL) {
1627 1627 $url = $CFG->wwwroot.'/mod/scorm/player.php?'.$sco->url;
1628   - if ($sco->scormtype == 'sco') {
1629   - $result->toc .= $sco->statusicon.'&nbsp;<a href="'.$url.'">'.format_string($sco->title).'</a>'.$score."\n";
  1628 + if (!empty($sco->launch)) {
  1629 + if ($sco->scormtype == 'sco') {
  1630 + $result->toc .= $sco->statusicon.'&nbsp;<a href="'.$url.'">'.format_string($sco->title).'</a>'.$score."\n";
  1631 + } else {
  1632 + $result->toc .= '&nbsp;<a href="'.$url.'">'.format_string($sco->title).'</a>'.$score."\n";
  1633 + }
1630 1634 } else {
1631   - $result->toc .= '&nbsp;<a href="'.$url.'">'.format_string($sco->title).'</a>'.$score."\n";
  1635 + if ($sco->scormtype == 'sco') {
  1636 + $result->toc .= $sco->statusicon.'&nbsp;'.format_string($sco->title).$score."\n";
  1637 + } else {
  1638 + $result->toc .= '&nbsp;'.format_string($sco->title).$score."\n";
  1639 + }
1632 1640 }
1633 1641 } else {
1634   - if ($sco->launch) {
  1642 + if (!empty($sco->launch)) {
1635 1643 if ($sco->scormtype == 'sco') {
1636 1644 $result->toc .= '<a title="'.$sco->url.'">'.$sco->statusicon.'&nbsp;'.format_string($sco->title).'&nbsp;'.$score.'</a>';
1637 1645 } else {

0 comments on commit 417d004

Please sign in to comment.
Something went wrong with that request. Please try again.