questionBank_addItem
Adds one question/item to a question bank. Call questionBank_blockTypeColumns(riddleType) first to see the valid blockType values for this bank and which "columns" each one expects - there is no single universal shape. The item is added to the bank's draft; call questionBank_publish to make it something a QuestionBank block actually draws. Rejected for a public template id, see questionBank_templateList.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | Yes | The question content, as {columnName: [values]}. Which column names are expected depends on the bank's riddleType AND the blockType, so read them off questionBank_blockTypeColumns rather than guessing: an unknown column name is rejected, naming the column it did not recognise and listing the valid ones. E.g. a "Quiz" bank's "SingleChoice" takes {"QUESTION": ["Capital of France?"], "CORRECT_CHOICE": ["Paris"], "INCORRECT_CHOICE": ["London", "Berlin"]}, a "Poll" bank's "SingleChoice" {"QUESTION": [...], "CHOICE": [...]} instead, a Poll answer never being right or wrong. | |
| category | Yes | The item's category - free text, used to filter what a QuestionBank block draws (see the "questionBankCriteria" of the QuestionBank block type). | |
| blockType | Yes | The block type this question is shaped for, e.g. "SingleChoice"/"MultipleChoice". questionBank_blockTypeColumns lists every blockType valid for this bank's riddleType and the "columns" each expects. | |
| difficulty | Yes | The item's difficulty, 1-10 - also used to filter what a QuestionBank block draws. | |
| questionBankId | Yes | The ID of the question bank to add the item to. |