Skip to main content

Function: assessWorkshopSubmission()

function assessWorkshopSubmission(
context,
siteUrl,
activityId,
submissionId,
__namedParameters
): Promise<{
assessmentId: number;
changed: string;
grade?: number;
maxGrade?: number;
}>;

Defined in: areas/workshops/workshops.ts:422

Assesses a submission as the person, through the workshop's assessment form (its grading strategy's: accumulative, comments, number of errors or rubric), as "Assess" on the submission's page and the form do: a teacher who hasn't assessed it yet gets an assessment of their own, and one already made is changed. criteria go in the form's order; feedback is the overall feedback for the author (HTML), where the workshop has it on; fields sets any other field of the form by name (weight…). Returns a sentence of what changed, the assessment's id, and the grade it gives the submission out of the workshop's grade. Throws WorkshopError outside the assessment phase, when a criterion's grade isn't one it takes, or when the workshop has no overall feedback; FormError when Moodle refuses the form (a criterion left without a grade).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
submissionIdnumber
__namedParameters{ criteria?: WorkshopCriterion[]; feedback?: string; fields?: Record<string, FieldValue>; }
__namedParameters.criteria?WorkshopCriterion[]
__namedParameters.feedback?string
__namedParameters.fields?Record<string, FieldValue>

Returns​

Promise<{ assessmentId: number; changed: string; grade?: number; maxGrade?: number; }>