Skip to main content

Function: gradeForumUser()

function gradeForumUser(
context,
siteUrl,
activityId,
userId,
__namedParameters
): Promise<{
changed: string;
grade: Omit<ForumGrade, "fullName">;
}>;

Defined in: areas/forums/grading.ts:131

Gives a person their whole-forum grade, as the forum's grader does: points (out of the forum's maximum), or a scale item by name or value; null takes the grade away. Moodle's forum grader has no feedback text. notify sends the person Moodle's notification, as the grader's checkbox does. Returns a sentence of what changed and the grade afterwards. Throws GradingError when the forum isn't graded as a whole, the grade is out of range or not on the scale, or Moodle refuses it.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
userIdnumber
__namedParameters{ grade: string | number | null; notify?: boolean; }
__namedParameters.gradestring | number | null
__namedParameters.notify?boolean

Returns​

Promise<{ changed: string; grade: Omit<ForumGrade, "fullName">; }>