Breadcrumbs: mod/survey 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:29:42 +00:00
parent afd97d1c9d
commit dc0e9265f6
4 changed files with 27 additions and 13 deletions

View File

@ -20,8 +20,11 @@
$strstatus = get_string("status");
$strdone = get_string("done", "survey");
$strnotdone = get_string("notdone", "survey");
print_header_simple("$strsurveys", "", "$strsurveys",
$crumbs[] = array('name' => $strsurveys, 'link' => '', 'type' => 'activity');
$navigation = build_navigation($crumbs, $course);
print_header_simple("$strsurveys", "", $navigation,
"", "", true, "", navmenu($course));
if (! $surveys = get_all_instances_in_course("survey", $course)) {

View File

@ -64,8 +64,13 @@
$navigation = "<a href=\"index.php?id=$course->id\">$strsurveys</a> ->
<a href=\"view.php?id=$cm->id\">".format_string($survey->name,true)."</a> -> ";
}
print_header("$course->shortname: ".format_string($survey->name), $course->fullname, "$navigation $strreport",
$crumbs[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
$crumbs[] = array('name' => format_string($survey->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
$crumbs[] = array('name' => $strreport, 'link' => '', 'type' => 'title');
$navigation = build_navigation($crumbs, $course);
print_header("$course->shortname: ".format_string($survey->name), $course->fullname, $navigation,
"", "", true,
update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm));

View File

@ -31,6 +31,16 @@
add_to_log($course->id, "survey", "submit", "view.php?id=$cm->id", "$survey->id", "$cm->id");
$strsurveys = get_string("modulenameplural", "survey");
$strsurveysaved = get_string("surveysaved", "survey");
$crumbs[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
$crumbs[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinstance');
$crumbs[] = array('name' => $strsurveysaved, 'link' => '', 'type' => 'title');
$navigation = build_navigation($crumbs, $course);
print_header_simple("$strsurveysaved", "", $navigation, "");
if (survey_already_done($survey->id, $USER->id)) {
notice(get_string("alreadysubmitted", "survey"), $_SERVER["HTTP_REFERER"]);
exit;
@ -85,13 +95,6 @@
// Print the page and finish up.
$strsurveys = get_string("modulenameplural", "survey");
$strsurveysaved = get_string("surveysaved", "survey");
print_header_simple("$strsurveysaved", "",
"<a href=\"index.php?id=$course->id\">$strsurveys</a> -> ".format_string($survey->name)." -> $strsurveysaved", "");
notice(get_string("thanksforanswers","survey", $USER->firstname), "$CFG->wwwroot/course/view.php?id=$course->id");
exit;

View File

@ -37,8 +37,11 @@
$strsurveys = get_string("modulenameplural", "survey");
$strsurvey = get_string("modulename", "survey");
print_header_simple(format_string($survey->name), "",
"<a href=\"index.php?id=$course->id\">$strsurveys</a> -> ".format_string($survey->name), "", "", true,
$crumbs[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');;
$crumbs[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinistance');
$navigation = build_navigation($crumbs, $course);
print_header_simple(format_string($survey->name), "", $navigation, "", "", true,
update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm));
/// Check to see if groups are being used in this survey