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.

Class: permission_test  - X-Ref

Unit tests for the report permission class

test_require_can_view_reports_list()   X-Ref
Test whether user can view reports list


test_require_can_view_reports_list_disabled()   X-Ref
Test whether user can view reports list when custom reports are disabled


test_require_can_view_report()   X-Ref
Test whether user can view specific report


test_require_can_view_report_with_audience()   X-Ref
Test whether user can view specific report when it belongs to an audience


test_require_can_view_report_disabled()   X-Ref
Test whether user can view report when custom reports are disabled


test_require_can_edit_report_system_report()   X-Ref
Test that user cannot edit system reports


test_require_can_edit_report_none()   X-Ref
Test that user cannot edit any reports without capabilities


test_require_can_edit_report_own()   X-Ref
Test that user can edit their own reports


test_require_can_edit_report_all()   X-Ref
Test that user can edit any reports


test_require_can_edit_report_disabled()   X-Ref
Test whether user can edit report when custom reports are disabled


test_require_can_create_report()   X-Ref
Test that user can create a new report


test_require_can_create_report_disabled()   X-Ref
Test whether user can create report when custom reports are disabled