diff --git a/mod/data/comment.php b/mod/data/comment.php index 1d65c6d2cfc..151204394fb 100755 --- a/mod/data/comment.php +++ b/mod/data/comment.php @@ -110,7 +110,7 @@ redirect('view.php?rid='.$record->id.'&page='.$page, get_string('commentdeleted', 'data')); } else { //print confirm delete form - print_header(); + echo $OUTPUT->header(); data_print_comment($data, $comment, $page); echo $OUTPUT->confirm(get_string('deletecomment','data'), @@ -123,7 +123,7 @@ } - print_header(); + echo $OUTPUT->header(); data_print_comments($data, $record, $page, $mform); echo $OUTPUT->footer(); diff --git a/mod/data/edit.php b/mod/data/edit.php index 21b4fa6d060..51b8a329b84 100755 --- a/mod/data/edit.php +++ b/mod/data/edit.php @@ -68,8 +68,8 @@ if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities', $context)) { $strdatabases = get_string("modulenameplural", "data"); - $navigation = build_navigation('', $cm); - print_header_simple(format_string($data->name), "", $navigation, "", "", true, '', navmenu($course, $cm)); + $PAGE->set_title(format_string($data->name)); + echo $OUTPUT->header(); notice(get_string("activityiscurrentlyhidden")); } @@ -108,10 +108,9 @@ /// Print the page header $strdata = get_string('modulenameplural','data'); - $navigation = build_navigation('', $cm); - print_header_simple($data->name, '', $navigation, - '', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')), - navmenu($course, $cm), '', ''); + $PAGE->set_title($data->name); + $PAGE->set_button(update_module_button($cm->id, $course->id, get_string('modulename', 'data'))); + echo $OUTPUT->header(); /// Check to see if groups are being used here groups_print_activity_menu($cm, 'edit.php?d='.$data->id); diff --git a/mod/data/export.php b/mod/data/export.php index 915b2821adf..2242aef2f45 100644 --- a/mod/data/export.php +++ b/mod/data/export.php @@ -55,10 +55,9 @@ if($mform->is_cancelled()) { redirect('view.php?d='.$data->id); } elseif (!$formdata = (array) $mform->get_data()) { // build header to match the rest of the UI - $nav = build_navigation('', $cm); - print_header_simple($data->name, '', $nav, - '', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')), - navmenu($course, $cm), '', ''); + $PAGE->set_title($data->name); + $PAGE->set_button(update_module_button($cm->id, $course->id, get_string('modulename', 'data'))); + echo $OUTPUT->header(); echo $OUTPUT->heading(format_string($data->name)); // these are for the tab display diff --git a/mod/data/field/latlong/kml.php b/mod/data/field/latlong/kml.php index 690d8dc652f..fa451ac41b9 100644 --- a/mod/data/field/latlong/kml.php +++ b/mod/data/field/latlong/kml.php @@ -57,9 +57,8 @@ require_course_login($course, true, $cm); /// If it's hidden then it's don't show anything. :) if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities',get_context_instance(CONTEXT_MODULE, $cm->id))) { - $navigation = build_navigation('', $cm); - print_header_simple(format_string($data->name), "", $navigation, - "", "", true, '', navmenu($course, $cm)); + $PAGE->set_title($data->name); + echo $OUTPUT->header(); notice(get_string("activityiscurrentlyhidden")); } diff --git a/mod/data/import.php b/mod/data/import.php index 878d565a2d8..6aad72b4a3f 100755 --- a/mod/data/import.php +++ b/mod/data/import.php @@ -65,8 +65,8 @@ /// Print the page header $strdata = get_string('modulenameplural','data'); - $navigation = build_navigation('', $cm); - print_header_simple($data->name, "", $navigation, "", "", true, "", navmenu($course)); + $PAGE->set_title($data->name); + echo $OUTPUT->header(); echo $OUTPUT->heading(format_string($data->name)); /// Groups needed for Add entry tab diff --git a/mod/data/index.php b/mod/data/index.php index 12c4b8ae824..9f1497e8811 100755 --- a/mod/data/index.php +++ b/mod/data/index.php @@ -43,11 +43,9 @@ $strdata = get_string('modulename','data'); $strdataplural = get_string('modulenameplural','data'); - $navlinks = array(); - $navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity'); - $navigation = build_navigation($navlinks); - - print_header_simple($strdata, '', $navigation, '', '', true, "", navmenu($course)); + $PAGE->navbar->add($strdata, new moodle_url($CFG->wwwroot.'/mod/data/index.php', array('id'=>$course->id))); + $PAGE->set_title($strdata); + echo $OUTPUT->header(); if (! $datas = get_all_instances_in_course("data", $course)) { notice(get_string('thereareno', 'moodle',$strdataplural) , "$CFG->wwwroot/course/view.php?id=$course->id"); diff --git a/mod/data/lib.php b/mod/data/lib.php index e1da1158519..2ebe924f257 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -2051,13 +2051,11 @@ function data_get_available_presets($context) { */ function data_print_header($course, $cm, $data, $currenttab='') { - global $CFG, $displaynoticegood, $displaynoticebad, $OUTPUT; - - $navigation = build_navigation('', $cm); - print_header_simple($data->name, '', $navigation, - '', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')), - navmenu($course, $cm)); + global $CFG, $displaynoticegood, $displaynoticebad, $OUTPUT, $PAGE; + $PAGE->set_title($data->name); + $PAGE->set_button(update_module_button($cm->id, $course->id, get_string('modulename', 'data'))); + echo $OUTPUT->header(); echo $OUTPUT->heading(format_string($data->name)); // Groups needed for Add entry tab diff --git a/mod/data/report.php b/mod/data/report.php index 8ff382b4a63..6a181e008eb 100755 --- a/mod/data/report.php +++ b/mod/data/report.php @@ -47,7 +47,8 @@ $strrating = get_string('rating', 'data'); $strname = get_string('name'); - print_header($strratings); + $PAGE->set_title($strratings); + echo $OUTPUT->header(); if (!$ratings = data_get_ratings($record->id, $sqlsort)) { print_error('noratingforrecord', 'data'); diff --git a/mod/data/templates.php b/mod/data/templates.php index c4f0d8d1e59..1c252bbf48b 100755 --- a/mod/data/templates.php +++ b/mod/data/templates.php @@ -79,11 +79,9 @@ $bodytag .= '" '; $PAGE->requires->js('mod/data/data.js'); - $navigation = build_navigation('', $cm); - print_header_simple($data->name, '', $navigation, - '', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')), - navmenu($course, $cm), '', $bodytag); - + $PAGE->set_title($data->name); + $PAGE->set_button(update_module_button($cm->id, $course->id, get_string('modulename', 'data'))); + echo $OUTPUT->header(); echo $OUTPUT->heading(format_string($data->name)); diff --git a/mod/data/view.php b/mod/data/view.php index 09dbdfb20dd..2d8c0325142 100755 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -288,9 +288,11 @@ } $buttons .= ''; - $navigation = build_navigation(array(), $cm); - print_header($title, $course->fullname, $navigation, '', '', true, $buttons, navmenu($course, $cm)); - + $PAGE->set_title($title); + $PAGE->set_heading($course->fullname); + $PAGE->set_button($buttons); + echo $OUTPUT->header(); + /// Check to see if groups are being used here $returnurl = 'view.php?d='.$data->id.'&search='.s($search).'&sort='.s($sort).'&order='.s($order).'&'; groups_print_activity_menu($cm, $returnurl);