Grade Module Quiz
Grade a module-quiz attempt against its server-persisted served set.
Auth: portal API key + X-Learner-Email header.
Request body: where attempt_id is the id returned
by the serve endpoint above and answers is [] with
question_id = the served question’s string id. The client cannot shrink
or alter the grading denominator by omitting or relabeling questions: the
server reloads the exact question set it persisted as served_question_ids
at serve time and grades against THAT, not against whatever answers
contains. Any served question left unanswered scores 0.
Errors: 404 “Not enrolled in this course” if the header learner has no enrollment; 404 “Attempt not found” if attempt_id does not belong to this learner’s enrollment for this module (co-learner isolation); 409 attempt_already_graded if the attempt was already finished (grade is one-shot per attempt — call serve again to get a new attempt); 503 grading_unavailable (retryable) if the AI grader is transiently down.
Returns 200 . Also recomputes and persists enrollment completion_pct, and lazily issues the certificate if this grade completes eligibility (see get_certificate).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Body for the learner grade endpoints. The served set is SERVER-persisted (quiz_attempts.served_question_ids), so the client only echoes the attempt_id
- its answers -- it cannot shrink the denominator by omitting questions.
Response
Successful Response