Go to the source code of this file.
Function Documentation
Add new cohort.
- Parameters:
-
- Returns:
- int
Definition at line 35 of file lib.php.
Remove cohort member
- Parameters:
-
- Returns:
- void
Definition at line 133 of file lib.php.
Somehow deal with cohorts when deleting course category, we can not just delete them because they might be used in enrol plugins or referenced in external systems.
- Parameters:
-
- Returns:
- void
Definition at line 108 of file lib.php.
Delete cohort.
- Parameters:
-
- Returns:
- void
Definition at line 88 of file lib.php.
Get all the cohorts.
moodle_database $DB
- Parameters:
-
| int | $contextid | |
| int | $page | number of the current page |
| int | $perpage | items per page |
| string | $search | search string |
- Returns:
- array Array(totalcohorts => int, cohorts => array)
Definition at line 203 of file lib.php.
Returns list of visible cohorts in course.
- Parameters:
-
| object | $course | |
| bool | $enrolled | true means include only cohorts with enrolled users |
- Returns:
- array
Definition at line 164 of file lib.php.
Add cohort member
- Parameters:
-
- Returns:
- void
Definition at line 150 of file lib.php.
Update existing cohort.
- Parameters:
-
- Returns:
- void
Definition at line 72 of file lib.php.