mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Added a new setting called $CFG->defaultuserroleid which defines
the role that ALL users get by default when they log in.
This commit is contained in:
parent
ea8158c118
commit
8f8ed475f7
12 changed files with 113 additions and 51 deletions
|
@ -5,6 +5,36 @@
|
|||
|
||||
$ADMIN->add('users', new admin_externalpage('userauthentication', get_string('authentication','admin'), "$CFG->wwwroot/$CFG->admin/auth.php"));
|
||||
|
||||
// "userpolicies" settingpage
|
||||
$temp = new admin_settingpage('userpolicies', get_string('userpolicies', 'admin'));
|
||||
$temp->add(new admin_setting_configcheckbox('autologinguests', get_string('autologinguests', 'admin'), get_string('configautologinguests', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configmultiselect('hiddenuserfields', get_string('hiddenuserfields', 'admin'), get_string('confighiddenuserfields', 'admin'), array(), array('none' => get_string('none'),
|
||||
'description' => get_string('description'),
|
||||
'city' => get_string('city'),
|
||||
'country' => get_string('country'),
|
||||
'webpage' => get_string('webpage'),
|
||||
'icqnumber' => get_string('icqnumber'),
|
||||
'skypeid' => get_string('skypeid'),
|
||||
'yahooid' => get_string('yahooid'),
|
||||
'aimid' => get_string('aimid'),
|
||||
'msnid' => get_string('msnid'),
|
||||
'lastaccess' => get_string('lastaccess'))));
|
||||
$temp->add(new admin_setting_configcheckbox('allusersaresitestudents', get_string('allusersaresitestudents', 'admin'), get_string('configallusersaresitestudents','admin'), 1));
|
||||
$temp->add(new admin_setting_special_adminseesall());
|
||||
|
||||
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
|
||||
if (!$guestrole = get_guest_role()) {
|
||||
$guestrole->id = 999;
|
||||
}
|
||||
$temp->add(new admin_setting_configselect('notloggedinroleid', get_string('notloggedinroleid', 'admin'),
|
||||
get_string('confignotloggedinroleid', 'admin'), $guestrole->id, get_assignable_roles($context)));
|
||||
$temp->add(new admin_setting_configselect('defaultuserroleid', get_string('defaultuserroleid', 'admin'),
|
||||
get_string('configdefaultuserroleid', 'admin'), $guestrole->id, get_assignable_roles($context)));
|
||||
|
||||
$ADMIN->add('users', $temp);
|
||||
|
||||
|
||||
|
||||
// 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"));
|
||||
|
@ -18,4 +48,6 @@ $ADMIN->add('roles', new admin_externalpage('defineroles', get_string('definerol
|
|||
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . SITEID));
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue