Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

Cohort role assignments table

Copyright: 2015 Damyon Wiese
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 237 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

cohort_role_assignments_table:: (9 methods):
  __construct()
  col_rolename()
  col_cohortname()
  col_actions()
  define_table_columns()
  define_table_configs()
  get_sql_and_params()
  print_nothing_to_display()
  query_db()


Class: cohort_role_assignments_table  - X-Ref

Cohort role assignments table.

__construct($uniqueid, $url)   X-Ref
Sets up the table.

param: string $uniqueid Unique id of table.
param: moodle_url $url The base URL.

col_rolename($data)   X-Ref
Role name column.

param: array $data Row data.
return: string

col_cohortname($data)   X-Ref
Cohort name column.

param: array $data Row data.
return: string

col_actions($data)   X-Ref
Actions column.

param: array $data Row data.
return: string

define_table_columns()   X-Ref
Setup the headers for the table.


define_table_configs()   X-Ref
Define table configs.


get_sql_and_params($count = false)   X-Ref
Builds the SQL query.

param: bool $count When true, return the count SQL.
return: array containing sql to use and an array of params.

print_nothing_to_display()   X-Ref
Override the default implementation to set a decent heading level.


query_db($pagesize, $useinitialsbar = true)   X-Ref
Query the DB.

param: int $pagesize size of page for paginated displayed table.
param: bool $useinitialsbar do you want to use the initials bar.