- Modified to use build_navigation() for breadcrumb generation.
Author: Matt Clarkson <mattc@catalyst.net.nz>
$strchoice = get_string("modulename", "choice");
$strchoices = get_string("modulenameplural", "choice");
+ $crumbs[] = array('name' => $strchoices, 'link' => '', 'type' => 'activity');
+ $navigation = build_navigation($crumbs, $course);
- print_header_simple("$strchoices", "",
- "$strchoices", "", "", true, "", navmenu($course));
+ print_header_simple("$strchoices", "", $navigation, "", "", true, "", navmenu($course));
if (! $choices = get_all_instances_in_course("choice", $course)) {
}
if ($download <> "xls" and $download <> "txt" and $download <> "ods") {
- print_header_simple(format_string($choice->name).": $strresponses", "",
- "<a href=\"index.php?id=$course->id\">$strchoices</a> ->
- <a href=\"view.php?id=$cm->id\">".format_string($choice->name,true)."</a> -> $strresponses", "", '', true,
+
+ $crumbs[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
+ $crumbs[] = array('name' => format_string($choice->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ $crumbs[] = array('name' => $strresponses, 'link' => '', 'type' => 'title');
+
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header_simple(format_string($choice->name).": $strresponses", "", $navigation, "", '', true,
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
}
/// Display the choice and possibly results
+ $crumbs[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
+ $crumbs[] = array('name' => format_string($choice->name), 'link' => '', 'type' => 'activityinstance');
+
+ $navigation = build_navigation($crumbs, $course);
-
- print_header_simple(format_string($choice->name), "",
- "<a href=\"index.php?id=$course->id\">$strchoices</a> -> ".format_string($choice->name), "", "", true,
+ print_header_simple(format_string($choice->name), "", $navigation, "", "", true,
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", $choice->id, $cm->id);