See Release Notes
Long Term Support Release
Used while evaluating conditions in bulk. This object caches get_users_by_capability results in case they are needed by multiple conditions.
Copyright: | 2014 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 77 lines (3 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
capability_checker:: (2 methods):
__construct()
get_users_by_capability()
Class: capability_checker - X-Ref
Used while evaluating conditions in bulk.__construct(\context $context) X-Ref |
Constructs for given context. param: \context $context Context |
get_users_by_capability($capability) X-Ref |
Gets users on course who have the specified capability. Returns an array of user objects which only contain the 'id' field. If the same capability has already been checked (e.g. by another condition) then a cached result will be used. More fields are not necessary because this code is only used to filter users from an existing list. param: string $capability Required capability return: array Associative array of user id => objects containing only id |