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 400 and 401]

(no description)

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

Defines 1 class

systemrole:: (6 methods):
  get_config_form()
  get_sql()
  get_name()
  get_description()
  user_can_add()
  user_can_edit()


Class: systemrole  - X-Ref

The backend class for Has system role audience type

get_config_form(MoodleQuickForm $mform)   X-Ref
Adds audience's elements to the given mform

param: MoodleQuickForm $mform The form to add elements to

get_sql(string $usertablealias)   X-Ref
Helps to build SQL to retrieve users that matches the current audience

param: string $usertablealias
return: array array of three elements [$join, $where, $params]

get_name()   X-Ref
Return user friendly name of this audience type

return: string

get_description()   X-Ref
Return the description for the audience.

return: string

user_can_add()   X-Ref
If the current user is able to add this audience.

return: bool

user_can_edit()   X-Ref
If the current user is able to edit this audience.

return: bool