From: bobopinna Date: Wed, 12 Apr 2006 06:12:16 +0000 (+0000) Subject: Fixed navigation bar link for SCORM course format X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=df88f4ea9d21ffe6c4e16eb6330ed5f14ed9a94a;p=moodle.git Fixed navigation bar link for SCORM course format --- diff --git a/mod/scorm/player.php b/mod/scorm/player.php index cb3e56fd99..2a4b7d55d5 100755 --- a/mod/scorm/player.php +++ b/mod/scorm/player.php @@ -45,9 +45,15 @@ $strscorm = get_string('modulename', 'scorm'); $strpopup = get_string('popup','scorm'); - if ($course->category) { - $navigation = "framename}\" href=\"../../course/view.php?id=$course->id\">$course->shortname -> - framename}\" href=\"index.php?id=$course->id\">$strscorms ->"; + if ($course->category != 0) { + $navigation = "framename}\" href=\"../../course/view.php?id=$course->id\">$course->shortname ->"; + 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 .= "framename}\" href=\"index.php?id=$course->id\">$strscorms ->"; + } + } } else { $navigation = "framename}\" href=\"index.php?id=$course->id\">$strscorms ->"; }