]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19878 Upgraded calls to helpbutton, print_simple_box* and notify
authornicolasconnault <nicolasconnault>
Tue, 18 Aug 2009 04:28:40 +0000 (04:28 +0000)
committernicolasconnault <nicolasconnault>
Tue, 18 Aug 2009 04:28:40 +0000 (04:28 +0000)
47 files changed:
admin/auth_config.php
admin/block.php
admin/blocks.php
admin/dbtransfer/index.php
admin/delete.php
admin/enrol.php
admin/enrol_config.php
admin/environment.php
admin/filters.php
admin/generator.php
admin/index.php
admin/innodb.php
admin/lang.php
admin/langimport.php
admin/mnet/access_control.php
admin/mnet/enr_course_enrol.php
admin/mnet/mnet_review.html
admin/mnet/mnet_review_allhosts.html
admin/mnet/mnet_services.html
admin/modules.php
admin/multilangupgrade.php
admin/portfolio.php
admin/qtypes.php
admin/register.php
admin/replace.php
admin/report/backups/index.php
admin/report/courseoverview/index.php
admin/report/security/index.php
admin/report/unittest/ex_reporter.php
admin/report/unittest/index.php
admin/roles/allow.php
admin/roles/assign.php
admin/roles/lib.php
admin/roles/manage.php
admin/search.php
admin/settings.php
admin/timezone.php
admin/timezoneimport.php
admin/uploadpicture.php
admin/uploaduser.php
admin/user.php
admin/user/user_bulk_confirm.php
admin/user/user_bulk_delete.php
admin/user/user_bulk_display.php
admin/user/user_bulk_download.php
admin/wsprotocols.php
admin/xmldb/actions/XMLDBCheckAction.class.php

index 4b1d9dea5780826d9424900d8456974fac6d2119..648757b7631e107726bfe325e5fcee0d2ba14462 100644 (file)
@@ -64,14 +64,14 @@ echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />\n";
 echo "<input type=\"hidden\" name=\"auth\" value=\"".$auth."\" />\n";
 
 // auth plugin description
-print_simple_box_start('center', '80%');
+echo $OUTPUT->box_start();
 echo $OUTPUT->heading($authtitle);
-print_simple_box_start('center', '80%', '', 5, 'informationbox');
+echo $OUTPUT->box_start('informationbox');
 echo $authdescription;
-print_simple_box_end();
+echo $OUTPUT->box_end();
 echo "<hr />\n";
 $authplugin->config_form($frm, $err, $user_fields);
-print_simple_box_end();
+echo $OUTPUT->box_end();
 echo '<p style="text-align: center"><input type="submit" value="' . get_string("savechanges") . "\" /></p>\n";
 echo "</div>\n";
 echo "</form>\n";
index ffa08079a7f3913c515048aa6130c0bb70f8c1d6..6c5252dfd557896575c3b528c0b6dd560b3ff8b2 100644 (file)
@@ -53,7 +53,7 @@
 
     echo $OUTPUT->heading($strblockname);
 
-    notify('This block still uses an old-style config_global.html file. ' .
+    echo $OUTPUT->notification('This block still uses an old-style config_global.html file. ' .
             'It must be updated by a developer to use a settings.php file.');
 
     echo $OUTPUT->box(get_string('configwarning', 'admin'), 'generalbox boxwidthnormal boxaligncenter');
index 396c703402a03878a4b32c6e0ccd03185b51af58..3815328a97e8bbf72c67c0695df5a557a852887e 100644 (file)
@@ -80,7 +80,7 @@
 
             // Delete block
             if (!$DB->delete_records('block', array('id'=>$block->id))) {
-                notify("Error occurred while deleting the $strblockname record from blocks table");
+                echo $OUTPUT->notification("Error occurred while deleting the $strblockname record from blocks table");
             }
 
             drop_plugin_tables($block->name, "$CFG->dirroot/blocks/$block->name/db/install.xml", false); // old obsoleted table names
index 5fafd7e57d9b995fd67053eaca7adf5450b3d170..21221d84358410eb96c2a64eee212150db87dc0b 100644 (file)
@@ -33,8 +33,8 @@ if ($data = $form->get_data()) {
     $feedback->finished();
 
     // Finish up.
-    notify(get_string('success'), 'notifysuccess');
-    print_continue("$CFG->wwwroot/$CFG->admin/");
+    echo $OUTPUT->notification(get_string('success'), 'notifysuccess');
+    echo $OUTPUT->continue_button("$CFG->wwwroot/$CFG->admin/");
     echo $OUTPUT->footer();
     die;
 }
index e2072fbae49650005caafef29dc0904a986f04c8..7855e75939d813fb83d0216617fe0204f8234e40 100644 (file)
@@ -45,7 +45,7 @@
     delete_subdirectories($deletedir);
 
     echo '<h1 align="center">Done!</h1>';
-    print_continue($CFG->wwwroot);
+    echo $OUTPUT->continue_button($CFG->wwwroot);
     echo $OUTPUT->footer();
     exit;
 
index 3c20d6c361260f6a29286c6df6de9037ccd8d7ec..598b0cb7e0366c329a0f296fef4af35d76ce398c 100644 (file)
@@ -58,7 +58,7 @@
     }
     asort($options);
 
-    print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700');
+    echo $OUTPUT->box(get_string('configenrolmentplugins', 'admin'));
 
     echo "<form $CFG->frametarget id=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
     echo "<div>";
index 2fea1aeb3a7cc5511d72a4d4a82fe2620de96daf..b3a9e4ee9b9415148e67852007b01e899561b1e6 100644 (file)
     echo "<input type=\"hidden\" name=\"enrol\" value=\"".$enrol."\" />";
 
 /// Print current enrolment type description
-    print_simple_box_start("center", "80%");
+    echo $OUTPUT->box_start();
     echo $OUTPUT->heading($options[$enrol]);
 
-    print_simple_box_start("center", "60%", '', 5, 'informationbox');
+    echo $OUTPUT->box_start('informationbox');
     print_string("description", "enrol_$enrol");
-    print_simple_box_end();
+    echo $OUTPUT->box_end();
 
     echo "<hr />";
 
     $enrolment->config_form($frm);
 
     echo "<p class=\"centerpara\"><input type=\"submit\" value=\"".get_string("savechanges")."\" /></p>\n";
-    print_simple_box_end();
+    echo $OUTPUT->box_end();
     echo "</div>";
     echo "</form>";
 
index d1b84f1854ec28fe068c9443572087ef90fb7410..ee89bde7c077846d9dc6ebf3d4ff1b9d6b90d87c 100644 (file)
                         $a = new stdClass();
                         $a->url = 'http://download.moodle.org/environment/environment.zip';
                         $a->dest= $CFG->dataroot.'/';
-                        print_simple_box(get_string($cd->get_error(), 'error', $a), 'center', '', '', 5, 'errorbox');
+                        echo $OUTPUT->box(get_string($cd->get_error(), 'error', $a), 'errorbox');
                     } else {
-                        print_simple_box(get_string($cd->get_error(), 'error'), 'center', '', '', 5, 'errorbox');
+                        echo $OUTPUT->box(get_string($cd->get_error(), 'error'), 'errorbox');
                     }
                     break;
                 case COMPONENT_UPTODATE:
-                    print_simple_box(get_string($cd->get_error(), 'error'), 'center');
+                    echo $OUTPUT->box(get_string($cd->get_error(), 'error'));
                     break;
                 case COMPONENT_INSTALLED:
-                    print_simple_box(get_string('componentinstalled', 'admin'), 'center');
+                    echo $OUTPUT->box(get_string('componentinstalled', 'admin'));
                     break;
             }
         }
     }
 
 /// Start of main box
-    print_simple_box_start('center');
+    echo $OUTPUT->box_start();
 
     echo "<div style=\"text-align:center\">".$stradminhelpenvironment."</div><br />";
 
     echo '</div>';
 
 /// End of main box
-    print_simple_box_end();
+    echo $OUTPUT->box_end();
 
 /// Gather and show results
     $status = check_moodle_environment($version, $environment_results);
index d71b2f47365745fbbc2e5f7a6e96013c6f54ab86..daafb9cca30340dc106ae31e5e2bbca3438658f0 100644 (file)
         $a->filter = $filtername;
         $a->directory = $filterpath;
         echo $OUTPUT->box(get_string('deletefilterfiles', 'admin', $a), 'generalbox', 'notice');
-        print_continue($returnurl);
+        echo $OUTPUT->continue_button($returnurl);
         echo $OUTPUT->footer();
         exit;
     }
index f523ea1cc6ec788e385f56cd2fd115628c53e198..d093c82acd4c7d07e6b3eedd65355ba7e635e241 100755 (executable)
@@ -1208,7 +1208,7 @@ class generator_web extends generator {
         $systemcontext = get_context_instance(CONTEXT_SYSTEM);
         if (!has_capability('moodle/site:doanything', $systemcontext)) {
             // If not logged in, give link to login page for current site
-            notify("You must be logged in as administrator before using this script.");
+            echo $OUTPUT->notification("You must be logged in as administrator before using this script.");
             echo $OUTPUT->footer();
             require_login();
         } else {
index ec4617a9c3f61f6d3a520806254ce93e1786c0a2..5287a39abeea798cf9e0e07c6ae96c46650b523e 100644 (file)
@@ -145,8 +145,8 @@ if (!core_tables_exist()) {
         if (!check_moodle_environment($release, $environment_results, true, ENV_SELECT_RELEASE)) {
             print_upgrade_reload("index.php?agreelicense=1&amp;lang=$CFG->lang");
         } else {
-            notify(get_string('environmentok', 'admin'), 'notifysuccess');
-            print_continue("index.php?agreelicense=1&amp;confirmrelease=1&amp;lang=$CFG->lang");
+            echo $OUTPUT->notification(get_string('environmentok', 'admin'), 'notifysuccess');
+            echo $OUTPUT->continue_button("index.php?agreelicense=1&confirmrelease=1&lang=$CFG->lang");
         }
 
         echo $OUTPUT->footer();
@@ -209,13 +209,13 @@ if ($version > $CFG->version) {  // upgrade
         if (!check_moodle_environment($release, $environment_results, true, ENV_SELECT_RELEASE)) {
             print_upgrade_reload('index.php?confirmupgrade=1');
         } else {
-            notify(get_string('environmentok', 'admin'), 'notifysuccess');
+            echo $OUTPUT->notification(get_string('environmentok', 'admin'), 'notifysuccess');
             if (empty($CFG->skiplangupgrade)) {
                 echo $OUTPUT->box_start('generalbox', 'notice');
                 print_string('langpackwillbeupdated', 'admin');
                 echo $OUTPUT->box_end();
             }
-            print_continue('index.php?confirmupgrade=1&amp;confirmrelease=1');
+            echo $OUTPUT->continue_button('index.php?confirmupgrade=1&confirmrelease=1');
         }
 
         echo $OUTPUT->footer();
@@ -231,7 +231,7 @@ if ($version > $CFG->version) {  // upgrade
         echo $OUTPUT->box_end();
         print_plugin_tables();
         print_upgrade_reload('index.php?confirmupgrade=1&amp;confirmrelease=1');
-        print_continue('index.php?confirmupgrade=1&amp;confirmrelease=1&amp;confirmplugincheck=1');
+        echo $OUTPUT->continue_button('index.php?confirmupgrade=1&confirmrelease=1&confirmplugincheck=1');
         echo $OUTPUT->footer();
         die();
 
@@ -240,7 +240,7 @@ if ($version > $CFG->version) {  // upgrade
         upgrade_core($version, true);
     }
 } else if ($version < $CFG->version) {
-    notify('WARNING!!!  The code you are using is OLDER than the version that made these databases!');
+    echo $OUTPUT->notification('WARNING!!!  The code you are using is OLDER than the version that made these databases!');
 }
 
 // Updated human-readable release version if necessary
@@ -356,7 +356,7 @@ if (defined('WARN_DISPLAY_ERRORS_ENABLED')) {
 $lastcron = $DB->get_field_sql('SELECT MAX(lastcron) FROM {modules}');
 if (time() - $lastcron > 3600 * 24) {
     $strinstallation = get_string('installation', 'install');
-    $helpbutton = helpbutton('install', $strinstallation, 'moodle', true, false, '', true);
+    $helpbutton = $OUTPUT->help_icon(moodle_help_icon::make('install', $strinstallation));
     echo $OUTPUT->box(get_string('cronwarning', 'admin').'&nbsp;'.$helpbutton, 'generalbox adminwarning');
 }
 
index f9de6b9b0e06f3a637b61fbf0399c305e7e13561..cee323693533ecf1ef1dd3fb94a39afcd8ae564d 100644 (file)
@@ -20,7 +20,7 @@
 
     if (data_submitted() and $confirm and confirm_sesskey()) {
 
-        notify('Please be patient and wait for this to complete...', 'notifysuccess');
+        echo $OUTPUT->notification('Please be patient and wait for this to complete...', 'notifysuccess');
 
         if ($tables = $DB->get_tables()) {
             $DB->set_debug(true);
@@ -30,8 +30,8 @@
             }
             $DB->set_debug(false);
         }
-        notify('... done.', 'notifysuccess');
-        print_continue('index.php');
+        echo $OUTPUT->notification('... done.', 'notifysuccess');
+        echo $OUTPUT->continue_button('index.php');
         echo $OUTPUT->footer();
 
     } else {
index 15e7cea96245538b73eb553cdce086353b91621b..1bf52f880e7104a31f244b5b3f2307781246899b 100644 (file)
                 $fileismissing = 0;
             } else {
                 $fileismissing = 1;
-                $o .= notify(get_string("filemissing", "", $trfilepath), "notifyproblem", "center", true);
+                $o .= $OUTPUT->notification(get_string("filemissing", "", $trfilepath), "notifyproblem");
             }
 
             $missingcounter = 0;
 
         foreach ($files as $filekey => $file) {    // check all the help files.
             if (!file_exists("$langdir/help/$file")) {
-                notify(get_string("filemissing", "", "$langdir/help/$file"), 'notifyproblem');
+                echo $OUTPUT->notification(get_string("filemissing", "", "$langdir/help/$file"), 'notifyproblem');
                 $somethingfound = true;
                 continue;
             }
         }
         foreach ($files as $filekey => $file) {    // check all the docs files.
             if (!file_exists("$langdir/docs/$file")) {
-                notify(get_string("filemissing", "", "$langdir/docs/$file"), 'notifyproblem');
+                echo $OUTPUT->notification(get_string("filemissing", "", "$langdir/docs/$file"), 'notifyproblem');
                 $somethingfound = true;
                 continue;
             }
         }
 
         if (!empty($somethingfound)) {
-            print_continue("lang.php");
+            echo $OUTPUT->continue_button("lang.php");
         } else {
             notice(get_string("languagegood"), "lang.php" );
         }
                     print_error('filemismatch', 'error', '', (object)array('current'=>$currectfile, 'file'=>$prefix.$plugin.'.php'));
                 }
                 if (!$uselocal) {
-                    notify($streditingnoncorelangfile);
+                    echo $OUTPUT->notification($streditingnoncorelangfile);
                     $editable = false;
                 }
             } else {
             }
 
             if (lang_save_file($saveinto, $currentfile, $newstrings, $uselocal, $packstring)) {
-                notify(get_string("changessaved")." ($saveinto/$currentfile)", "notifysuccess");
+                echo $OUTPUT->notification(get_string("changessaved")." ($saveinto/$currentfile)", "notifysuccess");
             } else {
                 print_error('cannotsavefile', 'error', 'lang.php?mode=compare&amp;currentfile=$currentfile', $saveinto.'/'.$currentfile);
             }
         $select->nothinglabel = $strchoosefiletoedit;
         $select->set_label($selectionlabel);
         echo $OUTPUT->select($select);
-        helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
+        echo $OUTPUT->help_icon(moodle_help_icon::make('langswitchstorage', $strfilestoredinhelp));
         echo $OUTPUT->box_end();
 
         if ($currentfile <> '') {
                     fclose($f);
                 } else {
                     $editable = false;
-                    notify(get_string("makeeditable", "", "$saveto/$currentfile"), 'notifyproblem');
+                    echo $OUTPUT->notification(get_string("makeeditable", "", "$saveto/$currentfile"), 'notifyproblem');
                 }
             }
             error_reporting($CFG->debug);
                 print_error('confirmsesskeybad', 'error');
             }
             if (lang_help_save_file($saveto, $currentfile, $_POST['filedata'])) {
-                notify(get_string("changessaved")." ($saveto/$currentfile)", "notifysuccess");
+                echo $OUTPUT->notification(get_string("changessaved")." ($saveto/$currentfile)", "notifysuccess");
             } else {
                 print_error('cannotsavefile', 'error', 'lang.php?mode=compare&amp;currentfile=$currentfile', array($saveinto, $currentfile));
             }
         $select->nothinglabel = $strchoosefiletoedit;
         $select->set_label($selectionlabel);
         echo $OUTPUT->select($select);
-        helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
+        echo $OUTPUT->help_icon(moodle_help_icon::make('langswitchstorage', $strfilestoredinhelp));
         echo $OUTPUT->box_end();
 
         if (!empty($currentfile)) {
                     //
                     // webserver is unable to create new file
                     //
-                    notify(get_string('filemissing', '', "$saveto/$currentfile" ));
-                    notify(get_string('makeeditable', '', "$saveto/$currentfile"));
+                    echo $OUTPUT->notification(get_string('filemissing', '', "$saveto/$currentfile" ));
+                    echo $OUTPUT->notification(get_string('makeeditable', '', "$saveto/$currentfile"));
                     $editable = false;
                 } else {
                     //
                 // file exists but it is not writeable by web server process :-(
                 //
                 $editable = false;
-                notify(get_string('makeeditable', '', "$saveto/$currentfile"));
+                echo $OUTPUT->notification(get_string('makeeditable', '', "$saveto/$currentfile"));
             }
 
             // master en_utf8 in dataroot is not editable
             echo '<div>';
 
             if ($uselocal) {
-                $strsavetotitle = $strlanglocalpackage . helpbutton('langpackages', $strlanglocalpackage, 'moodle', true, false, '', true);
-                $straltdirtitle = $strlangmasterpackage . helpbutton('langpackages', $strlangmasterpackage, 'moodle', true, false, '', true);
+                $strsavetotitle = $strlanglocalpackage . $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlanglocalpackage));
+                $straltdirtitle = $strlangmasterpackage . $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlangmasterpackage));
             } else {
-                $straltdirtitle = $strlanglocalpackage . helpbutton('langpackages', $strlanglocalpackage, 'moodle', true, false, '', true);
-                $strsavetotitle = $strlangmasterpackage . helpbutton('langpackages', $strlangmasterpackage, 'moodle', true, false, '', true);
+                $straltdirtitle = $strlanglocalpackage . $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlanglocalpackage));
+                $strsavetotitle = $strlangmasterpackage . $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlangmasterpackage));
 
             }
 
             }
             if (is_readable($ensrc)) {
                 echo '<fieldset><legend>'.$strlangmasterenglish;
-                helpbutton('langpackages', $strlangmasterenglish);
+                echo $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlangmasterenglish));
                 echo '</legend>';
                 echo "<div class='mdl-align'>\n<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"\">";
                 echo htmlspecialchars(file_get_contents($ensrc));
@@ -1349,13 +1349,13 @@ function lang_help_preview_url($currentfile, $skiplocal=false, $forcelang = '')
  * @return bool False if save failed, true otherwise
  */
 function lang_help_save_file($helproot, $file, $content) {
-    global $CFG, $USER;
+    global $CFG, $USER, $OUTPUT;
 
     $content = str_replace("\r", "",$content);              // Remove linefeed characters
     $content = preg_replace("/\n{3,}/", "\n\n", $content);  // Collapse runs of blank lines
     $content = trim($content);                              // Delete leading/trailing whitespace
     if (is_readable("$helproot/$file") && filesize("$helproot/$file") > 0 && $content == '') {
-        notify(get_string('langrmyourself', 'admin'));
+        echo $OUTPUT->notification(get_string('langrmyourself', 'admin'));
         return true;
     }
 
index 31e37c5626fae2e725bf979eae241688743c133a..15f5717c32f2e960cfd981400b0c3080fd3fb16c 100755 (executable)
@@ -91,7 +91,7 @@
 
                         }
                     } else {
-                        notify('Had an unspecified error with the component installer, sorry.');
+                        echo $OUTPUT->notification('Had an unspecified error with the component installer, sorry.');
                     }
                 }
             }
 
     if ($notice_ok) {
         $info = implode('<br />', $notice_ok);
-        notify($info, 'notifysuccess');
+        echo $OUTPUT->notification($info, 'notifysuccess');
     }
 
     if ($notice_error) {
         $info = implode('<br />', $notice_error);
-        notify($info, 'notifyproblem');
+        echo $OUTPUT->notification($info, 'notifyproblem');
     }
 
     if ($missingparents) {
                 }
             }
             $info = get_string('missinglangparent', 'admin', $a);
-            notify($info, 'notifyproblem');
+            echo $OUTPUT->notification($info, 'notifyproblem');
         }
     }
 
index 242e0a79a01e1b4487268071bc3dfa858b3f604a..f6c0006ead413194617067b216f155dfb6eccc59 100644 (file)
@@ -193,7 +193,7 @@ if (!empty($table)) {
 
 
 // output the add form
-print_simple_box_start('center','90%','','20');
+echo $OUTPUT->box_start();
 
 ?>
  <div class="mnetaddtoaclform">
@@ -233,7 +233,7 @@ foreach ($formerror as $error) {
     echo "<br><span class=\"error\">$error<span>";
 }
 
-print_simple_box_end();
+echo $OUTPUT->box_end();
 echo $OUTPUT->footer();
 
 ?>
index 78baffdb18a05cfcad4aefb938a576d0bd8d0fbb..a661964e844b106f84fa5fc3f413f23ffd0f3b7e 100644 (file)
@@ -301,7 +301,7 @@ if (!empty($errors)) {
         $msg .= $e.'<br />';
     }
     $msg .= '</p>';
-    notify($msg);
+    echo $OUTPUT->notification($msg);
 }
 
 
index b521cb7e14b2f9a1400483ded70b0f22b4096c18..37bcdecb6928e9bc88a6658f893d67c7ed364cda 100644 (file)
@@ -19,7 +19,7 @@ if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
 }
 print_tabs(array($tabs), 'mnetdetails');
 
-print_simple_box_start("center", "");
+echo $OUTPUT->box_start();
 ?>
 <form method="post" action="peers.php">
 <div>
@@ -46,7 +46,7 @@ if (empty($mnet_peer->public_key)) $mnet_peer->public_key = '';
     <td align="right" valign="top"><?php
         print_string('publickey', 'mnet');
         echo ': <br />';
-        helpbutton("publickey", get_string('publickey', 'mnet'), "mnet", true, true);
+        echo $OUTPUT->help_icon(moodle_help_icon::make("publickey", get_string('publickey', 'mnet'), "mnet", true));
     ?></td>
 <?php
 
@@ -119,7 +119,7 @@ if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address){
     <tr>
         <td align="right" valign="top"><?php print_string('ipaddress', 'mnet');
         echo ': <br />';
-        helpbutton("ipaddress", get_string('ipaddress', 'mnet'), "mnet", true, true);
+        echo $OUTPUT->help_icon(moodle_help_icon::make("ipaddress", get_string('ipaddress', 'mnet'), "mnet", true));
         ?>:</td>
         <td valign="top"><?php echo $mnet_peer->ip_address; ?></td>
     </tr>
@@ -152,6 +152,6 @@ if (!empty($credentials)) {
 </div>
 </form>
 <?php
-print_simple_box_end();
+echo $OUTPUT->box_end();
 echo $OUTPUT->footer();
 ?>
index 03002eed70f47da1f2c53c6f2cda8092f007be13..4c03332defbf38cb36c4d9551a08808636828a59 100644 (file)
@@ -6,7 +6,7 @@ $tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&amp;hostid=
 $tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetthemes, $strmnetthemes, false);
 print_tabs(array($tabs), 'mnetdetails');
 
-print_simple_box_start("center", "");
+echo $OUTPUT->box_start();
 ?>
 <table cellpadding="9" cellspacing="0" >
 <tr>
@@ -18,6 +18,6 @@ print_simple_box_start("center", "");
 </tr>
 </table>
 <?php
-print_simple_box_end();
+echo $OUTPUT->box_end();
 echo $OUTPUT->footer();
 ?>
index 31f8af6ea95dd18f9d542fc7491911086bcca85a..dd7063f8bc1da5f8595fb601207c4d8ffdc35b53 100644 (file)
@@ -14,7 +14,7 @@ if ($mnet_peer->id != $CFG->mnet_all_hosts_id && $mnet_peer->application->name =
     $tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
 }
 print_tabs(array($tabs), 'mnetservices');
-print_simple_box_start("center", "");
+echo $OUTPUT->box_start();
 
 ?>
 
@@ -101,6 +101,6 @@ print_simple_box_start("center", "");
 </div>
 </form>
 <?php
-print_simple_box_end();
+echo $OUTPUT->box_end();
 echo $OUTPUT->footer();
 ?>
index cf9e69b081948deac79eb2c408bde47fcec29cd9..6bbbdbdf439d8c60cca0f8adeb2c724e36f606b3 100644 (file)
             if ($coursemods = $DB->get_records("course_modules", array("module"=>$module->id))) {
                 foreach ($coursemods as $coursemod) {
                     if (! delete_mod_from_section($coursemod->id, $coursemod->section)) {
-                        notify("Could not delete the $strmodulename with id = $coursemod->id from section $coursemod->section");
+                        echo $OUTPUT->notification("Could not delete the $strmodulename with id = $coursemod->id from section $coursemod->section");
                     }
                 }
             }
 
             // delete calendar events
             if (!$DB->delete_records("event", array("modulename"=>$delete))) {
-                notify("Error occurred while deleting all $strmodulename records in calendar event table");
+                echo $OUTPUT->notification("Error occurred while deleting all $strmodulename records in calendar event table");
             }
 
             // clear course.modinfo for courses
 
             // Now delete all the course module records
             if (!$DB->delete_records("course_modules", array("module"=>$module->id))) {
-                notify("Error occurred while deleting all $strmodulename records in course_modules table");
+                echo $OUTPUT->notification("Error occurred while deleting all $strmodulename records in course_modules table");
             }
             if ($coursemods) {
                 foreach ($coursemods as $coursemod) {
                     if (!delete_context(CONTEXT_MODULE, $coursemod->id)) {
-                        notify("Could not delete the context for $strmodulename with id = $coursemod->id");
+                        echo $OUTPUT->notification("Could not delete the context for $strmodulename with id = $coursemod->id");
                     }
                 }
             }
 
             // Then delete all the logs
             if (!$DB->delete_records("log", array("module"=>$module->name))) {
-                notify("Error occurred while deleting all $strmodulename records in log table");
+                echo $OUTPUT->notification("Error occurred while deleting all $strmodulename records in log table");
             }
 
             // And log_display information
             if (!$DB->delete_records("log_display", array("module"=>$module->name))) {
-                notify("Error occurred while deleting all $strmodulename records in log_display table");
+                echo $OUTPUT->notification("Error occurred while deleting all $strmodulename records in log_display table");
             }
 
             // And the module entry itself
             if (!$DB->delete_records("modules", array("name"=>$module->name))) {
-                notify("Error occurred while deleting the $strmodulename record from modules table");
+                echo $OUTPUT->notification("Error occurred while deleting the $strmodulename record from modules table");
             }
 
             // And the module configuration records
             if (!unset_all_config_for_plugin($module->name)) {
-                notify(get_string('errordeletingconfig', 'admin', $strmodulename));
+                echo $OUTPUT->notification(get_string('errordeletingconfig', 'admin', $strmodulename));
             }
 
             // cleanup the gradebook
                 $uninstallfunction = $module->name . '_uninstall';
                 if (function_exists($uninstallfunction)) {
                     if (! $uninstallfunction() ) {
-                        notify('Encountered a problem running uninstall function for '. $module->name.'!');
+                        echo $OUTPUT->notification('Encountered a problem running uninstall function for '. $module->name.'!');
                     }
                 }
             }
index 125439474c0ebf01c6caed0777ebe0ce34e827eb..22e78606002add043ef0e3349d1708523c85bcce 100644 (file)
@@ -28,7 +28,7 @@ if (!$tables = $DB->get_tables() ) {    // No tables yet at all.
     print_error('notables', 'debug');
 }
 
-print_simple_box_start('center');
+echo $OUTPUT->box_start();
 
 /// Turn off time limits, sometimes upgrades can be slow.
 
@@ -93,14 +93,14 @@ foreach ($tables as $table) {
 // set conversion flag - switches to new plugin automatically
 set_config('filter_multilang_converted', 1);
 
-print_simple_box_end();
+echo $OUTPUT->box_end();
 
 /// Rebuild course cache which might be incorrect now
-notify('Rebuilding course cache...', 'notifysuccess');
+echo $OUTPUT->notification('Rebuilding course cache...', 'notifysuccess');
 rebuild_course_cache();
-notify('...finished', 'notifysuccess');
+echo $OUTPUT->notification('...finished', 'notifysuccess');
 
-print_continue('index.php');
+echo $OUTPUT->continue_button('index.php');
 
 echo $OUTPUT->footer();
 die;
index 1c8a8ac18f9ebc41f3810a2b6bf6d37c2b12c354..fbba7452f2c7aab18931268eb54275edf8c7398a 100644 (file)
@@ -68,9 +68,9 @@ if (!empty($edit) || !empty($new)) {
     } else {
         admin_externalpage_print_header();
         echo $OUTPUT->heading(get_string('configplugin', 'portfolio'));
-        print_simple_box_start();
+        echo $OUTPUT->box_start();
         $mform->display();
-        print_simple_box_end();
+        echo $OUTPUT->box_end();
         $return = false;
     }
 } else if (!empty($hide)) {
index 2dafdc9d7a6ebaea9552049fcb6ed0dffb83bf70..fb5cb7f24c59fe30c794fd31dcd5b4b96fce9828 100644 (file)
 
         // Delete any configuration records.
         if (!unset_all_config_for_plugin('qtype_' . $delete)) {
-            notify(get_string('errordeletingconfig', 'admin', 'qtype_' . $delete));
+            echo $OUTPUT->notification(get_string('errordeletingconfig', 'admin', 'qtype_' . $delete));
         }
         unset_config($delete . '_disabled', 'question');
         unset_config($delete . '_sortorder', 'question');
         $a->qtype = $qtypename;
         $a->directory = $QTYPES[$delete]->plugin_dir();
         echo $OUTPUT->box(get_string('qtypedeletefiles', 'admin', $a), 'generalbox', 'notice');
-        print_continue(admin_url('qtypes.php'));
+        echo $OUTPUT->continue_button(admin_url('qtypes.php'));
         echo $OUTPUT->footer();
         exit;
     }
index a712d375527cdcb8eda0e557636bc5fad21e5a80..f47d0a9ffbd3c9a7e186969c73f1c66dab1a0661 100644 (file)
@@ -38,7 +38,7 @@
 
     echo $OUTPUT->heading($strregistration);
 
-    print_simple_box($strregistrationinfo, "center", "70%");
+    echo $OUTPUT->box($strregistrationinfo);
 
 
 /// Print the form
index 740053265f318ba1d22cd8d3924b69225e8e0bdc..418acb4c19faa410efe7641bf98622bb2bd90220 100644 (file)
@@ -18,7 +18,7 @@ echo $OUTPUT->heading('Search and replace text throughout the whole database');
 
 if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) {   /// Print a form
 
-    print_simple_box_start('center');
+    echo $OUTPUT->box_start();
     echo '<div class="mdl-align">';
     echo '<form action="replace.php" method="post">';
     echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
@@ -27,21 +27,21 @@ if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) {   /// Pr
     echo '<input type="submit" value="Yes, do it now" /><br />';
     echo '</form>';
     echo '</div>';
-    print_simple_box_end();
+    echo $OUTPUT->box_end();
     echo $OUTPUT->footer();
     die;
 }
 
-print_simple_box_start('center');
+echo $OUTPUT->box_start();
 
 if (!db_replace($search, $replace)) {
     print_error('erroroccur', debug);
 }
 
-print_simple_box_end();
+echo $OUTPUT->box_end();
 
 /// Try to replace some well-known serialised contents (html blocks)
-notify('Replacing in html blocks...');
+echo $OUTPUT->notification('Replacing in html blocks...');
 $instances = $DB->get_recordset('block_instances', array('blockname' => 'html'));
 foreach ($instances as $instance) {
     $blockobject = block_instance('html', $instance);
@@ -51,11 +51,11 @@ foreach ($instances as $instance) {
 $instances->close();
 
 /// Rebuild course cache which might be incorrect now
-notify('Rebuilding course cache...', 'notifysuccess');
+echo $OUTPUT->notification('Rebuilding course cache...', 'notifysuccess');
 rebuild_course_cache();
-notify('...finished', 'notifysuccess');
+echo $OUTPUT->notification('...finished', 'notifysuccess');
 
-print_continue('index.php');
+echo $OUTPUT->continue_button('index.php');
 
 echo $OUTPUT->footer();
 
index 2a685d0de9483dd3d4188c88857d1221ab23676d..f4146eb40c42dc062211350a355d931387b25b9e 100644 (file)
@@ -18,7 +18,7 @@
 /// Scheduled backups aren't active by the site admin
     $backup_config = backup_get_config();
     if (empty($backup_config->backup_sche_active)) {
-        notify(get_string('scheduledbackupsinactive'));
+        echo $OUTPUT->notification(get_string('scheduledbackupsinactive'));
     }
 
 /// Get needed strings
 /// Lastlog view
     if (!$courseid) {
         echo $OUTPUT->heading($backuploglaststatus);
-        print_simple_box_start('center');
+        echo $OUTPUT->box_start();
     /// Now, get every record from backup_courses
         $courses = $DB->get_records("backup_courses");
 
         if (!$courses) {
-            notify(get_string('nologsfound'));
+            echo $OUTPUT->notification(get_string('nologsfound'));
         } else {
             echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
             //Print table header
@@ -82,7 +82,7 @@
             }
             echo "</table>";
         }
-        print_simple_box_end();
+        echo $OUTPUT->box_end();
 /// Detailed View !!
     } else {
         echo $OUTPUT->heading($backuplogdetailed);
@@ -90,7 +90,7 @@
         $coursename = $DB->get_field("course", "fullname", array("id"=>"$courseid"));
         echo $OUTPUT->heading("$strcourse: $coursename");
 
-        print_simple_box_start('center');
+        echo $OUTPUT->box_start();
 
     /// First, me get all the distinct backups for that course in backup_log
         $executions = $DB->get_records_sql("SELECT DISTINCT laststarttime,laststarttime
 
     /// Iterate over backup executions
         if (!$executions) {
-            notify(get_string('nologsfound'));
+            echo $OUTPUT->notification(get_string('nologsfound'));
         } else {
             echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
             foreach($executions as $execution) {
                 echo "<tr>";
                 echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\">";
-                print_simple_box("<center>".userdate($execution->laststarttime)."</center>", "center");
+                echo $OUTPUT->box(userdate($execution->laststarttime));
                 echo "</td>";
                 echo "</tr>";
                 $logs = $DB->get_records_sql("SELECT *
             }
             echo "</table>";
         }
-        print_simple_box_end();
+        echo $OUTPUT->box_end();
     }
 
     echo $OUTPUT->footer();
index 3c95477c57bde13cb4541af4335fc63d159e80de..54dbae9fb73a36ee758ae09956cf4408db158603 100644 (file)
@@ -88,7 +88,8 @@
         $courses = $DB->get_records_sql($sql, $param->params, 0, $numcourses);
 
         if (empty($courses)) {
-            notify(get_string('statsnodata'));echo '</td></tr></table>';echo '<p>after notify</p>';
+            echo $OUTPUT->notification(get_string('statsnodata'));
+            echo '</td></tr></table>';echo '<p>after notify</p>';
 
         } else {
             if (empty($CFG->gdversion)) {
index 7a2a1ec84f3a77f19fceaf776b94132235792d44..18a5e34048b2c0e98b4771ce0053ed04b98b23ef 100644 (file)
@@ -96,7 +96,7 @@ if ($issue and ($result = $issue(true))) {
 
     echo $OUTPUT->box($result->details, 'generalbox boxwidthnormal boxaligncenter'); // TODO: add proper css
 
-    print_continue($url);
+    echo $OUTPUT->continue_button($url);
 
 } else {
     report_security_hide_timearning();
index df16d3673c132e0b581fa1713ee4f91697eb5291..8ac3f88eaf55f72d577290f1b7470e06c63e5792 100644 (file)
@@ -116,14 +116,15 @@ class ExHtmlReporter extends HtmlReporter {
      * @param string $message Text to display.
      */
     function paintMessage($message) {
+        global $OUTPUT;
         if ($this->showpasses) {
-            print_simple_box_start('', '100%');
+            echo $OUTPUT->box_start();
             echo '<span class="notice">', $this->get_string('notice'), '</span>: ';
             $breadcrumb = $this->getTestList();
             array_shift($breadcrumb);
             echo implode($this->strseparator, $breadcrumb);
             echo $this->strseparator, '<br />', $message, "\n";
-            print_simple_box_end();
+            echo $OUTPUT->box_end();
             flush();
         }
     }
index a6090ca38f381766e23d947159ecb9b84e375ec0..6f4199acbd89ced374514505acaa09f6f09506fd 100644 (file)
@@ -77,7 +77,7 @@ if (!is_null($path)) {
     } else if (is_dir($path)){
         $test->findTestFiles($path);
     } else {
-        print_simple_box(get_string('pathdoesnotexist', $langfile, $path), '', '', '', '', 'errorbox');
+        echo $OUTPUT->box(get_string('pathdoesnotexist', $langfile, $path), 'errorbox');
         $ok = false;
     }
 
index ba986026d58eaa2c6571fa495a005cd6734b8b55..c0b6f3dab51e927e46edb8148a29fdf570a0f7d3 100755 (executable)
@@ -72,7 +72,7 @@
 
     $table = $controller->get_table();
 
-    print_simple_box($controller->get_intro_text(), 'center');
+    echo $OUTPUT->box($controller->get_intro_text());
 
     echo '<form action="' . $baseurl . '" method="post">';
     echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
index e449c95a68d0b2056cc9b0d5bb2b40deb6b5593a..6ffa560bec1534af191e4ade3237dd37f7a36474 100755 (executable)
               if ($hidden) { echo 'checked="checked" '; } ?>/>
               <label for="hidden" title="<?php print_string('createhiddenassign', 'role'); ?>">
                   <?php print_string('hidden', 'role'); ?>
-                  <?php helpbutton('hiddenassign', get_string('createhiddenassign', 'role')); ?>
+                  <?php echo $OUTPUT->help_icon(moodle_help_icon::make('hiddenassign', get_string('createhiddenassign', 'role'))); ?>
               </label></p>
 
               <p><label for="extendperiod"><?php print_string('enrolperiod') ?></label><br />
                 $msg .= $e.'<br />';
             }
             $msg .= '</p>';
-            print_simple_box_start('center');
-            notify($msg);
-            print_simple_box_end();
+            echo $OUTPUT->box_start();
+            echo $OUTPUT->notification($msg);
+            echo $OUTPUT->box_end();
         }
 
     /// Print a form to swap roles, and a link back to the all roles list.
index 19740f25aa47b49a30d42237f12ebf3494b9161b..71e889d4ca9dd1459fe52b5ffa4786013c4dab43 100644 (file)
@@ -373,8 +373,9 @@ abstract class capability_table_with_risks extends capability_table_base {
     }
 
     protected function add_header_cells() {
+        global $OUTPUT;
         echo '<th colspan="' . count($this->displaypermissions) . '" scope="col">' .
-                get_string('permission', 'role') . ' ' . helpbutton('permissions', get_string('permissions', 'role'), '', true, false, '', true) . '</th>';
+                get_string('permission', 'role') . ' ' . $OUTPUT->help_icon(moodle_help_icon::make('permissions', get_string('permissions', 'role'))) . '</th>';
         echo '<th class="risk" colspan="' . count($this->allrisks) . '" scope="col">' . get_string('risks','role') . '</th>';
     }
 
index 438611f03cc34205c415cc4d66c636f7050bffd9..cf8bebd367314a47d751bc57d66948a2d16775ae 100755 (executable)
     $table->wrap = array('nowrap', '', 'nowrap','nowrap');
     $table->width = '90%';
     $table->head = array(
-        get_string('role') . ' ' . helpbutton('roles', get_string('roles'), 'moodle', true, false, '', true),
+        get_string('role') . ' ' . $OUTPUT->help_icon(moodle_help_icon::make('roles', get_string('roles'))),
         get_string('description'),
         get_string('shortname'),
         get_string('edit')
index 112f27e0be6ebb418f4dc6a3a663ef6d13676926..11d0a76b0b0f4b8a9b856e167fedfbde6cc38859 100644 (file)
@@ -37,10 +37,10 @@ if ($data = data_submitted() and confirm_sesskey()) {
 admin_externalpage_print_header($focus);
 
 if ($errormsg !== '') {
-    notify ($errormsg);
+    echo $OUTPUT->notification($errormsg);
 
 } else if ($statusmsg !== '') {
-    notify ($statusmsg, 'notifysuccess');
+    echo $OUTPUT->notification($statusmsg, 'notifysuccess');
 }
 
 $resultshtml = admin_search_settings_html($query); // case insensitive search only
index 612db979bac636f691c206e7b36564839bafed6a..59f1724fdc550b3a4f9d4b02ac446967e342f5a6 100644 (file)
@@ -58,13 +58,13 @@ if ($PAGE->user_allowed_editing() && $adminediting != -1) {
 /// print header stuff ------------------------------------------------------------
 if (empty($SITE->fullname)) {
     print_header($settingspage->visiblename, $settingspage->visiblename, '', $focus);
-    print_simple_box(get_string('configintrosite', 'admin'), 'center', '50%');
+    echo $OUTPUT->box(get_string('configintrosite', 'admin'));
 
     if ($errormsg !== '') {
-        notify ($errormsg);
+        echo $OUTPUT->notification($errormsg);
 
     } else if ($statusmsg !== '') {
-        notify ($statusmsg, 'notifysuccess');
+        echo $OUTPUT->notification($statusmsg, 'notifysuccess');
     }
 
     // ---------------------------------------------------------------------------------------------------------------
@@ -105,10 +105,10 @@ if (empty($SITE->fullname)) {
     print_header("$SITE->shortname: " . implode(": ",$visiblepathtosection), $SITE->fullname, $navigation, $focus, '', true, $buttons, '');
 
     if ($errormsg !== '') {
-        notify ($errormsg);
+        echo $OUTPUT->notification($errormsg);
 
     } else if ($statusmsg !== '') {
-        notify ($statusmsg, 'notifysuccess');
+        echo $OUTPUT->notification($statusmsg, 'notifysuccess');
     }
 
     // ---------------------------------------------------------------------------------------------------------------
index 57f68a2e72dba0ee9fa1eaab221252cd7b48b81b..1be7c872dccb5d8a4c345647ba6dc0b21344ad21 100644 (file)
@@ -29,7 +29,7 @@
 
         $USER->timezone = $zone;
         $current = $zone;
-        notify('Timezone of all users changed', 'notifysuccess');
+        echo $OUTPUT->notification('Timezone of all users changed', 'notifysuccess');
     } else {
         $current = 99;
     }
index 23b0a323bae4a672b8004000eb7d4b1302e6bfab..c7b47b4255d896f859d30015769e8568c2feb2de 100644 (file)
@@ -94,7 +94,7 @@
         $a->source  = $importdone;
         echo $OUTPUT->heading(get_string('importtimezonescount', 'admin', $a), 3);
 
-        print_continue('index.php');
+        echo $OUTPUT->continue_button('index.php');
 
         $timezonelist = array();
         foreach ($timezones as $timezone) {
         ksort($timezonelist);
 
         echo "<br />";
-        print_simple_box_start('center');
+        echo $OUTPUT->box_start();
         foreach ($timezonelist as $name => $count) {
             echo "$name ($count)<br />";
         }
-        print_simple_box_end();
+        echo $OUTPUT->box_end();
 
     } else {
         echo $OUTPUT->heading(get_string('importtimezonesfailed', 'admin'), 3);
-        print_continue('index.php');
+        echo $OUTPUT->continue_button('index.php');
     }
 
     echo $OUTPUT->footer();
index 8f8a44daf61363d49cff90c37841c611da98dde1..0b18366e6d3436d4e22be4e1d940097510eb142d 100644 (file)
@@ -64,7 +64,7 @@ print_heading_with_help($struploadpictures, 'uploadpictures');
 $mform = new admin_uploadpicture_form(null, $userfields);
 if ($formdata = $mform->get_data()) {
     if (!array_key_exists($userfield, $userfields)) {
-        notify(get_string('uploadpicture_baduserfield','admin'));
+        echo $OUTPUT->notification(get_string('uploadpicture_baduserfield','admin'));
     } else {
         // Large files are likely to take their time and memory. Let PHP know
         // that we'll take longer, and that the process should be recycled soon
@@ -81,11 +81,11 @@ if ($formdata = $mform->get_data()) {
         $dstfile = $zipodir.'/images.zip';
         
         if (!$mform->save_file('userfile', $dstfile, true)) {
-            notify(get_string('uploadpicture_cannotmovezip','admin'));
+            echo $OUTPUT->notification(get_string('uploadpicture_cannotmovezip','admin'));
             @remove_dir($zipdir);
         } else {
             if (!unzip_file($dstfile, $zipdir, false)) {
-                notify(get_string('uploadpicture_cannotunzip','admin'));
+                echo $OUTPUT->notification(get_string('uploadpicture_cannotunzip','admin'));
                 @remove_dir($zipdir);
             } else {
                 // We don't need the zip file any longer, so delete it to make
@@ -99,8 +99,8 @@ if ($formdata = $mform->get_data()) {
             
                 // Finally remove the temporary directory with all the user images and print some stats.
                 remove_dir($zipdir);
-                notify(get_string('usersupdated', 'admin') . ": " . $results['updated']);
-                notify(get_string('errors', 'admin') . ": " . $results['errors']);
+                echo $OUTPUT->notification(get_string('usersupdated', 'admin') . ": " . $results['updated']);
+                echo $OUTPUT->notification(get_string('errors', 'admin') . ": " . $results['errors']);
                 echo '<hr />';
             }
         }
@@ -149,8 +149,9 @@ function my_mktempdir($dir, $prefix='', $mode=0700) {
  * @return nothing
  */
 function process_directory ($dir, $userfield, $overwrite, &$results) {
+    global $OUTPUT;
     if(!($handle = opendir($dir))) {
-        notify(get_string('uploadpicture_cannotprocessdir','admin'));
+        echo $OUTPUT->notification(get_string('uploadpicture_cannotprocessdir','admin'));
         return;
     }
 
@@ -191,7 +192,7 @@ function process_directory ($dir, $userfield, $overwrite, &$results) {
  *                  PIX_FILE_SKIPPED
  */
 function process_file ($file, $userfield, $overwrite) {
-    global $DB;
+    global $DB, $OUTPUT;
     
     // Add additional checks on the filenames, as they are user
     // controlled and we don't want to open any security holes.
@@ -200,7 +201,7 @@ function process_file ($file, $userfield, $overwrite) {
     $extension = $path_parts['extension'];
     if ($basename != clean_param($basename, PARAM_FILE)) {
         // The original picture file name has invalid characters
-        notify(get_string('uploadpicture_invalidfilename', 'admin',
+        echo $OUTPUT->notification(get_string('uploadpicture_invalidfilename', 'admin',
                           clean_param($basename, PARAM_CLEANHTML)));
         return PIX_FILE_ERROR;
     }
@@ -216,22 +217,22 @@ function process_file ($file, $userfield, $overwrite) {
         $a = new Object();
         $a->userfield = clean_param($userfield, PARAM_CLEANHTML);
         $a->uservalue = clean_param($uservalue, PARAM_CLEANHTML);
-        notify(get_string('uploadpicture_usernotfound', 'admin', $a));
+        echo $OUTPUT->notification(get_string('uploadpicture_usernotfound', 'admin', $a));
         return PIX_FILE_ERROR;
     }
 
     $haspicture = $DB->get_field('user', 'picture', array('id'=>$user->id));
     if ($haspicture && !$overwrite) {
-        notify(get_string('uploadpicture_userskipped', 'admin', $user->username));
+        echo $OUTPUT->notification(get_string('uploadpicture_userskipped', 'admin', $user->username));
         return PIX_FILE_SKIPPED;
     }
 
     if (my_save_profile_image($user->id, $file)) {
         $DB->set_field('user', 'picture', 1, array('id'=>$user->id));
-        notify(get_string('uploadpicture_userupdated', 'admin', $user->username));
+        echo $OUTPUT->notification(get_string('uploadpicture_userupdated', 'admin', $user->username));
         return PIX_FILE_UPDATED;
     } else {
-        notify(get_string('uploadpicture_cannotsave', 'admin', $user->username));
+        echo $OUTPUT->notification(get_string('uploadpicture_cannotsave', 'admin', $user->username));
         return PIX_FILE_ERROR;
     }
 }
index a89ee243f007d646ff03ded8f7b44680cb7d1509..fc0924b7bd3e73e1431165a99caf2d8a5e612d71 100755 (executable)
@@ -729,9 +729,9 @@ if ($formdata = $mform->is_cancelled()) {
     echo $OUTPUT->box_end();
 
     if ($bulk) {
-        print_continue($bulknurl);
+        echo $OUTPUT->continue_button($bulknurl);
     } else {
-        print_continue($returnurl);
+        echo $OUTPUT->continue_button($returnurl);
     }
     echo $OUTPUT->footer();
     die;
index a6a3ad4488d6d5c716dec0879aac3209ece3a70a..0496b9c316457404adcc1b94f002043bbda35b5e 100644 (file)
@@ -83,7 +83,7 @@
             } else {
                 session_gc(); // remove stale sessions
                 admin_externalpage_print_header();
-                notify($returnurl, get_string('deletednot', '', fullname($user, true)));
+                echo $OUTPUT->notification($returnurl, get_string('deletednot', '', fullname($user, true)));
             }
         }
     } else if ($acl and confirm_sesskey()) {
index b5b4c1efc2867729a7d6d79315cd5892de021017..6a944fb9007e60801188d046a4ebdf54e58322ee 100755 (executable)
@@ -32,7 +32,7 @@ if ($confirm and confirm_sesskey()) {
             $auth = get_auth_plugin($user->auth);
             $result = $auth->user_confirm($user->username, $user->secret);
             if ($result != AUTH_CONFIRM_OK && $result != AUTH_CONFIRM_ALREADY) {
-                notify(get_string('usernotconfirmed', '', fullname($user, true)));
+                echo $OUTPUT->notification(get_string('usernotconfirmed', '', fullname($user, true)));
             }
         }
         $rs->close();
index 559bef48d083ba61c3f7662cc2a9cfe108d50c1f..aef04b38f5a59a60559d902fa56cbcd9bfd956ba 100755 (executable)
@@ -31,7 +31,7 @@ if ($confirm and confirm_sesskey()) {
             if ($primaryadmin->id != $user->id and $USER->id != $user->id and delete_user($user)) {
                 unset($SESSION->bulk_users[$user->id]);
             } else {
-                notify(get_string('deletednot', '', fullname($user, true)));
+                echo $OUTPUT->notification(get_string('deletednot', '', fullname($user, true)));
             }
         }
         $rs->close;
index 90b88d4350b668d5f1b260f445a12ea2d929a68d..eead78be3c23bae2c31b0200b5c93730e15c771a 100755 (executable)
@@ -75,7 +75,7 @@ foreach($users as $user) {
 echo $OUTPUT->heading("$usercount / $usertotal ".get_string('users'));
 print_table($table);
 
-print_continue($return);
+echo $OUTPUT->continue_button($return);
 
 echo $OUTPUT->footer();
 ?>
index 1032b2cf50c9a2005812967daa27b3d5e5801f46..8f46f3f31960e7e81b7762becbe5d6ea17b4d068 100755 (executable)
@@ -64,7 +64,7 @@ echo '<li><a href="user_bulk_download.php?format=xls">'.get_string('downloadexce
 echo '</ul>';
 echo $OUTPUT->box_end();
 
-print_continue($return);
+echo $OUTPUT->continue_button($return);
 
 echo $OUTPUT->footer();
 
index 59599ff65cb2c62592f21f8c51bc9ece17bad2e9..602a201427a0e8218c97bf37b074234180cf2d99 100644 (file)
@@ -39,9 +39,9 @@ if (!empty($hide)) {
         redirect($baseurl,get_string("changessaved"));
     }
 
-    print_simple_box_start();
+    echo $OUTPUT->box_start();
     $mform->display();
-    print_simple_box_end();
+    echo $OUTPUT->box_end();
 
 } else if (!empty($settings)) {
 /// Server settings page
@@ -72,9 +72,9 @@ if (!empty($hide)) {
         redirect($baseurl,get_string("changessaved")); // return to the security web service page
     }
 /// display the server settings form
-    print_simple_box_start();
+    echo $OUTPUT->box_start();
     $mform->display();
-    print_simple_box_end();
+    echo $OUTPUT->box_end();
 } else {
     $return = true;
 }
index ff84c87406fb7bc32bec7b1fe7414b61ed915bc0..255c8a710622d03e1cf8d8f178277c8c7083dc37 100644 (file)
@@ -76,7 +76,7 @@ abstract class XMLDBCheckAction extends XMLDBAction {
         $this->does_generate = ACTION_GENERATE_HTML;
 
     /// These are always here
-        global $CFG, $XMLDB, $DB;
+        global $CFG, $XMLDB, $DB, $OUTPUT;
 
     /// And we nedd some ddl suff
         $dbman = $DB->get_manager();
@@ -133,7 +133,7 @@ abstract class XMLDBCheckAction extends XMLDBAction {
                 /// Load the XML contents to structure
                     $loaded = $xmldb_file->loadXMLStructure();
                     if (!$loaded || !$xmldb_file->isLoaded()) {
-                        notify('Errors found in XMLDB file: '. $dbdir->path . '/install.xml');
+                        echo $OUTPUT->notification('Errors found in XMLDB file: '. $dbdir->path . '/install.xml');
                         continue;
                     }
                 /// Arriving here, everything is ok, get the XMLDB structure