See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 403]
Contains the class used for the displaying the participants table.
Copyright: | 2017 Mark Nelson <markn@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 486 lines (17 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
participants:: (14 methods):
out()
col_select()
col_fullname()
col_roles()
col_groups()
col_country()
col_lastaccess()
col_status()
other_cols()
query_db()
show_hide_link()
set_filterset()
guess_base_url()
get_context()
Class: participants - X-Ref
Class for the displaying the participants table.out($pagesize, $useinitialsbar, $downloadhelpbutton = '') X-Ref |
Render the participants table. param: int $pagesize Size of page for paginated displayed table. param: bool $useinitialsbar Whether to use the initials bar which will only be used if there is a fullname column defined. param: string $downloadhelpbutton |
col_select($data) X-Ref |
Generate the select column. param: \stdClass $data return: string |
col_fullname($data) X-Ref |
Generate the fullname column. param: \stdClass $data return: string |
col_roles($data) X-Ref |
User roles column. param: \stdClass $data return: string |
col_groups($data) X-Ref |
Generate the groups column. param: \stdClass $data return: string |
col_country($data) X-Ref |
Generate the country column. param: \stdClass $data return: string |
col_lastaccess($data) X-Ref |
Generate the last access column. param: \stdClass $data return: string |
col_status($data) X-Ref |
Generate the status column. param: \stdClass $data The data object. return: string |
other_cols($colname, $data) X-Ref |
This function is used for the extra user fields. These are being dynamically added to the table so there are no functions 'col_<userfieldname>' as the list has the potential to increase in the future and we don't want to have to remember to add a new method to this class. We also don't want to pollute this class with unnecessary methods. param: string $colname The column name param: \stdClass $data return: string |
query_db($pagesize, $useinitialsbar = true) X-Ref |
Query the database for results to display in the table. param: int $pagesize size of page for paginated displayed table. param: bool $useinitialsbar do you want to use the initials bar. |
show_hide_link($column, $index) X-Ref |
Override the table show_hide_link to not show for select column. param: string $column the column name, index into various names. param: int $index numerical index of the column. return: string HTML fragment. |
set_filterset(filterset $filterset) X-Ref |
Set filters and build table structure. param: filterset $filterset The filterset object to get the filters from. |
guess_base_url() X-Ref |
Guess the base url for the participants table. |
get_context() X-Ref |
Get the context of the current table. Note: This function should not be called until after the filterset has been provided. return: context |