]> git.mjollnir.org Git - moodle.git/commitdiff
lesson MDL-19812 Updated print_header and build_navigation to OUTPUT and PAGE equivalents
authorsamhemelryk <samhemelryk>
Mon, 7 Sep 2009 06:28:37 +0000 (06:28 +0000)
committersamhemelryk <samhemelryk>
Mon, 7 Sep 2009 06:28:37 +0000 (06:28 +0000)
mod/lesson/import.php
mod/lesson/importppt.php
mod/lesson/index.php
mod/lesson/locallib.php
mod/lesson/mediafile.php

index 8dc26d8dcc145fc4681f698913d50eef1ab01a6a..1358e8ed23e4c90dec9adc734cd5febb275db6ca 100644 (file)
     $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
 
index 1e885e3f7e45ce32a20264b3eb8b568bb61cda77..2a92304f14b282235352d9f42aa4d098d00fa937 100644 (file)
     $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
 
index f81bf85c7488bb82b3b8902f0e580ca6b8294c78..f707ae3ca0bfac4804dcf406038962956f35772d 100644 (file)
 
 
 /// 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
 
index f88658a752e784a41d12ea68db34cf620b14f0eb..f02fb2bb8b000ff6f0b5589e1f1f1e5bc3555fec 100644 (file)
@@ -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');
index b7516c80ca1fa589ddcf1cbba03fbb2e4c5b4f14..af39fdffdd70d86b201bafda572226b83ff148fe 100644 (file)
     $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 '<div class="lessonmediafilecontrol">
                 <form>
                 <div>