- Modified to use build_navigation() for breadcrumb generation.
Author: Matt Clarkson <mattc@catalyst.net.nz>
$title = format_string($course->shortname) . ": $strmodulenameplural";
$heading = $course->fullname;
- $navigation = $strmodulenameplural;
- if ($course->id != SITEID) {
- $navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
- }
+
+ $crumbs[] = array('name' => $strmodulenameplural, 'link' => '', 'type' => 'activity');
+ $navigation = build_navigation($crumbs, $course);
+
print_header($title, $heading, $navigation, "", "", true, "", navmenu($course));
$next_url = "$CFG->wwwroot/course/view.php?id=$course->id";
$title = format_string($course->shortname) . ": $hotpot->name";
$heading = $course->fullname;
+
+ $crumbs[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
+ $crumbs[] = array('name' => $hotpot->name, 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
- $navigation = "<a href=index.php?id=$course->id>$strmodulenameplural</a> -> ";
- $navigation .= "<a href=\"view.php?id=$cm->id\">$hotpot->name</a> -> ";
$modulecontext = get_context_instance(CONTEXT_MODULE, $cm->id);
if (has_capability('mod/hotpot:viewreport',$modulecontext)) {
} else {
$module = "hotpot";
}
- $navigation .= get_string("report$mode", $module);
+
+ $crumbs[] = array('name' => get_string("report$mode", $module), 'link' => '', 'type' => 'title');
+
} else {
- $navigation .= get_string("report", "quiz");
- }
- if ($course->id != SITEID) {
- $navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
+
+ $crumbs[] = array('name' => get_string("report", "quiz"), 'link' => '', 'type' => 'title');
}
- $button = update_module_button($cm->id, $course->id, $strmodulename);
+ $button = update_module_button($cm->id, $course->id, $strmodulename);
+ $navigation = build_navigation($crumbs, $course);
print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
print_heading($hotpot->name);
// print header
$title = format_string($course->shortname) . ": $hotpot->name";
$heading = $course->fullname;
- $navigation = "<a href=\"index.php?id=$course->id\">$strmodulenameplural</a> -> ".get_string("review", "quiz");
- if ($course->id != SITEID) {
- $navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
- }
+
+ $crumbs[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
+ $crumbs[] = array('name' => get_string("review", "quiz"), 'link' => '', 'type' => 'activityinstance');
+ $navigation = build_navigation($crumbs, $course);
+
+
$button = update_module_button($cm->id, $course->id, $strmodulename);
print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
print '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib
// header strings
$title = format_string($course->shortname.': '.$hotpot->name, true);
$heading = $course->fullname;
- $navigation = '<a '.$CFG->frametarget.' href="'.$CFG->wwwroot.'/mod/hotpot/index.php?id='.$course->id.'">'.get_string("modulenameplural", "hotpot")."</a> -> $hotpot->name";
- if ($course->id != SITEID) {
- $navigation = '<a '.$CFG->frametarget.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> -> '.$navigation;
- }
+ $crumbs[] = array('name' => get_string("modulenameplural", "hotpot"), 'link' => $CFG->wwwroot.'/mod/hotpot/index.php?id='.$course->id, 'type' => 'activity');
+ $crumbs[] = array('name' => $hotpot->name, 'link' => '', 'type' => 'activityinstance');
+
+ $navigation = build_navigation($crumbs, $course);
+
$button = update_module_button($cm->id, $course->id, get_string("modulename", "hotpot"));
$button = '<div style="font-size:0.75em;">'.$button.'</div>';
$loggedinas = '<span class="logininfo">'.user_login_string($course, $USER).'</span>';