moving user bulk operations to admin/user/

This commit is contained in:
toyomoyo 2007-08-15 05:30:49 +00:00
parent 47f12ec61f
commit 1bef49587d
7 changed files with 13 additions and 13 deletions

View File

@ -14,7 +14,7 @@ if(empty($CFG->loginhttps)) {
// stuff under the "accounts" subcategory
$ADMIN->add('users', new admin_category('accounts', get_string('accounts', 'admin')));
$ADMIN->add('accounts', new admin_externalpage('editusers', get_string('userlist','admin'), "$CFG->wwwroot/$CFG->admin/user.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('userbulk', get_string('userbulk','admin'), "$CFG->wwwroot/$CFG->admin/user_bulk.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('userbulk', get_string('userbulk','admin'), "$CFG->wwwroot/$CFG->admin/user/user_bulk.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('addnewuser', get_string('addnewuser'), "$securewwwroot/user/editadvanced.php?id=-1", 'moodle/user:create'));
$ADMIN->add('accounts', new admin_externalpage('uploadusers', get_string('uploadusers'), "$CFG->wwwroot/$CFG->admin/uploaduser.php", 'moodle/site:uploadusers'));
$ADMIN->add('accounts', new admin_externalpage('profilefields', get_string('profilefields','admin'), "$CFG->wwwroot/user/profile/index.php", 'moodle/site:config'));

10
admin/user_bulk.php → admin/user/user_bulk.php Normal file → Executable file
View File

@ -1,5 +1,5 @@
<?php //$Id$
require_once('../config.php');
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/dmllib.php');
@ -10,7 +10,7 @@
require_once($CFG->dirroot.'/user/filters/profilefield.php');
require_once($CFG->dirroot.'/user/filters/yesno.php');
require_once($CFG->dirroot.'/admin/user_bulk_form.php');
require_once($CFG->dirroot.'/admin/user/user_bulk_form.php');
define("MAX_USERS_PER_PAGE", 5000);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
@ -28,13 +28,13 @@
// check if an action should be performed and do so
switch ($user_bulk_form->getAction()) {
case 1:
include($CFG->dirroot . '/admin/user_bulk_confirm.php');
include($CFG->dirroot . '/admin/user/user_bulk_confirm.php');
return;
case 2:
include($CFG->dirroot . '/admin/user_bulk_message.php');
include($CFG->dirroot . '/admin/user/user_bulk_message.php');
return;
case 3:
include($CFG->dirroot . '/admin/user_bulk_delete.php');
include($CFG->dirroot . '/admin/user/user_bulk_delete.php');
return;
}

View File

@ -3,7 +3,7 @@
* script for bulk user delete operations
*/
require_once('../config.php');
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
@ -44,6 +44,6 @@ if (empty($confirm)) {
notify(get_string('usernotconfirmed', '', fullname($user, true)));
}
}
redirect($CFG->wwwroot . '/admin/user_bulk.php', get_string('changessaved'));
redirect($CFG->wwwroot . '/admin/user/user_bulk.php', get_string('changessaved'));
}
admin_externalpage_print_footer();

View File

@ -3,7 +3,7 @@
* script for bulk user delete operations
*/
require_once('../config.php');
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
@ -54,6 +54,6 @@ if (empty($confirm)) {
notify(get_string('deletednot', '', fullname($user, true)));
}
}
redirect($CFG->wwwroot . '/admin/user_bulk.php', get_string('changessaved'));
redirect($CFG->wwwroot . '/admin/user/user_bulk.php', get_string('changessaved'));
}
admin_externalpage_print_footer();

View File

@ -1,5 +1,5 @@
<?php //$Id$
require_once('../config.php');
require_once('../../config.php');
require_once($CFG->dirroot.'/message/lib.php');
require_once($CFG->libdir.'/adminlib.php');
@ -18,7 +18,7 @@ $extradata['userlist'] =& $users;
$noteform =& new user_message_form('user_bulk_message.php', $extradata);
// if no users or action canceled, return to users page
if (empty($users) || $noteform->is_cancelled()) {
redirect($CFG->wwwroot . '/admin/user_bulk.php');
redirect($CFG->wwwroot . '/admin/user/user_bulk.php');
}
$formdata =& $noteform->get_data();
@ -32,7 +32,7 @@ if ($noteform->is_submitted() && !empty($formdata->send)) {
message_post_message($USER, $user, addslashes($formdata->messagebody), $formdata->format, 'direct');
}
}
redirect($CFG->wwwroot . '/admin/user_bulk.php');
redirect($CFG->wwwroot . '/admin/user/user_bulk.php');
}
}