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.

(no description)

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

Defines 1 class

cohortmember:: (8 methods):
  get_config_form()
  get_sql()
  get_name()
  get_description()
  user_can_add()
  is_available()
  user_can_edit()
  get_cohorts()


Class: cohortmember  - X-Ref

The backend class for Cohort member 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 report audience

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

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

is_available()   X-Ref
Returns if this audience type is available for the user

Check if there are available cohorts in the system for this user to use.

return: bool

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

return: bool

get_cohorts()   X-Ref
Cohorts selector.

return: array