]> git.mjollnir.org Git - moodle.git/commitdiff
mod-wiki MDL-19817 Updated print_header_simple and build_navigation to OUTPUT and...
authorsamhemelryk <samhemelryk>
Tue, 8 Sep 2009 02:16:33 +0000 (02:16 +0000)
committersamhemelryk <samhemelryk>
Tue, 8 Sep 2009 02:16:33 +0000 (02:16 +0000)
mod/wiki/admin.php
mod/wiki/index.php
mod/wiki/view.php

index 7bd440c0d2986950798dfea10f8690c31c21994e..b53ec1aab908f16f934f2e85cf8be2c8778ecb1e 100644 (file)
           default: break;
        }
     }
-
-    $navigation = build_navigation(get_string("administration","wiki"), $cm);
-    print_header_simple("$wiki_entry->pagename", "", $navigation,
-                $focus, "", true, update_module_button($cm->id, $course->id, $strwiki),
-                navmenu($course, $cm));
-
+    
+    $PAGE->navbar->add(get_string("administration","wiki"));
+    $PAGE->set_title($wiki_entry->pagename);
+    $PAGE->set_focuscontrol($focus);
+    $PAGE->set_button(update_module_button($cm->id, $course->id, $strwiki));
+    echo $OUTPUT->header();
 
     ////////////////////////////////////////////////////////////
     /// Check if the Form has been submitted and display confirmation
index 9a1892af5979c4ec1d2e12550b561a56f54fa3d2..654c9e3156ecd0ea5fee7b52edf2cde8a811c8ab 100644 (file)
 
 
 /// Print the header
-    $navlinks = array();
-    $navlinks[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
-    $navigation = build_navigation($navlinks);
-
-    print_header_simple("$strwikis", "", $navigation, "", "", true, "", navmenu($course));
+    $PAGE->navbar->add($strwikis);
+    $PAGE->set_title($strwikis);
+    echo $OUTPUT->header();
 
 /// Get all the appropriate data
 
index 47ff58d2e96a554f573b8aa588c85ddf8e42bd5a..1fb18171eceb1a9e88529f84c6f7fb66bbee7a6b 100644 (file)
     $strwikis = get_string("modulenameplural", "wiki");
     $strwiki  = get_string("modulename", "wiki");
 
-    $navlinks = array();
 /// Add page name if not main page
     if ($ewiki_title != $wiki->name) {
-        $navlinks[] = array('name' => format_string($ewiki_title), 'link' => '', 'type' => 'title');
+        $PAGE->navbar->add(format_string($ewiki_title));
     }
-
-    $navigation = build_navigation($navlinks, $cm);
-    print_header_simple($ewiki_title?$ewiki_title:format_string($wiki->name), "", $navigation,
-                "", "", $cacheme, update_module_button($cm->id, $course->id, $strwiki),
-                navmenu($course, $cm));
-
-
+    $PAGE->set_title($ewiki_title?$ewiki_title:format_string($wiki->name));
+    $PAGE->set_cacheable($cacheme);
+    $PAGE->set_button(update_module_button($cm->id, $course->id, $strwiki));
+    echo $OUTPUT->header();
     /// Print Page
     echo '    <div id="wikiPageActions">
     ';