Skip to main content

Function: courseAbilities()

function courseAbilities(
context,
siteUrl,
courseId,
sectionId
): Promise<{
canEdit: boolean;
canGrade: boolean;
}>;

Defined in: areas/site/users.ts:85

What the person can do in a course, asked of read-only services that need the capability: the activity types they can add (none without moodle/course:manageactivities) and the grader report's users (nopermissions without gradereport/grader:view). Nothing is changed.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
courseIdnumber
sectionIdnumber

Returns​

Promise<{ canEdit: boolean; canGrade: boolean; }>