| Moodle APIs 4.3
    Moodle 4.3.6 (Build: 20240812) | 
| Topics | |
| event | |
| privacy | |
| Directories | |
| directory | classes | 
|  | |
| Namespaces | |
| namespace | enrol_cohort\task | 
| Syncing enrolments task. | |
| Classes | |
| class | enrol_cohort\task\enrol_cohort_sync | 
| Syncing enrolments task.  More... | |
| class | enrol_cohort_handler | 
| Event handler for cohort enrolment plugin.  More... | |
| class | enrol_cohort_plugin | 
| Cohort enrolment plugin implementation.  More... | |
| Functions | |
| enrol_cohort_allow_group_member_remove ($itemid, $groupid, $userid) | |
| Prevent removal of enrol roles. | |
| enrol_cohort_create_new_group ($courseid, $cohortid) | |
| Create a new group with the cohorts name. | |
| enrol_cohort_sync (progress_trace $trace, $courseid=NULL) | |
| Sync all cohort course links. | |
| xmldb_enrol_cohort_uninstall () | |
| Variables | |
| $capabilities | |
| $plugin = 2023100400 | |
| $tasks | |
| const | COHORT_CREATE_GROUP -1 | 
| COHORT_CREATEGROUP constant for automatically creating a group for a cohort. | |
| const | COHORT_NOGROUP 0 | 
| COHORT_NOGROUP constant for using no group for a cohort. | |
| $plugin | component = 'enrol_cohort' | 
| $plugin | version = 2023100900 | 
| enrol_cohort_allow_group_member_remove | ( | $itemid, | |
| $groupid, | |||
| $userid ) | 
Prevent removal of enrol roles.
| int | $itemid | |
| int | $groupid | |
| int | $userid | 
| bool | 
| enrol_cohort_create_new_group | ( | $courseid, | |
| $cohortid ) | 
Create a new group with the cohorts name.
| int | $courseid | |
| int | $cohortid | 
| int\$groupid | Group ID for this cohort. | 
| enrol_cohort_sync | ( | progress_trace | $trace, | 
| $courseid = NULL ) | 
Sync all cohort course links.
| progress_trace | $trace | |
| int | $courseid | one course, empty mean all | 
| int | 0 means ok, 1 means error, 2 means plugin disabled | 
| $capabilities | 
| $tasks |