process_quiz_attempt
Submit quiz attempt answers after previewing them, and optionally finalize the attempt for grading; use dry-run first to confirm before irreversible submission.
Instructions
Submit answers for a quiz attempt. IRREVERSIBLE once dry_run=False AND finish_attempt=True -- that is the final, graded submission and cannot be undone. UNVERIFIED against a real quiz.
Call with dry_run=True (default) first, show the preview to the user -- especially before finish_attempt=True -- and only call again with dry_run=False after they explicitly confirm.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | If True (default), only preview without doing it. Call again with dry_run=False (same parameters) to actually submit it. | |
| responses | Yes | Moodle question-form field name -> answer value, parsed from get_quiz_attempt_data's returned HTML. | |
| attempt_id | Yes | Attempt id, e.g. from start_quiz_attempt. | |
| finish_attempt | No | If True, this is the FINAL submission -- the attempt is locked and graded. If False, this just records answers for the current page. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | Yes | ||
| message | Yes | ||
| preview | Yes | ||
| executed | Yes |