Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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

(no description)

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

Defines 1 class

reports_list:: (9 methods):
  get_report_entity_name()
  initialise()
  can_view()
  get_row_class()
  add_columns()
  add_filters()
  add_actions()
  report_source_valid()
  filter_by_allowed_reports_sql()


Class: reports_list  - X-Ref

Reports list

get_report_entity_name()   X-Ref
The name of our internal report entity

return: string

initialise()   X-Ref
Initialise the report


can_view()   X-Ref
Ensure we can view the report

return: bool

get_row_class(stdClass $row)   X-Ref
Dim the table row for invalid datasource

return: string
param: stdClass $row

add_columns()   X-Ref
Add columns to report


add_filters()   X-Ref
Add filters to report


add_actions()   X-Ref
Add actions to report


report_source_valid(string $source)   X-Ref
Helper to determine whether given report source is valid (it both exists, and is available)

return: bool
param: string $source

filter_by_allowed_reports_sql()   X-Ref
Filters the list of reports to return only the ones the user has access to

- A user with 'editall' capability will have access to all reports.
- A user with 'edit' capability will have access to:
- Those reports this user has created.
- Those reports this user is in audience of.
- A user with 'view' capability will have access to:
- Those reports this user is in audience of.

return: array