]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19787 Converted print_box* to $OUTPUT->box*
authornicolasconnault <nicolasconnault>
Mon, 10 Aug 2009 04:53:22 +0000 (04:53 +0000)
committernicolasconnault <nicolasconnault>
Mon, 10 Aug 2009 04:53:22 +0000 (04:53 +0000)
26 files changed:
admin/block.php
admin/filters.php
admin/index.php
admin/lang.php
admin/langimport.php
admin/mnet/access_control.php
admin/mnet/enr_course_enrol.php
admin/mnet/enr_courses.php
admin/mnet/enr_hosts.php
admin/mnet/peers.html
admin/qtypes.php
admin/report/capability/index.php
admin/report/questioninstances/index.php
admin/report/security/index.php
admin/report/spamcleaner/index.php
admin/report/unittest/ex_reporter.php
admin/roles/assign.php
admin/roles/check.php
admin/roles/define.php
admin/roles/override.php
admin/roles/usersroles.php
admin/upgradesettings.php
admin/uploaduser.php
admin/user/user_bulk_download.php
admin/user/user_bulk_message.php
index.php

index cab6170911f5ba991c8b7effa94637bc97055141..ffa08079a7f3913c515048aa6130c0bb70f8c1d6 100644 (file)
@@ -56,7 +56,7 @@
     notify('This block still uses an old-style config_global.html file. ' .
             'It must be updated by a developer to use a settings.php file.');
 
-    print_box(get_string('configwarning', 'admin'), 'generalbox boxwidthnormal boxaligncenter');
+    echo $OUTPUT->box(get_string('configwarning', 'admin'), 'generalbox boxwidthnormal boxaligncenter');
     echo '<br />';
 
     echo '<form method="post" action="block.php">';
@@ -66,9 +66,9 @@
     }
     echo '</p>';
 
-    print_box_start();
+    echo $OUTPUT->box_start();
     include($CFG->dirroot.'/blocks/'. $block->name() .'/config_global.html');
-    print_box_end();
+    echo $OUTPUT->box_end();
 
     echo '</form>';
     echo $OUTPUT->footer();
index 45a72fd8ffd386f52f3d3a72449d1c2910b60376..440d3d73ad0dea40b7724fc9907f6ac4d4f049f6 100644 (file)
         $a = new stdClass;
         $a->filter = $filtername;
         $a->directory = $filterpath;
-        print_box(get_string('deletefilterfiles', 'admin', $a), 'generalbox', 'notice');
+        echo $OUTPUT->box(get_string('deletefilterfiles', 'admin', $a), 'generalbox', 'notice');
         print_continue($returnurl);
         echo $OUTPUT->footer();
         exit;
index f6a16393a6db20ad11f705ed1e1931f8040cbb8c..ec4617a9c3f61f6d3a520806254ce93e1786c0a2 100644 (file)
@@ -125,7 +125,7 @@ if (!core_tables_exist()) {
         echo $OUTPUT->heading(get_string('copyrightnotice'));
         $copyrightnotice = text_to_html(get_string('gpl'));
         $copyrightnotice = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $copyrightnotice); // extremely ugly validation hack
-        print_box($copyrightnotice, 'copyrightnotice');
+        echo $OUTPUT->box($copyrightnotice, 'copyrightnotice');
         echo '<br />';
         notice_yesno(get_string('doyouagree'), "index.php?agreelicense=1&lang=$CFG->lang",
                                                "http://docs.moodle.org/en/License");
@@ -139,7 +139,7 @@ if (!core_tables_exist()) {
         echo $OUTPUT->heading("Moodle $release");
         $releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes');
         $releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
-        print_box($releasenoteslink, 'generalbox boxaligncenter boxwidthwide');
+        echo $OUTPUT->box($releasenoteslink, 'generalbox boxaligncenter boxwidthwide');
 
         require_once($CFG->libdir.'/environmentlib.php');
         if (!check_moodle_environment($release, $environment_results, true, ENV_SELECT_RELEASE)) {
@@ -203,7 +203,7 @@ if ($version > $CFG->version) {  // upgrade
         echo $OUTPUT->heading("Moodle $release");
         $releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes');
         $releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
-        print_box($releasenoteslink);
+        echo $OUTPUT->box($releasenoteslink);
 
         require_once($CFG->libdir.'/environmentlib.php');
         if (!check_moodle_environment($release, $environment_results, true, ENV_SELECT_RELEASE)) {
@@ -211,9 +211,9 @@ if ($version > $CFG->version) {  // upgrade
         } else {
             notify(get_string('environmentok', 'admin'), 'notifysuccess');
             if (empty($CFG->skiplangupgrade)) {
-                print_box_start('generalbox', 'notice');
+                echo $OUTPUT->box_start('generalbox', 'notice');
                 print_string('langpackwillbeupdated', 'admin');
-                print_box_end();
+                echo $OUTPUT->box_end();
             }
             print_continue('index.php?confirmupgrade=1&amp;confirmrelease=1');
         }
@@ -226,9 +226,9 @@ if ($version > $CFG->version) {  // upgrade
         $navigation = build_navigation(array(array('name'=>$strplugincheck, 'link'=>null, 'type'=>'misc')));
         print_header($strplugincheck, $strplugincheck, $navigation, '', '', false, '&nbsp;', '&nbsp;');
         echo $OUTPUT->heading($strplugincheck);
-        print_box_start('generalbox', 'notice');
+        echo $OUTPUT->box_start('generalbox', 'notice');
         print_string('pluginchecknotice');
-        print_box_end();
+        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');
@@ -342,14 +342,14 @@ admin_externalpage_setup('adminnotifications');
 admin_externalpage_print_header();
 
 if ($insecuredataroot == INSECURE_DATAROOT_WARNING) {
-    print_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
+    echo $OUTPUT->box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
 } else if ($insecuredataroot == INSECURE_DATAROOT_ERROR) {
-    print_box(get_string('datarootsecurityerror', 'admin', $CFG->dataroot), 'generalbox adminerror');
+    echo $OUTPUT->box(get_string('datarootsecurityerror', 'admin', $CFG->dataroot), 'generalbox adminerror');
 
 }
 
 if (defined('WARN_DISPLAY_ERRORS_ENABLED')) {
-    print_box(get_string('displayerrorswarning', 'admin'), 'generalbox adminwarning');
+    echo $OUTPUT->box(get_string('displayerrorswarning', 'admin'), 'generalbox adminwarning');
 }
 
 // If no recently cron run
@@ -357,17 +357,17 @@ $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);
-    print_box(get_string('cronwarning', 'admin').'&nbsp;'.$helpbutton, 'generalbox adminwarning');
+    echo $OUTPUT->box(get_string('cronwarning', 'admin').'&nbsp;'.$helpbutton, 'generalbox adminwarning');
 }
 
 // Print multilang upgrade notice if needed
 if (empty($CFG->filter_multilang_converted)) {
-    print_box(get_string('multilangupgradenotice', 'admin'), 'generalbox adminwarning');
+    echo $OUTPUT->box(get_string('multilangupgradenotice', 'admin'), 'generalbox adminwarning');
 }
 
 // Alert if we are currently in maintenance mode
 if (!empty($CFG->maintenance_enabled)) {
-    print_box(get_string('sitemaintenancewarning2', 'admin', "$CFG->wwwroot/$CFG->admin/settings.php?section=maintenancemode"), 'generalbox adminwarning');
+    echo $OUTPUT->box(get_string('sitemaintenancewarning2', 'admin', "$CFG->wwwroot/$CFG->admin/settings.php?section=maintenancemode"), 'generalbox adminwarning');
 }
 
 
@@ -378,7 +378,7 @@ $copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
                  'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
                  'and <a href="http://docs.moodle.org/en/Credits">many other contributors</a>.<br />'.
                  '<a href="http://docs.moodle.org/en/License">GNU Public License</a>';
-print_box($copyrighttext, 'copyright');
+echo $OUTPUT->box($copyrighttext, 'copyright');
 //////////////////////////////////////////////////////////////////////////////////////////////////
 
 echo $OUTPUT->footer();
index 55ca4156e172abaa9739b6effebb6ef175cb1500..a0ec39f37c007713b1110348348b9ded027ba353 100644 (file)
 
     if (!$mode) {
         // TODO this is a very nice place to put some translation statistics
-        print_box_start();
+        echo $OUTPUT->box_start();
         $currlang = current_language();
         $langs = get_list_of_languages(false, true);
         $select = moodle_select::make_popup_form("$CFG->wwwroot/$CFG->admin/lang.php", 'lang', $langs, "chooselang", $currlang);
         $select->nothinglabel = false;
         $select->set_label($strcurrentlanguage.':');
         echo $OUTPUT->select($select);
-        print_box_end();
+        echo $OUTPUT->box_end();
         echo $OUTPUT->footer();
         exit;
     }
 
         // Total number of strings and missing strings
         $totalcounter->strings = 0;
-        $totalcounter->missing = 0;       
+        $totalcounter->missing = 0;
 
         // For each file, check that a counterpart exists, then check all the strings
         foreach ($stringfiles as $stringfile) {
             $prefix = $stringfile['prefix'];
             $filename = $stringfile['filename'];
             unset($string);
-            
+
             // Get some information about file locations:
             //  $enfilepath = the path to the English file distributed either in the core space or in plugin space
             //  $trfilepath = the path to the translated file distributed either in the lang pack or in plugin space
             $enstring = isset($string) ? $string : array();
             unset($string);
             ksort($enstring);
-            
+
             //$lcstring = local customizations
             $lcstring = array();
             if (file_exists($lcfilepath)) {
         }
 
         if ($m <> '') {
-            print_box($m, 'filenames');
+            echo $OUTPUT->box($m, 'filenames');
         }
 
         echo $o;
                 }
                 $saveinto = $locallangdir;
             }
-             
+
             if (lang_save_file($saveinto, $currentfile, $newstrings, $uselocal, $packstring)) {
                 notify(get_string("changessaved")." ($saveinto/$currentfile)", "notifysuccess");
             } else {
             unset($packstring);
         }
 
-        print_box_start('generalbox editstrings');
+        echo $OUTPUT->box_start('generalbox editstrings');
         $menufiles = array();
         $menufiles_coregrp = 1;
         foreach ($stringfiles as $stringfile) {
         $select->set_label($selectionlabel);
         echo $OUTPUT->select($select);
         helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
-        print_box_end();
-        
+        echo $OUTPUT->box_end();
+
         if ($currentfile <> '') {
             error_reporting(0);
             if (!isset($editable) || $editable) {
             error_reporting($CFG->debug);
 
             $o = '';    // stores the HTML output to be echo-ed
-            
+
             unset($string);
             include($enfilepath);
             $enstring = isset($string) ? $string : array();
             }
         }
 
-        print_box_start('generalbox editstrings');
+        echo $OUTPUT->box_start('generalbox editstrings');
         $menufiles = array();
         $menufiles_coregrp = 1;
         $origlocation = ''; // the location of the currentfile's English source will be stored here
         $select->set_label($selectionlabel);
         echo $OUTPUT->select($select);
         helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
-        print_box_end();
+        echo $OUTPUT->box_end();
 
         if (!empty($currentfile)) {
 
index 614a5491dbff9ff820952be7aeea5f46c044e8bb..31e37c5626fae2e725bf979eae241688743c133a 100755 (executable)
@@ -13,7 +13,7 @@
 
     if (!empty($CFG->skiplangupgrade)) {
         admin_externalpage_print_header();
-        print_box(get_string('langimportdisabled', 'admin'));
+        echo $OUTPUT->box(get_string('langimportdisabled', 'admin'));
         echo $OUTPUT->footer();
         die;
     }
     }
 
     if (!$remote) {
-        print_box_start();
+        echo $OUTPUT->box_start();
         print_string('remotelangnotavailable', 'admin', $CFG->dataroot.'/lang/');
-        print_box_end();
+        echo $OUTPUT->box_end();
     }
 
     if ($notice_ok) {
         }
     }
 
-    print_box_start();
+    echo $OUTPUT->box_start();
     echo '<table summary="">';
     echo '<tr><td align="center" valign="top">';
     echo '<form id="uninstallform" action="langimport.php?mode='.DELETION_OF_SELECTED_LANG.'" method="post">';
 
     //close available langs table
     echo '</td></tr></table>';
-    print_box_end();
+    echo $OUTPUT->box_end();
 
     echo $OUTPUT->footer();
 
index defce6c897ccb4c98a27c9fd7949e44030cbd29e..34799f2b93905a69a55c42b163667af09a209c67 100644 (file)
@@ -36,7 +36,7 @@ if (array_key_exists($CFG->mnet_localhost_id, $mnethosts)) {
 
 // process actions
 if (!empty($action) and confirm_sesskey()) {
-    
+
     // boot if insufficient permission
     if (!has_capability('moodle/user:delete', $sitecontext)) {
         print_error('nomodifyacl','mnet');
@@ -56,7 +56,7 @@ if (!empty($action) and confirm_sesskey()) {
             break;
 
         case "acl":
-        
+
             // require the access parameter, and it must be 'allow' or 'deny'
             $accessctrl = trim(strtolower(required_param('accessctrl', PARAM_ALPHA)));
             if ($accessctrl != 'allow' and $accessctrl != 'deny') {
@@ -119,7 +119,7 @@ if ($form = data_submitted() and confirm_sesskey()) {
 }
 
 // Explain
-print_box(get_string('ssoacldescr','mnet'));
+echo $OUTPUT->box(get_string('ssoacldescr','mnet'));
 // Are the needed bits enabled?
 $warn = '';
 if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
@@ -135,7 +135,7 @@ if (get_config('auth/mnet', 'auto_add_remote_users') != true) {
 }
 if (!empty($warn)) {
     $warn = '<p>' .  get_string('ssoaclneeds','mnet').'</p>' . $warn;
-    print_box($warn);
+    echo $OUTPUT->box($warn);
 }
 // output the ACL table
 $columns = array("username", "mnet_host_id", "access", "delete");
@@ -196,7 +196,7 @@ if (!empty($table)) {
 print_simple_box_start('center','90%','','20');
 
 ?>
- <div class="mnetaddtoaclform"> 
+ <div class="mnetaddtoaclform">
   <form id="mnetaddtoacl" method="post">
     <input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>" />
 <?php
index 493e906deaf04d4f7b7f13ec95b404087a46476e..78baffdb18a05cfcad4aefb938a576d0bd8d0fbb 100644 (file)
             }
         }
     }
-    
+
     $all_enrolled_usernames = '';
     $timemodified = array();
 /// List all the users (homed on this server) who are enrolled on the course
-/// This will include mnet-enrolled users, and those who have enrolled 
+/// This will include mnet-enrolled users, and those who have enrolled
 /// themselves, etc.
     if (is_array($all_enrolled_users) && count($all_enrolled_users)) {
-        list($select, $params) = $DB->get_in_or_equal(array_keys($all_enrolled_users), SQL_PARAMS_NAMED, 'un0'); 
+        list($select, $params) = $DB->get_in_or_equal(array_keys($all_enrolled_users), SQL_PARAMS_NAMED, 'un0');
         $select = " u.username $select AND ";
 
     } else {
             ON
                 a.userid = u.id AND a.courseid=:courseid
             WHERE
-                $select 
+                $select
                 u.deleted = 0 AND
                 u.confirmed = 1 AND
                 u.mnethostid = :mnetid
     // Read about our remote enrolments in 2 sets
     // first, get the remote enrolments done via enrol/mnet      $mnetenrolledusers
     // second, get the remote enrolments done with other plugins $remtenrolledusers
-    // NOTE: both arrays are keyed on the userid! 
+    // NOTE: both arrays are keyed on the userid!
     $sql = "
             SELECT
                 u.id,
                 {user} u,
                 {mnet_enrol_assignments} a
             WHERE
-                a.userid = u.id AND 
+                a.userid = u.id AND
                 a.courseid=:courseid AND
                 a.enroltype = 'mnet'   AND
                 u.deleted = 0 AND
                 {user} u,
                 {mnet_enrol_assignments} a
             WHERE
-                a.userid = u.id AND 
+                a.userid = u.id AND
                 a.courseid=:courseid AND
                 a.enroltype != 'mnet'  AND
                 u.deleted = 0 AND
         $params['search2'] = "%$searchtext%";
     }
 
-    $sql = ("SELECT id, firstname, lastname, email 
+    $sql = ("SELECT id, firstname, lastname, email
                FROM {user} u
-              WHERE deleted = 0 AND confirmed = 1 
+              WHERE deleted = 0 AND confirmed = 1
                     AND mnethostid = :mnetid
                     $select
            ORDER BY lastname ASC, firstname ASC");
 
     $availableusers = $DB->get_recordset_sql($sql, $params, 0, MAX_USERS_PER_PAGE);
 
-    $sql = ("SELECT COUNT('x') 
+    $sql = ("SELECT COUNT('x')
                FROM {user} u
-              WHERE deleted = 0 AND confirmed = 1 
+              WHERE deleted = 0 AND confirmed = 1
                     AND mnethostid = :mnetid
                     $select");
     $availablecount = $DB->count_records_sql($sql, $params);
@@ -286,8 +286,8 @@ $strsearchresults = get_string('searchresults');
 
 admin_externalpage_print_header();
 
-print_box('<strong>' . s($mnet_peer->name) . ' : ' 
-          . format_string($course->shortname) .' '. format_string($course->fullname) 
+echo $OUTPUT->box('<strong>' . s($mnet_peer->name) . ' : '
+          . format_string($course->shortname) .' '. format_string($course->fullname)
           . '</strong><br />'
           . get_string("enrolcourseenrol_desc", "mnet"));
 
index 340a625a75400ae0866559d8c7218ff9017faed6..35d552ef0cff32eab35f78a8b742bdd5e73a3c8a 100644 (file)
@@ -24,7 +24,7 @@
 
     admin_externalpage_print_header();
 
-    print_box('<strong>' . s($host->name) . ' </strong><br />'
+    echo $OUTPUT->box('<strong>' . s($host->name) . ' </strong><br />'
               . get_string("enrolcourses_desc", "mnet"));
 
     echo '<hr />';
index 3dfccb5688f9448026ecef02637502dc6d3c87f7..769770de710101228a1a810f24621268ce403035 100644 (file)
 
     admin_externalpage_print_header();
 
-    print_box(get_string("remoteenrolhosts_desc", "mnet"));
+    echo $OUTPUT->box(get_string("remoteenrolhosts_desc", "mnet"));
 
     echo '<hr />';
 
     if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
-        print_box(get_string('mnetdisabled','mnet'));
+        echo $OUTPUT->box(get_string('mnetdisabled','mnet'));
     }
 
     echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
index 66a8056aa402911c403e3c23d469bb674e97d3e1..eea3508a635b31355db53ce3b91fd6cf0ebb2a79 100644 (file)
@@ -2,7 +2,7 @@
 admin_externalpage_print_header();
 
 if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
-    print_box(get_string('mnetdisabled','mnet'));
+    echo $OUTPUT->box(get_string('mnetdisabled','mnet'));
 }
 ?>
 <div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
@@ -67,7 +67,7 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
     </table>
     <form method="post" action="peers.php">
         <table cellspacing="0" cellpadding="5" class="generaltable generalbox standard" >
-            
+
             <tr>
                 <th class="header c4" colspan="4">
                     <?php print_string('addnewhost', 'mnet'); ?>
@@ -92,7 +92,7 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
             <tr>
                 <td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
             </tr>
-        
+
         </table>
     </form>
 </div>
index 31d3cbd5be48f9444c7f27bbde11bdde656df4a5..2dafdc9d7a6ebaea9552049fcb6ed0dffb83bf70 100644 (file)
 
         $a->qtype = $qtypename;
         $a->directory = $QTYPES[$delete]->plugin_dir();
-        print_box(get_string('qtypedeletefiles', 'admin', $a), 'generalbox', 'notice');
+        echo $OUTPUT->box(get_string('qtypedeletefiles', 'admin', $a), 'generalbox', 'notice');
         print_continue(admin_url('qtypes.php'));
         echo $OUTPUT->footer();
         exit;
index 5e45dd572b772f4de8b3fac470d2bda866870984..0c2f33ca61c48e0d89c543283f1cbf5f4f5b560f 100644 (file)
@@ -69,7 +69,7 @@ if (count($cleanedroleids) == count($allroles)) {
 }
 
 // Print the settings form.
-print_box_start('generalbox boxwidthwide boxaligncenter centerpara');
+echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter centerpara');
 echo '<form method="get" action="." id="settingsform">';
 echo $OUTPUT->heading(get_string('reportsettings', 'report_capability'));
 echo '<p id="intro">', get_string('intro', 'report_capability') , '</p>';
@@ -79,7 +79,7 @@ echo '<p><label for="menuroles"> ' . get_string('roleslabel', 'report_capability
 choose_from_menu($rolechoices, 'roles[]', $selectedroleids, '', '', '', false, false, 0, '', true, true);
 echo '<p><input type="submit" id="settingssubmit" value="' . get_string('getreport', 'report_capability') . '" /></p>';
 echo '</form>';
-print_box_end();
+echo $OUTPUT->box_end();
 
 // If we have a capability, generate the report.
 if ($capability) {
@@ -191,7 +191,7 @@ function print_report_tree($contextid, $contexts, $allroles) {
         foreach ($allroles as $role) {
             if (isset($contexts[$contextid]->rolecapabilites[$role->id])) {
                 $permission = $contexts[$contextid]->rolecapabilites[$role->id];
-                echo '<tr class="r' . ($rowcounter % 2) . '"><th class="cell">', $role->name, 
+                echo '<tr class="r' . ($rowcounter % 2) . '"><th class="cell">', $role->name,
                         '</th><td class="cell">' . $strpermissions[$permission] . '</td></tr>';
                 $rowcounter++;
             }
index 56d72cedf06142aa12c5d9ee7f60fb3346e1048c..32ac9997b71872eb27132bcc8010f924de86e7ab 100644 (file)
@@ -1,6 +1,6 @@
 <?php  // $Id$
 /**
- * For a given question type, list the number of 
+ * For a given question type, list the number of
  *
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  * @package roles
@@ -28,7 +28,7 @@ foreach ($QTYPES as $qtype) {
 }
 
 // Print the settings form.
-print_box_start('generalbox boxwidthwide boxaligncenter centerpara');
+echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter centerpara');
 echo '<form method="get" action="." id="settingsform"><div>';
 echo $OUTPUT->heading(get_string('reportsettings', 'report_questioninstances'));
 echo '<p id="intro">', get_string('intro', 'report_questioninstances') , '</p>';
@@ -38,7 +38,7 @@ echo '</p>';
 echo '<p><input type="submit" id="settingssubmit" value="' .
         get_string('getreport', 'report_questioninstances') . '" /></p>';
 echo '</div></form>';
-print_box_end();
+echo $OUTPUT->box_end();
 
 // If we have a qtype to report on, generate the report.
 if ($requestedqtype) {
@@ -64,7 +64,7 @@ if ($requestedqtype) {
     // Get the question counts, and all the context information, for each
     // context. That is, rows of these results can be used as $context objects.
     $counts = $DB->get_records_sql("
-            SELECT qc.contextid, count(1) as numquestions, sum(hidden) as numhidden, con.id, con.contextlevel, con.instanceid, con.path, con.depth 
+            SELECT qc.contextid, count(1) as numquestions, sum(hidden) as numhidden, con.id, con.contextlevel, con.instanceid, con.path, con.depth
             FROM {question} q
             JOIN {question_categories} qc ON q.category = qc.id
             JOIN {context} con ON con.id = qc.contextid
index 1bea6cd1a846696d66024d5562b72ef22eeba520..7a2a1ec84f3a77f19fceaf776b94132235792d44 100644 (file)
@@ -94,7 +94,7 @@ if ($issue and ($result = $issue(true))) {
 
     print_table($table);
 
-    print_box($result->details, 'generalbox boxwidthnormal boxaligncenter'); // TODO: add proper css
+    echo $OUTPUT->box($result->details, 'generalbox boxwidthnormal boxaligncenter'); // TODO: add proper css
 
     print_continue($url);
 
index f7be5c52c93d0c6f82ad55bdf6fe4325aa155940..2f629c59815fe1fe4d11eb8324cd8606d8d400fe 100755 (executable)
@@ -45,7 +45,7 @@ admin_externalpage_setup('reportspamcleaner');
 $PAGE->requires->yui_lib('json');
 $PAGE->requires->yui_lib('connection');
 
-// Implement some AJAX calls 
+// Implement some AJAX calls
 
 // Delete one user
 if (!empty($del) && confirm_sesskey() && ($id != $USER->id)) {
@@ -91,9 +91,9 @@ admin_externalpage_print_header();
 
 print_spamcleaner_javascript();
 
-print_box(get_string('spamcleanerintro', 'report_spamcleaner'));
+echo $OUTPUT->box(get_string('spamcleanerintro', 'report_spamcleaner'));
 
-print_box_start();     // The forms section at the top
+echo $OUTPUT->box_start();     // The forms section at the top
 
 ?>
 
@@ -101,7 +101,7 @@ print_box_start();     // The forms section at the top
 
 <form method="post" action="index.php">
   <div>
-    <input type="text" name="keyword" id="keyword_el" value="<?php p($keyword) ?>" /> 
+    <input type="text" name="keyword" id="keyword_el" value="<?php p($keyword) ?>" />
     <input type="hidden" name="sesskey" value="<?php echo sesskey();?>" />
     <input type="submit" value="<?php echo get_string('spamsearch', 'report_spamcleaner')?>" />
   </div>
@@ -120,7 +120,7 @@ print_box_start();     // The forms section at the top
 </div>
 
 <?php
-print_box_end(); 
+echo $OUTPUT->box_end();
 
 echo '<div id="result" class="mdl-align">';
 
@@ -142,12 +142,12 @@ echo '</div>';
 /////////////////////////////////////////////////////////////////////////////////
 
 
-///  Functions 
+///  Functions
 
 
 function search_spammers($keywords) {
 
-    global $CFG, $USER, $DB
+    global $CFG, $USER, $DB, $OUTPUT;
 
     if (!is_array($keywords)) {
         $keywords = array($keywords);    // Make it into an array
@@ -170,7 +170,7 @@ function search_spammers($keywords) {
     $spamusers_blog = $DB->get_recordset_sql($sql2);
 
     $keywordlist = implode(', ', $keywords);
-    print_box(get_string('spamresult', 'report_spamcleaner').s($keywordlist)).' ...';
+    echo $OUTPUT->box(get_string('spamresult', 'report_spamcleaner').s($keywordlist)).' ...';
 
     print_user_list(array($spamusers_desc, $spamusers_blog), $keywords);
 
index a087fde9a81ab1bceb295c2cb1308d43b52ec1e8..df16d3673c132e0b581fa1713ee4f91697eb5291 100644 (file)
@@ -82,9 +82,9 @@ class ExHtmlReporter extends HtmlReporter {
      * Private method. Used by printPass/Fail/Error.
      */
     function _paintPassFail($passorfail, $message, $rawmessage=false) {
-        global $FULLME, $CFG;
+        global $FULLME, $CFG, $OUTPUT;
 
-        print_box_start($passorfail . ' generalbox ');
+        echo $OUTPUT->box_start($passorfail . ' generalbox ');
         $url = $this->_htmlEntities($this->_stripParameterFromUrl($FULLME, 'path'));
         echo '<b class="', $passorfail, '">', $this->get_string($passorfail), '</b>: ';
         $breadcrumb = $this->getTestList();
@@ -100,7 +100,7 @@ class ExHtmlReporter extends HtmlReporter {
         echo "<a href=\"{$url}path=$folder$file\" title=\"$this->strrunonlyfile\">$file</a>";
         echo $this->strseparator, implode($this->strseparator, $breadcrumb);
         echo '<br />', ($rawmessage ? $message : $this->_htmlEntities($message)), "\n\n";
-        print_box_end();
+        echo $OUTPUT->box_end();
         flush();
     }
 
@@ -226,4 +226,4 @@ class ExHtmlReporter extends HtmlReporter {
         return get_string($identifier, 'simpletest', $a);
     }
 }
-?>
\ No newline at end of file
+?>
index 6debd8642b965b197a905157f84d652152d18213..07ba75bef8417ae816472202108a949d485b6609 100755 (executable)
 
     /// Print a warning if we are assigning system roles.
         if ($context->contextlevel == CONTEXT_SYSTEM) {
-            print_box(get_string('globalroleswarning', 'role'));
+            echo $OUTPUT->box(get_string('globalroleswarning', 'role'));
         }
 
     /// Print the form.
 
         // Print a warning if we are assigning system roles.
         if ($context->contextlevel == CONTEXT_SYSTEM) {
-            print_box(get_string('globalroleswarning', 'role'));
+            echo $OUTPUT->box(get_string('globalroleswarning', 'role'));
         }
 
         // Print instruction
index 6407e80ccebefdc65617f6354298991cd5dddc02..b0e3eacc9d9c7f9b6c5e7f3d3a0cca69feaac552 100755 (executable)
 /// If a user has been chosen, show all the permissions for this user.
     $reportuser = $userselector->get_selected_user();
     if (!is_null($reportuser)) {
-        print_box_start('generalbox boxaligncenter boxwidthwide');
+        echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
         echo $OUTPUT->heading(get_string('permissionsforuser', 'role', fullname($reportuser)), 3);
 
         $table = new explain_capability_table($context, $reportuser, $contextname);
         $table->display();
-        print_box_end();
+        echo $OUTPUT->box_end();
 
         $selectheading = get_string('selectanotheruser', 'role');
     } else {
     }
 
 /// Show UI for choosing a user to report on.
-    print_box_start('generalbox boxwidthnormal boxaligncenter', 'chooseuser');
+    echo $OUTPUT->box_start('generalbox boxwidthnormal boxaligncenter', 'chooseuser');
     echo '<form method="get" action="' . $CFG->wwwroot . '/' . $CFG->admin . '/roles/check.php" >';
 
 /// Hidden fields.
 
 /// User selector.
     echo $OUTPUT->heading('<label for="reportuser">' . $selectheading . '</label>', 3);
-    $userselector->display(); 
+    $userselector->display();
 
 /// Submit button and the end of the form.
     echo '<p id="chooseusersubmit"><input type="submit" value="' . get_string('showthisuserspermissions', 'role') . '" /></p>';
     echo '</form>';
-    print_box_end();
+    echo $OUTPUT->box_end();
 
 /// Appropriate back link.
     if (!$isfrontpage && ($url = get_context_url($context))) {
index 784399dbba03e40711f09f3148a860f871a0f5ae..28019bc5bd4585e56c8488fbddb6a880cbd5c23a 100755 (executable)
     }
 
     // Start the form.
-    print_box_start('generalbox');
+    echo $OUTPUT->box_start('generalbox');
     if ($action == 'view') {
         echo '<div class="mform">';
     } else {
 </div></form>
         <?php
     }
-    print_box_end();
+    echo $OUTPUT->box_end();
 
 /// Print a link back to the all roles list.
     echo '<div class="backlink">';
index b762d7ec1aea89f95a00f42eacc291e912f72223..b9f8412c80318504db0a0fb46b4f9f70cdd9aa05 100755 (executable)
     /// Show UI for overriding roles.
 
         if (!empty($capabilities)) {
-            print_box(get_string('nocapabilitiesincontext', 'role'), 'generalbox boxaligncenter');
+            echo $OUTPUT->box(get_string('nocapabilitiesincontext', 'role'), 'generalbox boxaligncenter');
 
         } else {
             // Print the capabilities overrideable in this context
-            print_box_start('generalbox boxwidthwide boxaligncenter');
+            echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter');
 
             if ($showadvanced) {
                 $showadvancedlabel = get_string('hideadvanced', 'form');
 </div></form>
 
             <?php
-            print_box_end();
+            echo $OUTPUT->box_end();
 
         }
 
index 204e0bf60632aa75b142557f381ac7ec975eb8bf..292ed65cde16611fa804c85ca0b56e87e5211c0c 100644 (file)
@@ -145,7 +145,7 @@ $showroles = 1;
 $currenttab = 'usersroles';
 include_once($CFG->dirroot.'/user/tabs.php');
 echo $OUTPUT->heading($title, 3);
-print_box_start('generalbox boxaligncenter boxwidthnormal');
+echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal');
 
 // Display them.
 if (!$roleassignments) {
@@ -155,7 +155,7 @@ if (!$roleassignments) {
 }
 
 /// End of page.
-print_box_end();
+echo $OUTPUT->box_end();
 echo $OUTPUT->footer();
 
 function print_report_tree($contextid, $contexts, $systemcontext, $fullname) {
index 740848b957643f743741c9358ba6e4500d32735f..132fee8e50dd94921137995a547913b83ca1b4a5 100644 (file)
@@ -50,7 +50,7 @@ if (!empty($adminroot->errors)) {
 admin_externalpage_print_header($focus);
 
 if (!empty($SITE->fullname) and !empty($SITE->shortname)) {
-    print_box(get_string('upgradesettingsintro','admin'), 'generalbox');
+    echo $OUTPUT->box(get_string('upgradesettingsintro','admin'), 'generalbox');
 }
 
 echo '<form action="upgradesettings.php" method="post" id="adminsettings">';
index 046f8ce2fae0ad39f5e6af1c2a7cf1aed034bc67..a89ee243f007d646ff03ded8f7b44680cb7d1509 100755 (executable)
@@ -705,7 +705,7 @@ if ($formdata = $mform->is_cancelled()) {
     $cir->close();
     $cir->cleanup(true);
 
-    print_box_start('boxwidthnarrow boxaligncenter generalbox', 'uploadresults');
+    echo $OUTPUT->box_start('boxwidthnarrow boxaligncenter generalbox', 'uploadresults');
     echo '<p>';
     if ($optype != UU_UPDATE) {
         echo get_string('userscreated', 'admin').': '.$usersnew.'<br />';
@@ -726,7 +726,7 @@ if ($formdata = $mform->is_cancelled()) {
     }
     echo get_string('usersweakpassword', 'admin').': '.$forcechangepassword.'<br />';
     echo get_string('errors', 'admin').': '.$userserrors.'</p>';
-    print_box_end();
+    echo $OUTPUT->box_end();
 
     if ($bulk) {
         print_continue($bulknurl);
index c9b4d36364c749694245d6c0b15ca81f772d7571..1032b2cf50c9a2005812967daa27b3d5e5801f46 100755 (executable)
@@ -48,7 +48,7 @@ if ($format) {
         case 'csv' : user_download_csv($fields);
         case 'ods' : user_download_ods($fields);
         case 'xls' : user_download_xls($fields);
-        
+
     }
     die;
 }
@@ -56,13 +56,13 @@ if ($format) {
 admin_externalpage_print_header();
 echo $OUTPUT->heading(get_string('download', 'admin'));
 
-print_box_start();
+echo $OUTPUT->box_start();
 echo '<ul>';
 echo '<li><a href="user_bulk_download.php?format=csv">'.get_string('downloadtext').'</a></li>';
 echo '<li><a href="user_bulk_download.php?format=ods">'.get_string('downloadods').'</a></li>';
 echo '<li><a href="user_bulk_download.php?format=xls">'.get_string('downloadexcel').'</a></li>';
 echo '</ul>';
-print_box_end();
+echo $OUTPUT->box_end();
 
 print_continue($return);
 
@@ -146,7 +146,7 @@ function user_download_xls($fields) {
 
 function user_download_csv($fields) {
     global $CFG, $SESSION, $DB;
-    
+
     require_once($CFG->dirroot.'/user/profile/lib.php');
 
     $filename = clean_filename(get_string('users').'.csv');
@@ -160,7 +160,7 @@ function user_download_csv($fields) {
     $delimiter = get_string('listsep');
     $encdelim  = '&#'.ord($delimiter);
 
-    $row = array(); 
+    $row = array();
     foreach ($fields as $fieldname) {
         $row[] = str_replace($delimiter, $encdelim, $fieldname);
     }
index 67a06730dd644d8b3b82516627f98fdbdd8ce9ad..c53ce478afe24a0a50fdd622d9cd5134da164e06 100755 (executable)
@@ -61,7 +61,7 @@ if ($msgform->is_cancelled()) {
     $optionsyes['msg']     = $msg;
     admin_externalpage_print_header();
     echo $OUTPUT->heading(get_string('confirmation', 'admin'));
-    print_box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview');
+    echo $OUTPUT->box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview');
     notice_yesno(get_string('confirmmessage', 'bulkusers', $usernames), 'user_bulk_message.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get');
     echo $OUTPUT->footer();
     die;
index 4011d8f682b9edaecb20c3d2ef8bb7fa13c48154..6009984fed31e76b113eebb58f896e4522b55682 100644 (file)
--- a/index.php
+++ b/index.php
         }
 
         if (!empty($section->sequence) or !empty($section->summary) or $editing) {
-            print_box_start('generalbox sitetopic');
+            echo $OUTPUT->box_start('generalbox sitetopic');
 
             /// If currently moving a file then show the current clipboard
             if (ismoving($SITE->id)) {
             if ($editing) {
                 print_section_add_menus($SITE, $section->section, $modnames);
             }
-            print_box_end();
+            echo $OUTPUT->box_end();
         }
     }
 
             case FRONTPAGECATEGORYNAMES:
 
                 echo $OUTPUT->heading(get_string('categories'), 2, 'headingblock header');
-                print_box_start('generalbox categorybox');
+                echo $OUTPUT->box_start('generalbox categorybox');
                 print_whole_category_list(NULL, NULL, NULL, -1, false);
-                print_box_end();
+                echo $OUTPUT->box_end();
                 print_course_search('', false, 'short');
             break;
 
             case FRONTPAGECATEGORYCOMBO:
 
                 echo $OUTPUT->heading(get_string('categories'), 2, 'headingblock header');
-                print_box_start('generalbox categorybox');
+                echo $OUTPUT->box_start('generalbox categorybox');
                 print_whole_category_list(NULL, NULL, NULL, -1, true);
-                print_box_end();
+                echo $OUTPUT->box_end();
                 print_course_search('', false, 'short');
             break;