Function: unenrolUser()
function unenrolUser(
context,
siteUrl,
courseId,
userId
): Promise<{
changed: string;
kept: string[];
removed: string[];
}>;
Defined in: areas/participants/enrolments.ts:171
Unenrols a user from a course: removes every enrolment of theirs the person may remove (its
unenrol link on the participants page), with their roles and group memberships in the course, as
that link does. changed and removed say which ones (by enrolment method's name), kept those
the person may not remove (a cohort sync, another teacher's method). Throws EnrolmentError when
the user isn't enrolled.
Parameters
| Parameter | Type |
|---|---|
context | BrowserContext |
siteUrl | string |
courseId | number |
userId | number |
Returns
Promise<{
changed: string;
kept: string[];
removed: string[];
}>