Skip to main content

Function: finishQuizAttempt()

function finishQuizAttempt(
context,
siteUrl,
attemptId
): Promise<{
attemptId: number;
changed: string;
finished: true;
review: | {
questions: Question[];
summary: Detail[];
}
| undefined;
}>;

Defined in: areas/quizzes/attempts.ts:398

Submits an attempt for grading, and gives its review when the quiz shows it.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
attemptIdnumber

Returns​

Promise<{ attemptId: number; changed: string; finished: true; review: | { questions: Question[]; summary: Detail[]; } | undefined; }>