MDL-19787 Converted print_box* to $OUTPUT->box*

This commit is contained in:
nicolasconnault
2009-08-10 04:53:22 +00:00
parent 229e1258e1
commit 20486a5a21
26 changed files with 110 additions and 110 deletions
+3 -3
View 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();
+1 -1
View File
@@ -138,7 +138,7 @@
$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;
+14 -14
View 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();
+13 -13
View File
@@ -137,14 +137,14 @@
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;
}
@@ -195,7 +195,7 @@
// 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) {
@@ -204,7 +204,7 @@
$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
@@ -232,7 +232,7 @@
$enstring = isset($string) ? $string : array();
unset($string);
ksort($enstring);
//$lcstring = local customizations
$lcstring = array();
if (file_exists($lcfilepath)) {
@@ -332,7 +332,7 @@
}
if ($m <> '') {
print_box($m, 'filenames');
echo $OUTPUT->box($m, 'filenames');
}
echo $o;
@@ -466,7 +466,7 @@
}
$saveinto = $locallangdir;
}
if (lang_save_file($saveinto, $currentfile, $newstrings, $uselocal, $packstring)) {
notify(get_string("changessaved")." ($saveinto/$currentfile)", "notifysuccess");
} else {
@@ -475,7 +475,7 @@
unset($packstring);
}
print_box_start('generalbox editstrings');
echo $OUTPUT->box_start('generalbox editstrings');
$menufiles = array();
$menufiles_coregrp = 1;
foreach ($stringfiles as $stringfile) {
@@ -499,8 +499,8 @@
$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) {
@@ -525,7 +525,7 @@
error_reporting($CFG->debug);
$o = ''; // stores the HTML output to be echo-ed
unset($string);
include($enfilepath);
$enstring = isset($string) ? $string : array();
@@ -729,7 +729,7 @@
}
}
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
@@ -766,7 +766,7 @@
$select->set_label($selectionlabel);
echo $OUTPUT->select($select);
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
print_box_end();
echo $OUTPUT->box_end();
if (!empty($currentfile)) {
+5 -5
View File
@@ -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;
}
@@ -275,9 +275,9 @@
}
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) {
@@ -310,7 +310,7 @@
}
}
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">';
@@ -389,7 +389,7 @@
//close available langs table
echo '</td></tr></table>';
print_box_end();
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
+5 -5
View 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
+13 -13
View File
@@ -99,14 +99,14 @@
}
}
}
$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 {
@@ -134,7 +134,7 @@
ON
a.userid = u.id AND a.courseid=:courseid
WHERE
$select
$select
u.deleted = 0 AND
u.confirmed = 1 AND
u.mnethostid = :mnetid
@@ -172,7 +172,7 @@
// 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,
@@ -185,7 +185,7 @@
{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
@@ -213,7 +213,7 @@
{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
@@ -249,9 +249,9 @@
$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");
@@ -259,9 +259,9 @@
$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"));
+1 -1
View 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 />';
+2 -2
View File
@@ -17,12 +17,12 @@
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 -->'
+3 -3
View 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>
+1 -1
View File
@@ -148,7 +148,7 @@
$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;
+3 -3
View 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++;
}
+4 -4
View 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
+1 -1
View 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);
+8 -8
View File
@@ -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);
+4 -4
View 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);
}
}
?>
?>
+2 -2
View File
@@ -309,7 +309,7 @@
/// 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.
@@ -389,7 +389,7 @@
// 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
+5 -5
View File
@@ -150,12 +150,12 @@
/// 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 {
@@ -163,7 +163,7 @@
}
/// 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.
@@ -177,12 +177,12 @@
/// 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))) {
+2 -2
View File
@@ -149,7 +149,7 @@
}
// Start the form.
print_box_start('generalbox');
echo $OUTPUT->box_start('generalbox');
if ($action == 'view') {
echo '<div class="mform">';
} else {
@@ -178,7 +178,7 @@
</div></form>
<?php
}
print_box_end();
echo $OUTPUT->box_end();
/// Print a link back to the all roles list.
echo '<div class="backlink">';
+3 -3
View File
@@ -186,11 +186,11 @@
/// 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');
@@ -225,7 +225,7 @@
</div></form>
<?php
print_box_end();
echo $OUTPUT->box_end();
}
+2 -2
View 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) {
+1 -1
View 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">';
+2 -2
View File
@@ -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);
+5 -5
View File
@@ -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);
}
+1 -1
View File
@@ -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;
+6 -6
View File
@@ -103,7 +103,7 @@
}
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)) {
@@ -133,7 +133,7 @@
if ($editing) {
print_section_add_menus($SITE, $section->section, $modnames);
}
print_box_end();
echo $OUTPUT->box_end();
}
}
@@ -188,18 +188,18 @@
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;