when function find_users was supposed to be used for user validation but no userids were passed to it, it retrieved all users in the system.
This caused memory overflow on systems with too many users (like moodle.org).
Now we make sure that find_users is not called for validation if there is nobody to validate.
Also improved query inside find_users to make it work faster
This change:
- Renames the existing setting 'extrauserselectorfields' to 'showuseridentity'
in preparation for using it in more places. (Upgrade change, new version.)
- Adds a new capability moodle/site:viewuseridentity, now required in order
to see the extra fields; if you don't have the capability, you don't see them
- Slightly improves the display of extra fields in user selector list; it used
to be like 'sam marshall, 01234567, email@address' and is now
'sam marshall [01234567, email@address]' ie the fields are in square
brackets
- Turns feature on for the group selector - the feature was enabled for other
user selectors but not for the group selector. Tim did the disable code, he
thinks this may be to do with more people having access to group selector -
probably not a problem now it is controlled by capability.
* YUI3 used instead of YUI2, converted all YUI2 components to YUI3 equivalents.
* Renamed user/selector/script.js to module.js
* Converted uses of the the user selector to YUI3 + the new events
There is a new implementation of require_js in lib/deprecatedlib.php,
based on $PAGE->requires.
There were a few other recently introduced functions in lib/weblib.php,
namely print_js_call, print_delayed_js_call, print_js_config and
standard_js_config. These have been removed, since they were never in
a stable branch, and all the places that used them have been changed
to use the newer $PAGE->requires->... methods.
get_require_js_code is also gone, and the evil places that were calling
it, even though it is an internal function, have been fixed.
Also, I made some minor improvements to the code I committed yesterday
for MDL-16695.
All that remains is to update all the places in core code that are
still using require_js.
(This commit also fixes the problem where the admin tree would not
start with the right categories expanded.)
I have collected code that used to be in lib/adminlib.php, lib/accesslib.php and user/selector/lib.php into a new admin/roles/lib.php file.
And I added standard GPL and Moodle comments to all the files in admin/roles.
This implements the page showing the table. It is not yet integrated into the tab bar. To try this, go to an Assign roles page (one with URL .../admin/roles/assign.php?contextid=...) and change the 'assign' to 'explain'.
Also, improved the comment that explains to subclassers what they have to do, and fixed get_selected_users, so if the number of selected users is greater than the max number of users to show, it still works.