choice MDL-19805 Updated print_header_simple and build_navigation to OUTPUT and PAGE equivalents

This commit is contained in:
samhemelryk
2009-09-08 02:05:11 +00:00
parent 207e24b829
commit 3180e717a2
3 changed files with 10 additions and 13 deletions
+3 -6
View File
@@ -15,12 +15,9 @@
$strchoice = get_string("modulename", "choice");
$strchoices = get_string("modulenameplural", "choice");
$navlinks = array();
$navlinks[] = array('name' => $strchoices, 'link' => '', 'type' => 'activity');
$navigation = build_navigation($navlinks);
print_header_simple("$strchoices", "", $navigation, "", "", true, "", navmenu($course));
$PAGE->set_title($strchoices);
$PAGE->navbar->add($strchoices);
echo $OUTPUT->header();
if (! $choices = get_all_instances_in_course("choice", $course)) {
notice(get_string('thereareno', 'moodle', $strchoices), "../../course/view.php?id=$course->id");
+4 -4
View File
@@ -39,10 +39,10 @@
}
if (!$download) {
$navigation = build_navigation($strresponses, $cm);
print_header_simple(format_string($choice->name).": $strresponses", "", $navigation, "", '', true,
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
$PAGE->navbar->add($strresponses);
$PAGE->set_title(format_string($choice->name).": $strresponses");
$PAGE->set_button(update_module_button($cm->id, $course->id, $strchoice));
echo $OUTPUT->header();
/// Check to see if groups are being used in this choice
$groupmode = groups_get_activity_groupmode($cm);
if ($groupmode) {
+3 -3
View File
@@ -36,9 +36,9 @@
}
}
$navigation = build_navigation('', $cm);
print_header_simple(format_string($choice->name), "", $navigation, "", "", true,
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
$PAGE->set_title(format_string($choice->name));
$PAGE->set_button(update_module_button($cm->id, $course->id, $strchoice));
echo $OUTPUT->header();
/// Submit any new data if there is any
if ($form = data_submitted() && has_capability('mod/choice:choose', $context)) {