]> git.mjollnir.org Git - moodle.git/commitdiff
choice MDL-19805 Updated print_header_simple and build_navigation to OUTPUT and PAGE...
authorsamhemelryk <samhemelryk>
Tue, 8 Sep 2009 02:05:11 +0000 (02:05 +0000)
committersamhemelryk <samhemelryk>
Tue, 8 Sep 2009 02:05:11 +0000 (02:05 +0000)
mod/choice/index.php
mod/choice/report.php
mod/choice/view.php

index 4b497099f458fc4a4e5a868f5d35dc6f3472e071..75cf6f72be153ea87d22e184916fc4c0e079e2a8 100644 (file)
 
     $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");
index fe09d7dad20ecb41da59567f8528bb37c331d11f..542488b611aab4d63e3abf8f55e4b4cc106ce3b5 100644 (file)
     }
 
     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) {
index f69df4660e469c272bbb1ac0b963015a56c09d42..97fce9e8c6bc6805d7b4eee5f83d23d741e3c199 100644 (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)) {