Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]
Provides user rendering functionality such as printing private files tree and displaying a search utility
Copyright: | 2010 Dongsheng Cai <dongsheng@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 266 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
core_user_renderer:: (7 methods):
user_search()
partial_user_search()
user_list()
unified_filter()
participants_filter()
format_filter_option()
handle_missing_applied_filters()
Class: core_user_renderer - X-Ref
Provides user rendering functionality such as printing private files tree and displaying a search utilityuser_search($url, $firstinitial, $lastinitial, $usercount, $totalcount, $heading = null) X-Ref |
Prints user search utility that can search user by first initial of firstname and/or first initial of lastname Prints a header with a title and the number of users found within that subset param: string $url the url to return to, complete with any parameters needed for the return param: string $firstinitial the first initial of the firstname param: string $lastinitial the first initial of the lastname param: int $usercount the amount of users meeting the search criteria param: int $totalcount the amount of users of the set/subset being searched param: string $heading heading of the subset being searched, default is All Participants return: string html output |
partial_user_search(String $url, String $firstinitial, String $lastinitial, Bool $minirender = false) X-Ref |
Construct a partial user search that'll require form handling implemented by the caller. This allows the developer to have an initials bar setup that does not automatically redirect. param: string $url the url to return to, complete with any parameters needed for the return param: string $firstinitial the first initial of the firstname param: string $lastinitial the first initial of the lastname param: bool $minirender Return a trimmed down view of the initials bar. return: string html output |
user_list($userlist, $exclusivemode) X-Ref |
Displays the list of tagged users param: array $userlist param: bool $exclusivemode if set to true it means that no other entities tagged with this tag return: string |
unified_filter() X-Ref |
Renders the unified filter element for the course participants page. |
participants_filter(context $context, string $tableregionid) X-Ref |
Render the data required for the participants filter on the course participants page. param: context $context The context of the course being displayed param: string $tableregionid Container of the table to be updated by this filter, is used to retrieve the table return: string |
format_filter_option($filtertype, $criteria, $value, $label) X-Ref |
Returns a formatted filter option. param: int $filtertype The filter type (e.g. status, role, group, enrolment, last access). param: string $criteria The string label of the filter type. param: int $value The value for the filter option. param: string $label The string representation of the filter option's value. return: array The formatted option with the ['filtertype:value' => 'criteria: label'] format. |
handle_missing_applied_filters($filtersapplied, $filteroptions) X-Ref |
Handles cases when after reloading the applied filters are missing in the filter options. param: array $filtersapplied The applied filters. param: array $filteroptions The filter options. return: array The formatted options with the ['filtertype:value' => 'criteria: label'] format. |