Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

Base class for checks

Copyright: 2020 Brendan Heywood <brendan@catalyst-au.net>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 118 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

check:: (6 methods):
  get_component()
  set_component()
  get_id()
  get_ref()
  get_name()
  get_action_link()


Class: check  - X-Ref

Base class for checks

get_component()   X-Ref
Get the frankenstyle component name

return: string

set_component(string $component)   X-Ref
Get the frankenstyle component name

param: string $component name

get_id()   X-Ref
Get the check's id

This defaults to the base name of the class which is ok in the most
cases but if you have a check which can have multiple instances then
you should override this to be unique.

return: string must be unique within a component

get_ref()   X-Ref
Get the check reference

return: string must be globally unique

get_name()   X-Ref
Get the short check name

return: string

get_action_link()   X-Ref
A link to a place to action this

return: action_link|null