Education

Api Learning Submit Quiz

Server-graded module quiz with attempt chain and rate limiting.

post/api/learning/submit-quiz

Request

  • Base URL: https://www.oxfordledge.com (the document declares no server; this is the origin it was published from)
  • URL: https://www.oxfordledge.com/api/learning/submit-quiz
  • Auth: none declared

Response

Successful Response

correctboolean required

True iff the submitted option matched the answer key.

attemptsinteger required

Running count of attempts on this module (1 or 2 — the chain terminates at 2 attempts regardless of correctness).

mastery_scoreinteger nullable

Mastery score for the attempt: 100 (correct, 1st attempt, no hint), 85 (correct, 1st attempt, hint used), 70 (correct, 2nd attempt), 40 (incorrect, chain terminated). None when the chain hasn't terminated yet.

passedboolean required

True iff correct is True. Distinct from mastery_passed in PG which only flips on score >= 70.

can_retryboolean required

True iff the user may submit a second attempt for this module (i.e., NOT correct AND attempts < 2).

correct_optioninteger nullable

0-indexed correct-answer index. ONLY disclosed after chain_terminated AND for authed users. Anonymous callers always get None — CISO §8 mandate (plan §8 risk row).

explanationstring nullable

Server-side explanation text. Same disclosure rules as correct_option — only set when chain_terminated AND user_id.

replayedboolean nullable

True on early-return paths (unauth-cap or prior-terminated-fail) where the server returns a cached terminal verdict instead of grading the new attempt.

requires_signupboolean nullable

True only on the unauth-cap early-return path. Frontend uses this to flip to a sign-up CTA after the 2-anon-attempt cap.

remediationobject nullable

Adaptive Mastery System primer offer (sub-70 score, eligible source module). Shape rendered client-side by learning-paths.ts; opaque-to-SDK consumers.

mastery_explanationstring nullable

One-line hint explaining the 60% quiz / 40% apply-task weighting when a user aces the quiz on a module with an apply-task registered. PR5 audit fix (Wave 3 of AUDIT_TRIAGE_2026_05_06.md). None on modules without an apply-task registered (~180 of 222 modules).

next_step_hintstring nullable

Encouragement / next-step text rendered below the quiz result. Tone is calibration, never shame. Five branches: clean run, right-with-hint, right-on-attempt-N, chain-terminated-failed, can-retry. PR12 audit fix (Wave 3 of AUDIT_TRIAGE_2026_05_06.md).

mastery_transitionsobject[] nullable

T3.3 (S50 flip 2026-07-19): concept-layer crossings this submit caused — [{concept_slug, concept_title, from_layer, to_layer, direction, message}]. Advances carry copy.py advance_copy (quiet completion line + unlock-toast recheck); regressions carry the marked-for-review line. Additive/optional — absent when no layer crossed.

module_idstring nullable

The canonical module id this submit was graded against, after slug resolution. Present on every graded (200) response; learn-module.ts keys client progress by it, because edge-cached SSR lesson HTML may still POST the lesson slug (2026-10-17). Declared here so the OpenAPI spec and the typed client carry it rather than relying on extra='allow'.

Changes

No recorded changes to this operation across all 1 revision of this API.