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">';
}
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();
$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;
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");
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)) {
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)) {
} 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&confirmrelease=1');
}
$navigation = build_navigation(array(array('name'=>$strplugincheck, 'link'=>null, 'type'=>'misc')));
print_header($strplugincheck, $strplugincheck, $navigation, '', '', false, ' ', ' ');
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&confirmrelease=1');
print_continue('index.php?confirmupgrade=1&confirmrelease=1&confirmplugincheck=1');
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
if (time() - $lastcron > 3600 * 24) {
$strinstallation = get_string('installation', 'install');
$helpbutton = helpbutton('install', $strinstallation, 'moodle', true, false, '', true);
- print_box(get_string('cronwarning', 'admin').' '.$helpbutton, 'generalbox adminwarning');
+ echo $OUTPUT->box(get_string('cronwarning', 'admin').' '.$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');
}
'Copyright © 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();
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)) {
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();
// process actions
if (!empty($action) and confirm_sesskey()) {
-
+
// boot if insufficient permission
if (!has_capability('moodle/user:delete', $sitecontext)) {
print_error('nomodifyacl','mnet');
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') {
}
// 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') {
}
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");
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
}
}
}
-
+
$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);
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"));
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 />';
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 -->'
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 -->
</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'); ?>
<tr>
<td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
</tr>
-
+
</table>
</form>
</div>
$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;
}
// 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>';
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) {
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++;
}
<?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
}
// 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>';
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) {
// 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
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);
$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)) {
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
?>
<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>
</div>
<?php
-print_box_end();
+echo $OUTPUT->box_end();
echo '<div id="result" class="mdl-align">';
/////////////////////////////////////////////////////////////////////////////////
-/// 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
$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);
* 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();
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();
}
return get_string($identifier, 'simpletest', $a);
}
}
-?>
\ No newline at end of file
+?>
/// 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
/// 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))) {
}
// 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">';
/// 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();
}
$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) {
}
/// End of page.
-print_box_end();
+echo $OUTPUT->box_end();
echo $OUTPUT->footer();
function print_report_tree($contextid, $contexts, $systemcontext, $fullname) {
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">';
$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 />';
}
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);
case 'csv' : user_download_csv($fields);
case 'ods' : user_download_ods($fields);
case 'xls' : user_download_xls($fields);
-
+
}
die;
}
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);
function user_download_csv($fields) {
global $CFG, $SESSION, $DB;
-
+
require_once($CFG->dirroot.'/user/profile/lib.php');
$filename = clean_filename(get_string('users').'.csv');
$delimiter = get_string('listsep');
$encdelim = '&#'.ord($delimiter);
- $row = array();
+ $row = array();
foreach ($fields as $fieldname) {
$row[] = str_replace($delimiter, $encdelim, $fieldname);
}
$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;
}
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;