From: bobopinna Date: Wed, 12 Apr 2006 06:13:29 +0000 (+0000) Subject: Fixed navigation bar links for SCORM course format X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9ff41f7ed09569372240f684d583b78791dcb828;p=moodle.git Fixed navigation bar links for SCORM course format --- diff --git a/mod/scorm/view.php b/mod/scorm/view.php index 414daa6610..64dd861fa7 100755 --- a/mod/scorm/view.php +++ b/mod/scorm/view.php @@ -43,9 +43,15 @@ $strscorms = get_string("modulenameplural", "scorm"); $strscorm = get_string("modulename", "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 ->"; }