Search moodle.org's
Developer Documentation

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.
  • Differences Between: [Versions 310 and 34] [Versions 34 and 310]

    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: 8 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

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

    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

    return: null
    param: array $cohortids

    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

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

    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.

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

    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

    return: null
    param: array $cohorts

    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

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

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

    return: external_description