class users extends table_sql implements dynamic

Class for the displaying the participants table.

Properties

$rawdata
$allroleassignments
moodle_url $baseurl
protected int $courseid
protected string[] $extrafields
protected stdClass $course
protected context $context
protected array $users
protected filterset $filterset

Methods

void
out(int $pagesize, bool $useinitialsbar, string $downloadhelpbutton = '')

Render the participants table.

string
col_select(stdClass $data)

Generate the select column.

string
col_fullname(stdClass $data)

Generate the fullname column.

string
other_cols(string $colname, stdClass $data)

This function is used for the extra user fields.

void
query_db(int $pagesize, bool $useinitialsbar = true)

Query the database for results to display in the table.

void
set_filterset(filterset $filterset)

Set filters and build table structure.

void
guess_base_url()

Guess the base url for the participants table.

context
get_context()

Get the context of the current table.

set_users($users)

No description

bool
has_capability()

No description

string
show_hide_link(string $column, int $index)

Override the table show_hide_link to not show for select column.

Details

at line 90
void out(int $pagesize, bool $useinitialsbar, string $downloadhelpbutton = '')

Render the participants table.

Parameters

int $pagesize

size of page for paginated displayed table

bool $useinitialsbar

whether to use the initials bar which will only be used if there is a fullname column defined

string $downloadhelpbutton

Return Value

void

at line 135
string col_select(stdClass $data)

Generate the select column.

Parameters

stdClass $data

Return Value

string

at line 163
string col_fullname(stdClass $data)

Generate the fullname column.

Parameters

stdClass $data

Return Value

string

at line 182
string other_cols(string $colname, stdClass $data)

This function is used for the extra user fields.

These are being dynamically added to the table so there are no functions 'col_' 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.

Parameters

string $colname

The column name

stdClass $data

Return Value

string

at line 198
void query_db(int $pagesize, bool $useinitialsbar = true)

Query the database for results to display in the table.

Parameters

int $pagesize

size of page for paginated displayed table

bool $useinitialsbar

do you want to use the initials bar

Return Value

void

at line 244
void set_filterset(filterset $filterset)

Set filters and build table structure.

Parameters

filterset $filterset

the filterset object to get the filters from

Return Value

void

at line 257
void guess_base_url()

Guess the base url for the participants table.

Return Value

void

at line 269
context get_context()

Get the context of the current table.

Note: This function should not be called until after the filterset has been provided.

Return Value

context

at line 274
set_users($users)

No description

Parameters

$users

at line 279
bool has_capability()

No description

Return Value

bool

Override the table show_hide_link to not show for select column.

Parameters

string $column

the column name, index into various names

int $index

numerical index of the column

Return Value

string

HTML fragment