From: nicolasconnault Date: Tue, 18 Aug 2009 05:17:28 +0000 (+0000) Subject: MDL-19817 Upgraded calls to helpbutton, print_simple_box* and notify X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=56da74f311956d47ef3c03249c1b6e04c861b673;p=moodle.git MDL-19817 Upgraded calls to helpbutton, print_simple_box* and notify --- diff --git a/mod/wiki/admin.php b/mod/wiki/admin.php index 6aaf3c8d29..688cba3c42 100644 --- a/mod/wiki/admin.php +++ b/mod/wiki/admin.php @@ -338,12 +338,12 @@ } // 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(); diff --git a/mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php b/mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php index 77e9321e36..8f60d31a75 100644 --- a/mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php +++ b/mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php @@ -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)); diff --git a/mod/wiki/lib.php b/mod/wiki/lib.php index 21583497fc..eebc181d71 100644 --- a/mod/wiki/lib.php +++ b/mod/wiki/lib.php @@ -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!"); #} } } diff --git a/mod/wiki/revertpages.html b/mod/wiki/revertpages.html index 691e3cb76a..5092d748aa 100644 --- a/mod/wiki/revertpages.html +++ b/mod/wiki/revertpages.html @@ -28,7 +28,7 @@ if($err->remark) { help_icon(moodle_help_icon::make('revertauthorfieldpattern', get_string('authorfieldpattern', 'wiki'), 'wiki')); if (!empty($err->authorfieldpattern)) { formerr($err->authorfieldpattern); } ?> diff --git a/mod/wiki/view.php b/mod/wiki/view.php index 6eda2131ca..7ae3a0e630 100644 --- a/mod/wiki/view.php +++ b/mod/wiki/view.php @@ -339,7 +339,7 @@ /// Formatting Rules echo ''; - helpbutton('howtowiki', get_string('howtowiki', 'wiki'), 'wiki'); + echo $OUTPUT->help_icon(moodle_help_icon::make('howtowiki', get_string('howtowiki', 'wiki'), 'wiki')); echo ''; echo ''; @@ -396,7 +396,7 @@ $linktext = get_string('reloadlinktext', 'wiki'); echo "
"; - 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 "
"; /// Finish the page