process_quiz_attempt
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"attempt_id": "<attempt_id>",
"responses": "<responses>"
},
"name": "process_quiz_attempt"
}
}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 |