modify_question
Edit existing Moodle questions to fix typos, reformulate content, or update feedback. Bypasses the Moodle qbank form bug by writing directly to the database.
Instructions
Edit an existing question (typo fix, reformulation, feedback tweak). Writes directly to DB, bypass Moodle 5.0.2 qbank form bug. Input: course_id, question_id, optional name / question_text / answers[]. Coverage: name, text, answers (answer/feedback/fraction).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New question name. Pass "" to skip. | |
| answers | No | Optional list of answer edits. Each item targets an answer by its 0-based index. Empty array = no answer edits. | |
| course_id | Yes | ||
| question_id | Yes | Moodle question.id (NOT question_bank_entries.id). Get it from import_gift output or question bank UI. | |
| question_text | No | New question text (HTML). Pass "" to skip. |