From: samhemelryk Date: Mon, 7 Sep 2009 06:28:37 +0000 (+0000) Subject: lesson MDL-19812 Updated print_header and build_navigation to OUTPUT and PAGE equivalents X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2458610a27e56d82267e0e19206c3dcf3229f616;p=moodle.git lesson MDL-19812 Updated print_header and build_navigation to OUTPUT and PAGE equivalents --- diff --git a/mod/lesson/import.php b/mod/lesson/import.php index 8dc26d8dcc..1358e8ed23 100644 --- a/mod/lesson/import.php +++ b/mod/lesson/import.php @@ -35,8 +35,10 @@ $strimportquestions = get_string("importquestions", "lesson"); $strlessons = get_string("modulenameplural", "lesson"); - $navigation = build_navigation($strimportquestions, $cm); - print_header_simple("$strimportquestions", " $strimportquestions", $navigation); + $PAGE->navbar->add($strimportquestions); + $PAGE->set_title($strimportquestions); + $PAGE->set_heading($strimportquestions); + echo $OUTPUT->header(); if ($form = data_submitted()) { /// Filename diff --git a/mod/lesson/importppt.php b/mod/lesson/importppt.php index 1e885e3f7e..2a92304f14 100644 --- a/mod/lesson/importppt.php +++ b/mod/lesson/importppt.php @@ -44,8 +44,10 @@ $strimportppt = get_string("importppt", "lesson"); $strlessons = get_string("modulenameplural", "lesson"); - $navigation = build_navigation($strimportppt, $cm); - print_header_simple("$strimportppt", " $strimportppt", $navigation); + $PAGE->navbar->add($strimportppt); + $PAGE->set_title($strimportppt); + $PAGE->set_heading($strimportppt); + echo $OUTPUT->header(); if ($form = data_submitted()) { /// Filename diff --git a/mod/lesson/index.php b/mod/lesson/index.php index f81bf85c74..f707ae3ca0 100644 --- a/mod/lesson/index.php +++ b/mod/lesson/index.php @@ -29,12 +29,10 @@ /// Print the header - $navlinks = array(); - $navlinks[] = array('name' => $strlessons, 'link' => '', 'type' => 'activity'); - - $navigation = build_navigation($navlinks); - - print_header("$course->shortname: $strlessons", $course->fullname, $navigation, "", "", true, "", navmenu($course)); + $PAGE->navbar->add($strlessons); + $PAGE->set_title("$course->shortname: $strlessons"); + $PAGE->set_heading($course->fullname); + echo $OUTPUT->header(); /// Get all the appropriate data diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index f88658a752..f02fb2bb8b 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -260,8 +260,10 @@ function lesson_print_header($cm, $course, $lesson, $currenttab = '', $extraedit } /// Header setup - $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(); if (has_capability('mod/lesson:manage', $context)) { print_heading_with_help($activityname, 'overview', 'lesson'); diff --git a/mod/lesson/mediafile.php b/mod/lesson/mediafile.php index b7516c80ca..af39fdffdd 100644 --- a/mod/lesson/mediafile.php +++ b/mod/lesson/mediafile.php @@ -36,12 +36,14 @@ $mimetype = mimeinfo("type", $lesson->mediafile); if (!is_url($lesson->mediafile) and !in_array($mimetype, array('text/plain', 'text/html'))) { - print_header($course->shortname); + $PAGE->set_title($course->shortname); + echo $OUTPUT->header(); } if ($printclose) { // this is for framesets if ($lesson->mediaclose) { - print_header($course->shortname); + $PAGE->set_title($course->shortname); + echo $OUTPUT->header(); echo '