Permalink
Browse files

Fixed navigation bar link for SCORM course format

  • Loading branch information...
1 parent 82c3173 commit df88f4ea9d21ffe6c4e16eb6330ed5f14ed9a94a bobopinna committed Apr 12, 2006
Showing with 9 additions and 3 deletions.
  1. +9 −3 mod/scorm/player.php
View
@@ -45,9 +45,15 @@
$strscorm = get_string('modulename', 'scorm');
$strpopup = get_string('popup','scorm');
- if ($course->category) {
- $navigation = "<a target=\"{$CFG->framename}\" href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
- <a target=\"{$CFG->framename}\" href=\"index.php?id=$course->id\">$strscorms</a> ->";
+ if ($course->category != 0) {
+ $navigation = "<a target=\"{$CFG->framename}\" href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
+ if ($scorms = get_all_instances_in_course('scorm', $course)) {
+ // The module SCORM activity with the least id is the course
+ $firstscorm = current($scorms);
+ if (!(($course->format == 'scorm') && ($firstscorm->id == $scorm->id))) {
+ $navigation .= "<a target=\"{$CFG->framename}\" href=\"index.php?id=$course->id\">$strscorms</a> ->";
+ }
+ }
} else {
$navigation = "<a target=\"{$CFG->framename}\" href=\"index.php?id=$course->id\">$strscorms</a> ->";
}

0 comments on commit df88f4e

Please sign in to comment.