]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19817 Upgraded calls to helpbutton, print_simple_box* and notify
authornicolasconnault <nicolasconnault>
Tue, 18 Aug 2009 05:17:28 +0000 (05:17 +0000)
committernicolasconnault <nicolasconnault>
Tue, 18 Aug 2009 05:17:28 +0000 (05:17 +0000)
mod/wiki/admin.php
mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php
mod/wiki/lib.php
mod/wiki/revertpages.html
mod/wiki/view.php

index 6aaf3c8d297802363eb464b3f5aefe26c045af34..688cba3c42642f81212ba66f99b5a8ad052a9512 100644 (file)
     }
 
     // The wiki Contents
-    print_simple_box_start( 'center', '100%', '', '20');
+    echo $OUTPUT->box_start();
     // Do the Action
     # "setpageflags", "removepages", "strippages", "checklinks", "revertpages"
     print_heading_with_help(get_string($action,"wiki"), $action, "wiki");
     include $action.".html";
-    print_simple_box_end();
+    echo $OUTPUT->box_end();
 
 /// Finish the page
     echo $OUTPUT->footer();
index 77e9321e36c57bae26db15e7e4a3d19e15211c56..8f60d31a7554a2c4cce52d3f976f55dbd1d4b3be 100644 (file)
@@ -149,7 +149,7 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
 }
 
 function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvirtualpages=0, $exportdestinations=0) {
-  global $ewiki_config, $wiki, $ewiki_plugins, $wiki_entry, $course, $CFG, $ewiki_t, $userid, $groupid;
+  global $ewiki_config, $wiki, $ewiki_plugins, $wiki_entry, $course, $CFG, $ewiki_t, $userid, $groupid, $OUTPUT;
   
   $filestozip=array();
   #-- disable protected email
@@ -317,7 +317,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
               $destfn=clean_filename(substr($id,strlen(EWIKI_IDF_INTERNAL)));
               $dest="$exportdir/".$destfn;
               if(!copy($fn,$dest)) {
-                notify("Cannot copy $fn to $dest.");
+                echo $OUTPUT->notification("Cannot copy $fn to $dest.");
               }
                           
               #$fn = urlencode(preg_replace(EWIKI_DUMP_FILENAME_REGEX, "", $id));
index 21583497fc76139f25dcab640051715d2b664250..eebc181d719f66c598cb4990a811d77a1871441b 100644 (file)
@@ -170,7 +170,7 @@ function wiki_rmdir($basedir) {
  * @return bool
  */
 function wiki_delete_instance($id) {
-    global $CFG, $DB;
+    global $CFG, $DB, $OUTPUT;
 
     if (! $wiki = $DB->get_record("wiki", array("id"=>$id))) {
         return false;
@@ -186,7 +186,7 @@ function wiki_delete_instance($id) {
               foreach ($files as $file) {
                   #if ($file != $exception) {
                       unlink("$basedir/$file");
-                      notify("Existing file '$file' has been deleted!");
+                      echo $OUTPUT->notification("Existing file '$file' has been deleted!");
                   #}
               }
           }
index 691e3cb76a12633b4f0755ba911bd726a4c945fa..5092d748aa8ea9e095de1b6dcc4e269df2b3d21f 100644 (file)
@@ -28,7 +28,7 @@ if($err->remark) {
     <td>
         <input type="text" name="authorfieldpattern" size="30" value="<?php p($form->authorfieldpattern) ?>" />
 <?php
-        helpbutton('revertauthorfieldpattern', get_string('authorfieldpattern', 'wiki'), 'wiki');
+        echo $OUTPUT->help_icon(moodle_help_icon::make('revertauthorfieldpattern', get_string('authorfieldpattern', 'wiki'), 'wiki'));
         if (!empty($err->authorfieldpattern)) { formerr($err->authorfieldpattern); }
 ?>
     </td>
index 6eda2131ca9051dff40cc68db1997a4b08e15c13..7ae3a0e63094dc9f7e708cf7935a9f678f3b5e92 100644 (file)
 
         /// Formatting Rules
         echo '<td class="howtowiki">';
-        helpbutton('howtowiki', get_string('howtowiki', 'wiki'), 'wiki');
+        echo $OUTPUT->help_icon(moodle_help_icon::make('howtowiki', get_string('howtowiki', 'wiki'), 'wiki'));
         echo '</td>';
 
         echo '</tr></table>';
     $linktext = get_string('reloadlinktext', 'wiki');
     echo "<div class='wikilinkright'><a href='$me' title='$linkdesc'><input type='button' value='$linktext' /></a></div>";
 
-    print_simple_box_start('center', '100%', '', '20');
+    echo $OUTPUT->box_start();
 
     /// Don't filter any pages containing wiki actions (except view). A wiki page containing
     /// actions will have the form [action]/[pagename]. If the action is 'view' or the  '/'
@@ -476,7 +476,7 @@ $strnojslockwarning
         print $content;
     }
     print $content2;
-    print_simple_box_end();
+    echo $OUTPUT->box_end();
     echo "<br />";
 
 /// Finish the page