Moodle PHP Documentation 5.0
Moodle 5.0.1+ (Build: 20250711) (61af040cd5f)
tool_cohortroles\output\cohort_role_assignments_table Class Reference

Cohort role assignments table. More...

Inheritance diagram for tool_cohortroles\output\cohort_role_assignments_table:

Public Member Functions

 __construct ($uniqueid, $url)
 Sets up the table.
 
 print_nothing_to_display ()
 Override the default implementation to set a notification.
 
 query_db ($pagesize, $useinitialsbar=true)
 Query the DB.
 

Protected Member Functions

 col_actions ($data)
 Actions column.
 
 col_cohortname ($data)
 Cohort name column.
 
 col_rolename ($data)
 Role name column.
 
 define_table_columns ()
 Setup the headers for the table.
 
 define_table_configs ()
 Define table configs.
 
 get_sql_and_params ($count=false)
 Builds the SQL query.
 

Protected Attributes

context_system context_system $context = null
 
array array $rolenames = []
 

Detailed Description

Cohort role assignments table.

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

Constructor & Destructor Documentation

◆ __construct()

tool_cohortroles\output\cohort_role_assignments_table::__construct ( $uniqueid,
$url )

Sets up the table.

Parameters
string$uniqueidUnique id of table.
moodle_url$urlThe base URL.

Member Function Documentation

◆ col_actions()

tool_cohortroles\output\cohort_role_assignments_table::col_actions ( $data)
protected

Actions column.

Parameters
array$dataRow data.
Return values
string

◆ col_cohortname()

tool_cohortroles\output\cohort_role_assignments_table::col_cohortname ( $data)
protected

Cohort name column.

Parameters
array$dataRow data.
Return values
string

◆ col_rolename()

tool_cohortroles\output\cohort_role_assignments_table::col_rolename ( $data)
protected

Role name column.

Parameters
array$dataRow data.
Return values
string

◆ get_sql_and_params()

tool_cohortroles\output\cohort_role_assignments_table::get_sql_and_params ( $count = false)
protected

Builds the SQL query.

Parameters
bool$countWhen true, return the count SQL.
Return values
arraycontaining sql to use and an array of params.

◆ query_db()

tool_cohortroles\output\cohort_role_assignments_table::query_db ( $pagesize,
$useinitialsbar = true )

Query the DB.

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

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