From 1bef49587dfffcfe738b2e449479f77f3f260e65 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Wed, 15 Aug 2007 05:30:49 +0000 Subject: [PATCH] moving user bulk operations to admin/user/ --- admin/settings/users.php | 2 +- admin/{ => user}/user_bulk.php | 10 +++++----- admin/{ => user}/user_bulk_confirm.php | 4 ++-- admin/{ => user}/user_bulk_delete.php | 4 ++-- admin/{ => user}/user_bulk_form.php | 0 admin/{ => user}/user_bulk_message.php | 6 +++--- admin/{ => user}/user_message_form.php | 0 7 files changed, 13 insertions(+), 13 deletions(-) rename admin/{ => user}/user_bulk.php (90%) mode change 100644 => 100755 rename admin/{ => user}/user_bulk_confirm.php (93%) mode change 100644 => 100755 rename admin/{ => user}/user_bulk_delete.php (94%) mode change 100644 => 100755 rename admin/{ => user}/user_bulk_form.php (100%) rename admin/{ => user}/user_bulk_message.php (90%) mode change 100644 => 100755 rename admin/{ => user}/user_message_form.php (100%) diff --git a/admin/settings/users.php b/admin/settings/users.php index f26105160bc..1ae5e0951de 100644 --- a/admin/settings/users.php +++ b/admin/settings/users.php @@ -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')); diff --git a/admin/user_bulk.php b/admin/user/user_bulk.php old mode 100644 new mode 100755 similarity index 90% rename from admin/user_bulk.php rename to admin/user/user_bulk.php index 014e80939e6..7f1f4680abe --- a/admin/user_bulk.php +++ b/admin/user/user_bulk.php @@ -1,5 +1,5 @@ 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; } diff --git a/admin/user_bulk_confirm.php b/admin/user/user_bulk_confirm.php old mode 100644 new mode 100755 similarity index 93% rename from admin/user_bulk_confirm.php rename to admin/user/user_bulk_confirm.php index 108fcbf3fec..4fcc36dc3eb --- a/admin/user_bulk_confirm.php +++ b/admin/user/user_bulk_confirm.php @@ -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(); diff --git a/admin/user_bulk_delete.php b/admin/user/user_bulk_delete.php old mode 100644 new mode 100755 similarity index 94% rename from admin/user_bulk_delete.php rename to admin/user/user_bulk_delete.php index 47cdb3d0472..753e7c77683 --- a/admin/user_bulk_delete.php +++ b/admin/user/user_bulk_delete.php @@ -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(); diff --git a/admin/user_bulk_form.php b/admin/user/user_bulk_form.php similarity index 100% rename from admin/user_bulk_form.php rename to admin/user/user_bulk_form.php diff --git a/admin/user_bulk_message.php b/admin/user/user_bulk_message.php old mode 100644 new mode 100755 similarity index 90% rename from admin/user_bulk_message.php rename to admin/user/user_bulk_message.php index b989868ea0a..72ca3fd94ec --- a/admin/user_bulk_message.php +++ b/admin/user/user_bulk_message.php @@ -1,5 +1,5 @@ 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'); } } diff --git a/admin/user_message_form.php b/admin/user/user_message_form.php similarity index 100% rename from admin/user_message_form.php rename to admin/user/user_message_form.php