Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

External cohort API

Copyright: MediaTouch 2000 srl
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 824 lines (33 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_cohort_external  - X-Ref

create_cohorts_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

create_cohorts($cohorts)   X-Ref
Create one or more cohorts

param: array $cohorts An array of cohorts to create.
return: array An array of arrays

create_cohorts_returns()   X-Ref
Returns description of method result value

return: external_description

delete_cohorts_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

delete_cohorts($cohortids)   X-Ref
Delete cohorts

param: array $cohortids
return: null

delete_cohorts_returns()   X-Ref
Returns description of method result value

return: null

get_cohorts_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_cohorts($cohortids = array()   X-Ref
Get cohorts definition specified by ids

param: array $cohortids array of cohort ids
return: array of cohort objects (id, courseid, name)

get_cohorts_returns()   X-Ref
Returns description of method result value

return: external_description

search_cohorts_parameters()   X-Ref
Returns the description of external function parameters.

return: external_function_parameters

search_cohorts($query, $context, $includes = 'parents', $limitfrom = 0, $limitnum = 25)   X-Ref
Search cohorts.

param: string $query
param: array $context
param: string $includes
param: int $limitfrom
param: int $limitnum
return: array

search_cohorts_returns()   X-Ref
Returns description of external function result value.

return: external_description

update_cohorts_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

update_cohorts($cohorts)   X-Ref
Update cohorts

param: array $cohorts
return: null

update_cohorts_returns()   X-Ref
Returns description of method result value

return: null

add_cohort_members_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

add_cohort_members($members)   X-Ref
Add cohort members

param: array $members of arrays with keys userid, cohortid

add_cohort_members_returns()   X-Ref
Returns description of method result value

return: null

delete_cohort_members_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

delete_cohort_members($members)   X-Ref
Delete cohort members

param: array $members of arrays with keys userid, cohortid

delete_cohort_members_returns()   X-Ref
Returns description of method result value

return: null

get_cohort_members_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_cohort_members($cohortids)   X-Ref
Return all members for a cohort

param: array $cohortids array of cohort ids
return: array with cohort id keys containing arrays of user ids

get_cohort_members_returns()   X-Ref
Returns description of method result value

return: external_description