From 17ae0ebcd5a57b7a051b16a4e39d348ee490f342 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Tue, 2 Sep 2025 19:12:48 +0100 Subject: [PATCH 1/2] Remove extraneous schema attributes Now found in items-question-component.schema.json --- schema/component.schema.json | 295 ----------------------------------- 1 file changed, 295 deletions(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index 46756c7..4fe0656 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -8,7 +8,6 @@ }, "with": { "required": [ - "_attempts", "_selectable" ], "properties": { @@ -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", @@ -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 - } - } - } } } } From 66a5d632a325567544777d66042556876265ffe6 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Tue, 2 Sep 2025 19:18:23 +0100 Subject: [PATCH 2/2] Update source schema --- schema/component.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index 4fe0656..d00279b 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -4,7 +4,7 @@ "type": "object", "$merge": { "source": { - "$ref": "component" + "$ref": "items-question-component" }, "with": { "required": [