Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
core_user\table\participants Class Reference

Class for the displaying the participants table. More...

Inheritance diagram for core_user\table\participants:

Public Member Functions

 col_country ($data)
 Generate the country column.
 
 col_fullname ($data)
 Generate the fullname column.
 
 col_groups ($data)
 Generate the groups column.
 
 col_lastaccess ($data)
 Generate the last access column.
 
 col_roles ($data)
 User roles column.
 
 col_select ($data)
 Generate the select column.
 
 col_status ($data)
 Generate the status column.
 
 get_context ()
 Get the context of the current table.
 
 guess_base_url ()
 Guess the base url for the participants table.
 
 has_capability ()
 Check if the user has the capability to access this table.
 
 other_cols ($colname, $data)
 This function is used for the extra user fields.
 
 out ($pagesize, $useinitialsbar, $downloadhelpbutton='')
 Render the participants table.
 
 query_db ($pagesize, $useinitialsbar=true)
 Query the database for results to display in the table.
 
 set_filterset (filterset $filterset)
 Set filters and build table structure.
 

Public Attributes

moodle_url $baseurl
 $baseurl The base URL for the report.
 

Protected Member Functions

 show_hide_link ($column, $index)
 Override the table show_hide_link to not show for select column.
 

Protected Attributes

stdClass[] $allroleassignments
 List of roles indexed by roleid.
 
stdClass[] $allroles
 List of roles indexed by roleid.
 
stdClass[] $assignableroles
 Assignable roles in this course.
 
context $context
 $context The course context.
 
string[] $countries
 The list of countries.
 
stdClass $course
 $course The course details.
 
int $courseid
 $courseid The course id
 
string[] $extrafields
 Extra fields to display.
 
filterset $filterset
 Filterset describing which participants to include.
 
stdClass[] $groups
 The list of groups with membership info for the course.
 
stdClass[] $profileroles
 Profile roles in this course.
 

Detailed Description

Class for the displaying the participants table.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ col_country()

core_user\table\participants::col_country ( $data)

Generate the country column.

Parameters
stdClass$data
Return values
string

◆ col_fullname()

core_user\table\participants::col_fullname ( $data)

Generate the fullname column.

Parameters
stdClass$data
Return values
string

◆ col_groups()

core_user\table\participants::col_groups ( $data)

Generate the groups column.

Parameters
stdClass$data
Return values
string

◆ col_lastaccess()

core_user\table\participants::col_lastaccess ( $data)

Generate the last access column.

Parameters
stdClass$data
Return values
string

◆ col_roles()

core_user\table\participants::col_roles ( $data)

User roles column.

Parameters
stdClass$data
Return values
string

◆ col_select()

core_user\table\participants::col_select ( $data)

Generate the select column.

Parameters
stdClass$data
Return values
string

◆ col_status()

core_user\table\participants::col_status ( $data)

Generate the status column.

Parameters
stdClass$dataThe data object.
Return values
string

◆ get_context()

core_user\table\participants::get_context ( )

Get the context of the current table.

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

Return values
context

◆ has_capability()

core_user\table\participants::has_capability ( )

Check if the user has the capability to access this table.

Return values
boolReturn true if capability check passed.

◆ other_cols()

core_user\table\participants::other_cols ( $colname,
$data )

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.

Parameters
string$colnameThe column name
stdClass$data
Return values
string

◆ out()

core_user\table\participants::out ( $pagesize,
$useinitialsbar,
$downloadhelpbutton = '' )

Render the participants table.

Parameters
int$pagesizeSize of page for paginated displayed table.
bool$useinitialsbarWhether to use the initials bar which will only be used if there is a fullname column defined.
string$downloadhelpbutton

◆ query_db()

core_user\table\participants::query_db ( $pagesize,
$useinitialsbar = true )

Query the database for results to display in the table.

Parameters
int$pagesizesize of page for paginated displayed table.
bool$useinitialsbardo you want to use the initials bar.

◆ set_filterset()

core_user\table\participants::set_filterset ( filterset $filterset)

Set filters and build table structure.

Parameters
filterset$filtersetThe filterset object to get the filters from.

◆ show_hide_link()

core_user\table\participants::show_hide_link ( $column,
$index )
protected

Override the table show_hide_link to not show for select column.

Parameters
string$columnthe column name, index into various names.
int$indexnumerical index of the column.
Return values
stringHTML fragment.

The documentation for this class was generated from the following file: