From 3180e717a2b9773b5cf7daf1f8de5537439bc7f2 Mon Sep 17 00:00:00 2001 From: samhemelryk Date: Tue, 8 Sep 2009 02:05:11 +0000 Subject: [PATCH] choice MDL-19805 Updated print_header_simple and build_navigation to OUTPUT and PAGE equivalents --- mod/choice/index.php | 9 +++------ mod/choice/report.php | 8 ++++---- mod/choice/view.php | 6 +++--- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/mod/choice/index.php b/mod/choice/index.php index 4b497099f4..75cf6f72be 100644 --- a/mod/choice/index.php +++ b/mod/choice/index.php @@ -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"); diff --git a/mod/choice/report.php b/mod/choice/report.php index fe09d7dad2..542488b611 100644 --- a/mod/choice/report.php +++ b/mod/choice/report.php @@ -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) { diff --git a/mod/choice/view.php b/mod/choice/view.php index f69df4660e..97fce9e8c6 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -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)) { -- 2.39.5