Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed navigation bar links for SCORM course format

  • Loading branch information...
commit 9ff41f7ed09569372240f684d583b78791dcb828 1 parent df88f4e
bobopinna authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 mod/scorm/view.php
View
12 mod/scorm/view.php
@@ -43,9 +43,15 @@
$strscorms = get_string("modulenameplural", "scorm");
$strscorm = get_string("modulename", "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> ->";
}
Please sign in to comment.
Something went wrong with that request. Please try again.