|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($name, $visiblename, $description, $defaultsetting, $capability, $includeadmins=true) | |
| load_choices () | |
| get_defaultsetting () | |
| get_setting () | |
| write_setting ($data) | |
Protected Attributes | |
| $capability | |
| $includeadmins | |
An admin setting for selecting one or more users who have a capability in the system context
An admin setting for selecting one or more users, who have a particular capability in the system context. Warning, make sure the list will never be too long. There is no paging or searching of this list.
To correctly get a list of users from this config setting, you need to call the get_users_from_config($CFG->mysetting, $capability); function in moodlelib.php.
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Definition at line 2830 of file adminlib.php.
| __construct | ( | $ | name, |
| $ | visiblename, | ||
| $ | description, | ||
| $ | defaultsetting, | ||
| $ | capability, | ||
| $ | includeadmins = true |
||
| ) |
Constructor.
| string | $name | unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting' for ones in config_plugins. |
| string | $visiblename | localised name |
| string | $description | localised long description |
| array | $defaultsetting | array of usernames |
| string | $capability | string capability name. |
| bool | $includeadmins | include administrators |
Definition at line 2846 of file adminlib.php.
Returns the default setting for class
Reimplemented from admin_setting.
Definition at line 2886 of file adminlib.php.

| get_setting | ( | ) |
Returns the current setting
Reimplemented from admin_setting_configmultiselect.
Definition at line 2903 of file adminlib.php.
| load_choices | ( | ) |
Load all of the uses who have the capability into choice array
Reimplemented from admin_setting_configselect.
Definition at line 2857 of file adminlib.php.


| write_setting | ( | $ | data | ) |
Save the chosen setting provided as $data
| array | $data |
Reimplemented from admin_setting_configmultiselect.
Definition at line 2921 of file adminlib.php.
$capability [protected] |
Definition at line 2832 of file adminlib.php.
$includeadmins [protected] |
Definition at line 2834 of file adminlib.php.