Breadcrumbs: mod/choice changes

- Modified to use build_navigation() for breadcrumb generation.


Author: Matt Clarkson <mattc@catalyst.net.nz>
This commit is contained in:
mattc-catalyst 2007-04-16 21:02:24 +00:00
parent 160addd2b2
commit 161fbddf13
3 changed files with 16 additions and 8 deletions

View File

@ -15,9 +15,10 @@
$strchoice = get_string("modulename", "choice"); $strchoice = get_string("modulename", "choice");
$strchoices = get_string("modulenameplural", "choice"); $strchoices = get_string("modulenameplural", "choice");
$crumbs[] = array('name' => $strchoices, 'link' => '', 'type' => 'activity');
$navigation = build_navigation($crumbs, $course);
print_header_simple("$strchoices", "", print_header_simple("$strchoices", "", $navigation, "", "", true, "", navmenu($course));
"$strchoices", "", "", true, "", navmenu($course));
if (! $choices = get_all_instances_in_course("choice", $course)) { if (! $choices = get_all_instances_in_course("choice", $course)) {

View File

@ -39,9 +39,14 @@
} }
if ($download <> "xls" and $download <> "txt" and $download <> "ods") { 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> -> $crumbs[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
<a href=\"view.php?id=$cm->id\">".format_string($choice->name,true)."</a> -> $strresponses", "", '', true, $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)); update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
} }

View File

@ -52,10 +52,12 @@
/// Display the choice and possibly results /// 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), "", print_header_simple(format_string($choice->name), "", $navigation, "", "", true,
"<a href=\"index.php?id=$course->id\">$strchoices</a> -> ".format_string($choice->name), "", "", true,
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm)); 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); add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", $choice->id, $cm->id);