From: skodak Date: Sun, 30 Nov 2008 14:09:24 +0000 (+0000) Subject: MDL-17372 moving the categories out of the if cap block - cap report needs to add... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d86f4473e596aada76ab737847541f9cdf07469c;p=moodle.git MDL-17372 moving the categories out of the if cap block - cap report needs to add page there --- diff --git a/admin/settings/users.php b/admin/settings/users.php index f703294c9d..3f9c7b81cc 100644 --- a/admin/settings/users.php +++ b/admin/settings/users.php @@ -2,6 +2,10 @@ // This file defines settingpages and externalpages under the "users" category +$ADMIN->add('users', new admin_category('authsettings', get_string('authentication','admin'))); +$ADMIN->add('users', new admin_category('accounts', get_string('accounts', 'admin'))); +$ADMIN->add('users', new admin_category('roles', get_string('permissions', 'role'))); + if ($hassiteconfig or has_capability('moodle/site:uploadusers', $systemcontext) or has_capability('moodle/user:create', $systemcontext) @@ -11,8 +15,6 @@ if ($hassiteconfig or has_capability('moodle/role:assign', $systemcontext)) { // speedup for non-admins, add all caps used on this page - $ADMIN->add('users', new admin_category('authsettings', get_string('authentication','admin'))); - $temp = new admin_settingpage('manageauths', get_string('authsettings', 'admin')); $temp->add(new admin_setting_manageauths()); $temp->add(new admin_setting_heading('manageauthscommonheading', get_string('commonsettings', 'admin'), '')); @@ -70,7 +72,6 @@ if ($hassiteconfig $securewwwroot = str_replace('http:','https:',$CFG->wwwroot); } // 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/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')); @@ -80,7 +81,6 @@ if ($hassiteconfig // stuff under the "roles" subcategory - $ADMIN->add('users', new admin_category('roles', get_string('permissions', 'role'))); // "userpolicies" settingpage $temp = new admin_settingpage('userpolicies', get_string('userpolicies', 'admin'));