Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
297 changes: 1 addition & 296 deletions schema/component.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"type": "object",
"$merge": {
"source": {
"$ref": "component"
"$ref": "items-question-component"
},
"with": {
"required": [
"_attempts",
"_selectable"
],
"properties": {
Expand All @@ -25,23 +24,6 @@
"editorOnly": true
}
},
"instruction": {
"type": "string",
"title": "Instruction",
"default": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.",
"_adapt": {
"translatable": true
}
},
"ariaQuestion": {
"type": "string",
"title": "ARIA question",
"description": "This will be read out by screen readers instead of reading the 'Display title', 'Body' & 'Instruction' fields when focusing on the options. To be clear and concise, ensure the text encompasses only the question associated.",
"default": "",
"_adapt": {
"translatable": true
}
},
"_items": {
"type": "array",
"title": "Items",
Expand Down Expand Up @@ -96,294 +78,17 @@
}
}
},
"_attempts": {
"type": "number",
"title": "Allowed attempts",
"description": "How many attempts the learner is allowed",
"default": 1
},
"_canShowModelAnswer": {
"type": "boolean",
"title": "Enable correct answer toggle",
"description": "Allow the user to view the 'model answer' if they answer the question incorrectly",
"default": true
},
"_canShowCorrectness": {
"type": "boolean",
"title": "Enable items to display correctness",
"description": "If enabled, this replaces the associated 'model answer' toggle button and displays correctness directly on the component items.",
"default": false
},
"_canShowFeedback": {
"type": "boolean",
"title": "Enable feedback",
"default": true
},
"_canShowMarking": {
"type": "boolean",
"title": "Enable marking",
"default": true
},
"_shouldDisplayAttempts": {
"type": "boolean",
"title": "Show number of remaining attempts",
"default": false
},
"_isRandom": {
"type": "boolean",
"title": "Randomise answers",
"default": false
},
"_recordInteraction": {
"type": "boolean",
"title": "Record interaction",
"description": "If disabled, recording the user's answer(s) to this question to cmi.interactions on the LMS will be disabled for this component only",
"default": true
},
"_hasItemScoring": {
"type": "boolean",
"title": "Enable item scoring",
"description": "When disabled, this question scores 0 for incorrect and 'Question weight' for correct. When enabled, this question scores by summing the scores of the selected options",
"default": false
},
"_questionWeight": {
"type": "number",
"title": "Question weight",
"description": "When item scoring is disabled, this is the question score for a correct response",
"default": 1
},
"_selectable": {
"type": "number",
"title": "Selectable items",
"description": "How many items are selectable",
"default": 1
},
"_feedback": {
"type": "object",
"title": "Feedback",
"default": {},
"properties": {
"title": {
"type": "string",
"title": "Title",
"description": "Title text for the feedback",
"default": "",
"_adapt": {
"translatable": true
}
},
"altTitle": {
"type": "string",
"title": "Alternative Feedback Title",
"description": "Text read out by screen readers if no visual title is included",
"default": "",
"_adapt": {
"translatable": true
}
},
"correct": {
"type": "string",
"title": "Correct feedback",
"description": "Correct answer feedback for this question",
"default": "",
"_adapt": {
"translatable": true
},
"_backboneForms": "TextArea"
},
"_incorrect": {
"type": "object",
"title": "Incorrect",
"default": {},
"properties": {
"final": {
"type": "string",
"title": "Default incorrect feedback",
"description": "Incorrect answer feedback for the final attempt",
"default": "",
"_adapt": {
"translatable": true
},
"_backboneForms": "TextArea"
},
"notFinal": {
"type": "string",
"title": "Retry feedback",
"description": "Incorrect answer feedback for any attempt apart from the last attempt. If you leave this blank, the default incorrect feedback will be used instead",
"default": "",
"_adapt": {
"translatable": true
},
"_backboneForms": "TextArea"
}
}
},
"_partlyCorrect": {
"type": "object",
"title": "Partly correct",
"default": {},
"properties": {
"final": {
"type": "string",
"title": "Default partly correct feedback",
"description": "Partly correct answer feedback for the final attempt. If you leave this blank, the default incorrect feedback will be used instead",
"default": "",
"_adapt": {
"translatable": true
},
"_backboneForms": "TextArea"
},
"notFinal": {
"type": "string",
"title": "Retry feedback",
"description": "Partly correct answer feedback for any attempt apart from the last attempt. If you leave this blank, the default partly correct feedback will be used instead",
"default": "",
"_adapt": {
"translatable": true
},
"_backboneForms": "TextArea"
}
}
}
}
},
"_buttons": {
"type": "object",
"title": "Button overrides",
"default": {},
"properties": {
"_submit": {
"type": "object",
"title": "Submit",
"default": {},
"properties": {
"buttonText": {
"type": "string",
"title": "Button text",
"default": "",
"_adapt": {
"translatable": true
}
},
"ariaLabel": {
"type": "string",
"title": "ARIA label",
"default": "",
"_adapt": {
"translatable": true
}
}
}
},
"_reset": {
"type": "object",
"title": "Reset",
"default": {},
"properties": {
"buttonText": {
"type": "string",
"title": "Button text",
"default": "",
"_adapt": {
"translatable": true
}
},
"ariaLabel": {
"type": "string",
"title": "ARIA label",
"default": "",
"_adapt": {
"translatable": true
}
}
}
},
"_showCorrectAnswer": {
"type": "object",
"title": "Show correct answer",
"default": {},
"properties": {
"buttonText": {
"type": "string",
"title": "Button text",
"default": "",
"_adapt": {
"translatable": true
}
},
"ariaLabel": {
"type": "string",
"title": "ARIA label",
"default": "",
"_adapt": {
"translatable": true
}
}
}
},
"_hideCorrectAnswer": {
"type": "object",
"title": "Hide correct answer",
"default": {},
"properties": {
"buttonText": {
"type": "string",
"title": "Button text",
"default": "",
"_adapt": {
"translatable": true
}
},
"ariaLabel": {
"type": "string",
"title": "ARIA label",
"default": "",
"_adapt": {
"translatable": true
}
}
}
},
"_showFeedback": {
"type": "object",
"title": "Show feedback",
"default": {},
"properties": {
"buttonText": {
"type": "string",
"title": "Button text",
"default": "",
"_adapt": {
"translatable": true
}
},
"ariaLabel": {
"type": "string",
"title": "ARIA label",
"default": "",
"_adapt": {
"translatable": true
}
}
}
},
"remainingAttemptsText": {
"type": "string",
"title": "Remaining attempts label",
"default": "",
"_adapt": {
"translatable": true
}
},
"remainingAttemptText": {
"type": "string",
"title": "Final attempt label",
"default": "",
"_adapt": {
"translatable": true
}
}
}
}
}
}
Expand Down