questionBank_updateItem
Replaces the content of an existing question bank item entirely - blockType, category, difficulty and columns all have to be sent, even the ones that are not changing. blockType is immutable: it must equal the item's current one, a different value is rejected with an error rather than changing the item's type - an item that should be a different blockType has to be deleted and re-added instead. Changes the item's draft; call questionBank_publish to make the change visible to a QuestionBank block. Rejected for a public template id, see questionBank_templateList.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | Yes | The question content, as {columnName: [values]} - the same shape questionBank_addItem takes, with the columns questionBank_blockTypeColumns lists for this riddleType and blockType (an unknown column name is rejected, naming the column it did not recognise and listing the valid ones). Replaces the item's content entirely, it is not a partial merge. The values questionBank_getItems returns can go straight back in, {"id": .., "value": ..} objects included: keeping their ids is what makes this an edit of the existing values rather than a fresh set. | |
| category | Yes | The item's category. | |
| blockType | Yes | The item's block type. Must be exactly its current blockType (questionBank_getItems returns it): it cannot be changed after creation, a different value is rejected. Send it back unchanged - required despite never differing. | |
| difficulty | Yes | The item's difficulty, 1-10. | |
| questionBankId | Yes | The ID of the question bank the item belongs to. | |
| questionBankItemId | Yes | The ID of the item to update, as returned by questionBank_addItem/questionBank_getItems. |