]> git.mjollnir.org Git - moodle.git/commitdiff
lib MDL-19799 Updated print_header_simple and build_navigation to OUTPUT and PAGE...
authorsamhemelryk <samhemelryk>
Tue, 8 Sep 2009 01:39:12 +0000 (01:39 +0000)
committersamhemelryk <samhemelryk>
Tue, 8 Sep 2009 01:39:12 +0000 (01:39 +0000)
admin/roles/tabs.php
lib/moodlelib.php
my/index.php
webservice/amf/testclient/index.php

index c77f1081b184950ee04a365b3d033888fb457b84..5bb49ec1fcc96886ee0ae3ff2fa4f8ac8abd3030 100755 (executable)
@@ -111,8 +111,9 @@ if ($currenttab != 'update') {
             if (empty($title)) {
                 $title = get_string("editinga", "moodle", $fullmodulename);
             }
-            print_header_simple($title, '', '', '', '', false);
-
+            $PAGE->set_title($title);
+            $PAGE->set_cacheable(false);
+            echo $OUTPUT->header();
             break;
 
         case CONTEXT_BLOCK:
index 5dece66877d23d6eb07ae5bf94181150ae2a1af2..edf5400bbcc75471bdb2c3392cac1fdec29b617e 100644 (file)
@@ -2147,7 +2147,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsu
             //
             if ( !($COURSE->visible && course_parent_visible($COURSE)) &&
                    !has_capability('moodle/course:viewhiddencourses', $COURSE->context)) {
-                print_header_simple();
+                echo $OUTPUT->header();
                 notice(get_string('coursehidden'), $CFG->wwwroot .'/');
             }
         }
@@ -2174,7 +2174,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsu
 
                 case 1:    /// Guests always allowed
                     if (!has_capability('moodle/course:view', $COURSE->context)) {    // Prohibited by capability
-                        print_header_simple();
+                        echo $OUTPUT->header();
                         notice(get_string('guestsnotallowed', '', format_string($COURSE->fullname)), get_login_url());
                     }
                     if (!empty($cm) and !$cm->visible) { // Not allowed to see module, send to course page
@@ -2198,7 +2198,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsu
                 default:    /// Guests not allowed
                     $strloggedinasguest = get_string('loggedinasguest');
                     $PAGE->navbar->add($strloggedinasguest);
-                    print_header_simple();
+                    echo $OUTPUT->header();
                     if (empty($USER->access['rsw'][$COURSE->context->path])) {  // Normal guest
                         notice(get_string('guestsnotallowed', '', format_string($COURSE->fullname)), get_login_url());
                     } else {
@@ -2216,7 +2216,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsu
             if (session_is_loggedinas()) {   // Make sure the REAL person can also access this course
                 $realuser = session_get_realuser();
                 if (!has_capability('moodle/course:view', $COURSE->context, $realuser->id)) {
-                    print_header_simple();
+                    echo $OUTPUT->header();
                     notice(get_string('studentnotallowed', '', fullname($USER, true)), $CFG->wwwroot .'/');
                 }
             }
index 282b3a03dd7bc4b75c17dfe5051de72c5e06b62b..43641c909b9a9da49fcaa97a7f9cd6a89e9a81ac 100644 (file)
@@ -42,7 +42,7 @@
     $button = $OUTPUT->button($form);
 
     $header = $SITE->shortname . ': ' . $strmymoodle;
-    $navigation = build_navigation($strmymoodle);
+    $PAGE->navbar->add($strmymoodle);
     $loggedinas = user_login_string();
 
     if (empty($CFG->langmenu)) {
index 1bcf6c78f0f231c65368c10df785060fc1e4177f..c14d0fdd9aa2a5cb8707f669ec95a6b6e9d72828 100644 (file)
@@ -17,7 +17,9 @@ $PAGE->requires->js('lib/ufo.js')->in_head();
 $PAGE->requires->data_for_js('FO', $args);
 $PAGE->requires->js_function_call('create_UFO_object', Array('moodletestclient'));
 
-print_header_simple('Test Client', 'Test Client');
+$PAGE->set_title('Test Client');
+$PAGE->set_heading('Test Client');
+echo $OUTPUT->header();
 echo '<div id="moodletestclient">
       <p>You need to install Flash 9.0</p>
     </div>';