admin MDL-19787 Upgrade deprecated function calls

This commit is contained in:
samhemelryk
2009-09-30 06:32:25 +00:00
parent ceebb2ec5f
commit 9e492db050
7 changed files with 40 additions and 15 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
@@ -296,7 +296,10 @@
}
/// Print heading.
print_heading_with_help($title, 'assignroles');
$helpicon = new moodle_help_icon();
$helpicon->text = $title;
$helpicon->page = 'assignroles';
echo $OUTPUT->heading_with_help($helpicon);
if ($roleid) {
/// Show UI for assigning a particular role to users.
+5 -2
View File
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
@@ -138,7 +138,10 @@
}
/// Print heading.
print_heading_with_help($title, 'checkpermissions');
$helpicon = new moodle_help_icon();
$helpicon->text = $title;
$helpicon->page = 'checkpermissions';
echo $OUTPUT->heading_with_help($helpicon);
/// If a user has been chosen, show all the permissions for this user.
$reportuser = $userselector->get_selected_user();
+5 -2
View File
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
@@ -120,7 +120,10 @@
} else if ($action == 'edit') {
$title = get_string('editingrolex', 'role', $rolenames[$roleid]->localname);
}
print_heading_with_help($title, 'roles');
$helpicon = new moodle_help_icon();
$helpicon->text = $title;
$helpicon->page = 'roles';
echo $OUTPUT->heading_with_help($helpicon);
/// Work out some button labels.
if ($action == 'add' || $action == 'duplicate') {
+5 -2
View File
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
@@ -175,7 +175,10 @@
include_once('tabs.php');
}
print_heading_with_help($title, 'overrides');
$helpicon = new moodle_help_icon();
$helpicon->text = $title;
$helpicon->page = 'overrides';
echo $OUTPUT->heading_with_help($helpicon);
if ($roleid) {
/// Show UI for overriding roles.
+6 -2
View File
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
@@ -59,7 +59,11 @@ $overwritepicture = optional_param('overwritepicture', 0, PARAM_BOOL);
/// Print the header
admin_externalpage_print_header();
print_heading_with_help($struploadpictures, 'uploadpictures');
$helpicon = new moodle_help_icon();
$helpicon->text = $struploadpictures;
$helpicon->page = 'uploadpictures';
echo $OUTPUT->heading_with_help($helpicon);
$mform = new admin_uploadpicture_form(null, $userfields);
if ($formdata = $mform->get_data()) {
+12 -3
View File
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
/// Bulk user registration script from a comma separated file
/// Returns list of users with their user ids
@@ -106,7 +106,12 @@ if (empty($iid)) {
} else {
admin_externalpage_print_header();
print_heading_with_help(get_string('uploadusers'), 'uploadusers3');
$helpicon = new moodle_help_icon();
$helpicon->text = get_string('uploadusers');
$helpicon->page = 'uploadusers3';
echo $OUTPUT->heading_with_help($helpicon);
$mform->display();
echo $OUTPUT->footer();
die;
@@ -741,7 +746,11 @@ if ($formdata = $mform->is_cancelled()) {
admin_externalpage_print_header();
/// Print the form
print_heading_with_help(get_string('uploaduserspreview', 'admin'), 'uploadusers2');
$helpicon = new moodle_help_icon();
$helpicon->text = get_string('uploaduserspreview', 'admin');
$helpicon->page = 'uploadusers2';
echo $OUTPUT->heading_with_help($helpicon);
$ci = 0;
$ri = 0;
+2 -2
View File
@@ -9,7 +9,7 @@ if (!defined('MAX_BULK_USERS')) {
function add_selection_all($ufiltering) {
global $SESSION, $DB;
$guest = get_guest();
$guest = get_complete_user_data('username', 'guest');
list($sqlwhere, $params) = $ufiltering->get_sql_filter("id<>:exguest AND deleted <> 1", array('exguest'=>$guest->id));
if ($rs = $DB->get_recordset_select('user', $sqlwhere, $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname')) {
@@ -26,7 +26,7 @@ function get_selection_data($ufiltering) {
global $SESSION, $DB;
// get the SQL filter
$guest = get_guest();
$guest = get_complete_user_data('username', 'guest');
list($sqlwhere, $params) = $ufiltering->get_sql_filter("id<>:exguest AND deleted <> 1", array('exguest'=>$guest->id));
$total = $DB->count_records_select('user', "id<>:exguest AND deleted <> 1", array('exguest'=>$guest->id));