From: samhemelryk Date: Tue, 8 Sep 2009 02:02:03 +0000 (+0000) Subject: mod-survey MDL-19816 Updated print_header_simple and build_navigation to OUTPUT and... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=207e24b82967cac131afc14e219fe4b5dbe7d116;p=moodle.git mod-survey MDL-19816 Updated print_header_simple and build_navigation to OUTPUT and PAGE equivalents --- diff --git a/mod/survey/index.php b/mod/survey/index.php index 51b0b7502b..188d8dbab7 100644 --- a/mod/survey/index.php +++ b/mod/survey/index.php @@ -21,12 +21,9 @@ $strdone = get_string("done", "survey"); $strnotdone = get_string("notdone", "survey"); - $navlinks = array(); - $navlinks[] = array('name' => $strsurveys, 'link' => '', 'type' => 'activity'); - $navigation = build_navigation($navlinks); - - print_header_simple("$strsurveys", "", $navigation, - "", "", true, "", navmenu($course)); + $PAGE->navbar->add($strsurveys); + $PAGE->set_title($strsurveys); + echo $OUTPUT->header(); if (! $surveys = get_all_instances_in_course("survey", $course)) { notice(get_string('thereareno', 'moodle', $strsurveys), "../../course/view.php?id=$course->id"); diff --git a/mod/survey/save.php b/mod/survey/save.php index bcc9e6202e..88b4763572 100644 --- a/mod/survey/save.php +++ b/mod/survey/save.php @@ -33,9 +33,8 @@ $strsurveysaved = get_string('surveysaved', 'survey'); - $navigation = build_navigation('', $cm); - print_header_simple("$strsurveysaved", "", $navigation, ""); - + $PAGE->set_title($strsurveysaved); + echo $OUTPUT->header(); if (survey_already_done($survey->id, $USER->id)) { notice(get_string("alreadysubmitted", "survey"), $_SERVER["HTTP_REFERER"]); diff --git a/mod/survey/view.php b/mod/survey/view.php index 44691a87b5..76bbb0958c 100644 --- a/mod/survey/view.php +++ b/mod/survey/view.php @@ -34,9 +34,9 @@ $showscales = ($template->name != 'ciqname'); $strsurvey = get_string("modulename", "survey"); - $navigation = build_navigation('', $cm); - print_header_simple(format_string($survey->name), "", $navigation, "", "", true, - update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm)); + $PAGE->set_title(format_string($survey->name)); + $PAGE->set_button(update_module_button($cm->id, $course->id, $strsurvey)); + echo $OUTPUT->header(); /// Check to see if groups are being used in this survey if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used