Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

File Size: 270 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

cohorts:: (6 methods):
  initialise()
  can_view()
  add_columns()
  add_filters()
  add_actions()
  get_row_class()


Class: cohorts  - X-Ref

Cohorts system report class implementation

initialise()   X-Ref
Initialise report, we need to set the main table, load our entities and set columns/filters


can_view()   X-Ref
Validates access to view this report

return: bool

add_columns(cohort $cohortentity)   X-Ref
Adds the columns we want to display in the report

They are provided by the entities we previously added in the {@see initialise} method, referencing each by their
unique identifier. If custom columns are needed just for this report, they can be defined here.

param: cohort $cohortentity

add_filters()   X-Ref
Adds the filters we want to display in the report

They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
unique identifier

add_actions()   X-Ref
Add the system report actions. An extra column will be appended to each row, containing all actions added here

Note the use of ":id" placeholder which will be substituted according to actual values in the row

get_row_class(stdClass $row)   X-Ref
CSS class for the row

param: stdClass $row
return: string