users extends table_sql implements dynamic
Class for the displaying the participants table.
Tags
Table of Contents
Interfaces
- dynamic
Properties
- $allroleassignments : mixed
- $baseurl : moodle_url
- $rawdata : mixed
- $context : context
- $course : stdClass
- $courseid : int
- $extrafields : array<string|int, string>
- $filterset : filterset
- $users : array<string|int, mixed>
Methods
- col_fullname() : string
- Generate the fullname column.
- col_select() : string
- Generate the select column.
- get_context() : context
- Get the context of the current table.
- guess_base_url() : void
- Guess the base url for the participants table.
- has_capability() : bool
- other_cols() : string
- This function is used for the extra user fields.
- out() : void
- Render the participants table.
- query_db() : void
- Query the database for results to display in the table.
- set_filterset() : void
- Set filters and build table structure.
- set_users() : mixed
- show_hide_link() : string
- Override the table show_hide_link to not show for select column.
Properties
$allroleassignments
public
mixed
$allroleassignments
$baseurl
public
moodle_url
$baseurl
The base URL for the report.
$rawdata
public
mixed
$rawdata
$context
protected
context
$context
the course context
$course
protected
stdClass
$course
the course details
$courseid
protected
int
$courseid
The course id
$extrafields
protected
array<string|int, string>
$extrafields
extra fields to display
$filterset
protected
filterset
$filterset
filterset describing which participants to include
$users
protected
array<string|int, mixed>
$users
User ids
Methods
col_fullname()
Generate the fullname column.
public
col_fullname(stdClass $data) : string
Parameters
- $data : stdClass
Return values
stringcol_select()
Generate the select column.
public
col_select(stdClass $data) : string
Parameters
- $data : stdClass
Return values
stringget_context()
Get the context of the current table.
public
get_context() : context
Note: This function should not be called until after the filterset has been provided.
Return values
contextguess_base_url()
Guess the base url for the participants table.
public
guess_base_url() : void
has_capability()
public
has_capability() : bool
Return values
boolother_cols()
This function is used for the extra user fields.
public
other_cols(string $colname, stdClass $data) : string
These are being dynamically added to the table so there are no functions 'col_
Parameters
- $colname : string
-
The column name
- $data : stdClass
Return values
stringout()
Render the participants table.
public
out(int $pagesize, bool $useinitialsbar[, string $downloadhelpbutton = '' ]) : void
Parameters
- $pagesize : int
-
size of page for paginated displayed table
- $useinitialsbar : bool
-
whether to use the initials bar which will only be used if there is a fullname column defined
- $downloadhelpbutton : string = ''
query_db()
Query the database for results to display in the table.
public
query_db(int $pagesize[, bool $useinitialsbar = true ]) : void
Parameters
- $pagesize : int
-
size of page for paginated displayed table
- $useinitialsbar : bool = true
-
do you want to use the initials bar
set_filterset()
Set filters and build table structure.
public
set_filterset(filterset $filterset) : void
Parameters
- $filterset : filterset
-
the filterset object to get the filters from
set_users()
public
set_users(mixed $users) : mixed
Parameters
- $users : mixed
show_hide_link()
Override the table show_hide_link to not show for select column.
protected
show_hide_link(string $column, int $index) : string
Parameters
- $column : string
-
the column name, index into various names
- $index : int
-
numerical index of the column
Return values
string —HTML fragment