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


Public Member Functions | |
| __construct ($name, $options) | |
| find_users ($search) | |
Protected Member Functions | |
| this_con_group_name ($search, $numusers) | |
| parent_con_group_name ($search, $contextid) | |
User selector subclass for the list of users who already have the role in question on the assign roles page.
| __construct | ( | $ | name, |
| $ | options | ||
| ) |
| string | $name | control name |
| array | $options | should have two elements with keys groupid and courseid. |
Reimplemented from role_assign_user_selector_base.
| find_users | ( | $ | search | ) |
Search the database for users matching the $search string, and any other conditions that apply. The SQL for testing whether a user matches the search string should be obtained by calling the search_sql method.
This method is used both when getting the list of choices to display to the user, and also when validating a list of users that was selected.
When preparing a list of users to choose from ($this->is_validating() return false) you should probably have an maximum number of users you will return, and if more users than this match your search, you should instead return a message generated by the too_many_results() method. However, you should not do this when validating.
If you are writing a new user_selector subclass, I strongly recommend you look at some of the subclasses later in this file and in admin/roles/lib.php. They should help you see exactly what you have to do.
| string | $search | the search string. |
Reimplemented from user_selector_base.
Definition at line 1140 of file lib.php.

| parent_con_group_name | ( | $ | search, |
| $ | contextid | ||
| ) | [protected] |
| this_con_group_name | ( | $ | search, |
| $ | numusers | ||
| ) | [protected] |