- Modified to use build_navigation() for breadcrumb generation.
Author: Matt Clarkson <mattc@catalyst.net.nz>
$strsummary = get_string("summary");
$strreport = get_string("report",'scorm');
$strlastmodified = get_string("lastmodified");
+
+ $crumbs[] = array('name' => $strscorms, 'link' => '', 'type' => 'activity');
+ $navigation = build_navigation($crumbs, $course);
- print_header_simple("$strscorms", "", "$strscorms",
+ print_header_simple("$strscorms", "", $navigation,
"", "", true, "", navmenu($course));
if ($course->format == "weeks" or $course->format == "topics") {
$strpopup = get_string('popup','scorm');
if ($course->id != SITEID) {
- $navigation = "<a $CFG->frametarget href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
if ($scorms = get_all_instances_in_course('scorm', $course)) {
// The module SCORM/AICC activity with the first id is the course
$firstscorm = current($scorms);
if (!(($course->format == 'scorm') && ($firstscorm->id == $scorm->id))) {
- $navigation .= "<a $CFG->frametarget href=\"index.php?id=$course->id\">$strscorms</a> ->";
+ $crumbs[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
}
}
- } else {
- $navigation = "<a $CFG->frametarget href=\"index.php?id=$course->id\">$strscorms</a> ->";
}
$pagetitle = strip_tags("$course->shortname: ".format_string($scorm->name));
if (!$cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_COURSE,$course->id))) {
- print_header($pagetitle, $course->fullname,
- "$navigation <a $CFG->frametarget href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>",
+ $crumbs[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header($pagetitle, $course->fullname, $navigation,
'', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false);
notice(get_string("activityiscurrentlyhidden"));
}
if ($scorm->popup == 1) {
$bodyscript = 'onunload="main.close();"';
}
-
+
+ $crumbs[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ $navigation = build_navigation($crumbs, $course);
+
print_header($pagetitle, $course->fullname,
- "$navigation <a $CFG->frametarget href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>",
+ $navigation,
'', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false, $bodyscript);
if ($sco->scormtype == 'sco') {
?>
/// Print the page header
if (empty($noheader)) {
- if ($course->id != SITEID) {
- $navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
- } else {
- $navigation = '';
- }
$strscorms = get_string('modulenameplural', 'scorm');
$strscorm = get_string('modulename', 'scorm');
$strreport = get_string('report', 'scorm');
$strattempt = get_string('attempt', 'scorm');
$strname = get_string('name');
+
+ $crumbs[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
+ $crumbs[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+
if (empty($b)) {
if (empty($a)) {
- print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,
- "$navigation <a href=\"index.php?id=$course->id\">$strscorms</a>
- -> <a href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a> -> $strreport",
+ $navigation = build_navigation($crumbs, $course);
+ print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,$navigation,
'', '', true);
} else {
+
+ $crumbs[] = array('name' => $strreport, 'link' => "report.php?id=$cm->id", 'type' => 'title');
+ $crumbs[] = array('name' => "$strattempt $attempt - ".fullname($userdata), 'link' => '', 'type' => 'title');
+ $navigation = build_navigation($crumbs, $course);
+
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,
- "$navigation <a href=\"index.php?id=$course->id\">$strscorms</a>
- -> <a href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>
- -> <a href=\"report.php?id=$cm->id\">$strreport</a> -> $strattempt $attempt - ".fullname($userdata),
- '', '', true);
+ $navigation, '', '', true);
}
} else {
- print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,
- "$navigation <a href=\"index.php?id=$course->id\">$strscorms</a>
- -> <a href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>
- -> <a href=\"report.php?id=$cm->id\">$strreport</a>
- -> <a href=\"report.php?a=$a&user=$user&attempt=$attempt\">$strattempt $attempt - ".fullname($userdata)."</a> -> $sco->title",
+
+ $crumbs[] = array('name' => $strreport, 'link' => "report.php?id=$cm->id", 'type' => 'title');
+ $crumbs[] = array('name' => "$strattempt $attempt - ".fullname($userdata), 'link' => "report.php?a=$a&user=$user&attempt=$attempt", 'type' => 'title');
+ $crumbs[] = array('name' => $sco->title, 'link' => '', 'type' => 'title');
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header("$course->shortname: ".format_string($scorm->name), $course->fullname, $navigation,
'', '', true);
}
print_heading(format_string($scorm->name));
$strscorm = get_string("modulename", "scorm");
if ($course->id != SITEID) {
- $navigation = "<a $CFG->frametarget 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 $CFG->frametarget href=\"index.php?id=$course->id\">$strscorms</a> ->";
+ $crumbs[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
}
}
- } else {
- $navigation = "<a $CFG->frametarget href=\"index.php?id=$course->id\">$strscorms</a> ->";
}
-
$pagetitle = strip_tags($course->shortname.': '.format_string($scorm->name));
add_to_log($course->id, 'scorm', 'pre-view', 'view.php?id='.$cm->id, "$scorm->id");
//
// Print the page header
//
- print_header($pagetitle, $course->fullname,
- "$navigation <a $CFG->frametarget href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>",
+ $crumbs[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header($pagetitle, $course->fullname, $navigation,
'', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));
if (empty($cm->visible) and !has_capability('moodle/course:manageactivities', $context)) {