From 094db0960a184316e236ff6b779606ece89a1e80 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Fri, 13 Nov 2020 13:48:46 +0000 Subject: [PATCH 01/19] Add schema --- schema/component.schema.json | 436 +++++++++++++++++++++++++++++++++++ schema/course.schema.json | 34 +++ 2 files changed, 470 insertions(+) create mode 100644 schema/component.schema.json create mode 100644 schema/course.schema.json diff --git a/schema/component.schema.json b/schema/component.schema.json new file mode 100644 index 0000000..9ec7c05 --- /dev/null +++ b/schema/component.schema.json @@ -0,0 +1,436 @@ +{ + "$anchor": "gmcq-component", + "$schema": "http://json-schema.org/draft/2019-09/schema#", + "type": "object", + "$merge": { + "source": { + "$ref": "component" + }, + "with": { + "required": [ + "_attempts", + "_selectable" + ], + "properties": { + "_supportedLayout": { + "type": "string", + "title": "Supported layout", + "default": "both", + "enum": [ + "full-width", + "half-width", + "both" + ], + "_adapt": { + "editorOnly": true + } + }, + "instruction": { + "type": "string", + "title": "Instruction", + "description": "This is the instruction text", + "default": "", + "_adapt": { + "translatable": true + } + }, + "_items": { + "type": "array", + "title": "Items", + "items": { + "type": "object", + "properties": { + "_graphic": { + "type": "object", + "title": "Graphic", + "default": {}, + "properties": { + "large": { + "type": "string", + "title": "Large", + "description": "Large image for this item - used on desktop", + "default": "", + "_backboneForms": { + "type": "Asset", + "media": "image" + } + }, + "small": { + "type": "string", + "title": "Small", + "description": "Small image for this item - used on mobiles", + "default": "", + "_backboneForms": { + "type": "Asset", + "media": "image" + } + }, + "alt": { + "type": "string", + "title": "Alt", + "description": "Alternative text for the image", + "default": "", + "_adapt": { + "translatable": true + } + }, + "attribution": { + "type": "string", + "title": "Attribution", + "description": "Text to be displayed as an attribution", + "default": "", + "_adapt": { + "translatable": true + } + } + } + }, + "text": { + "type": "string", + "title": "Item Text", + "description": "Text that will be displayed with the image", + "default": "", + "_adapt": { + "translatable": true + } + }, + "_shouldBeSelected": { + "type": "boolean", + "title": "Correct answer?", + "default": false + }, + "feedback": { + "type": "string", + "title": "Answer-specific feedback", + "description": "When 'Selectable Items' is set to 1, this can be used to give the user feedback specific to the answer they selected - if incorrect.", + "default": "", + "_adapt": { + "translatable": true + } + } + } + } + }, + "_attempts": { + "type": "number", + "title": "Attempts", + "description": "How many attempts the learner is allowed", + "default": 1, + "_backboneForms": { + "validators": [ + "number" + ] + } + }, + "_canShowModelAnswer": { + "type": "boolean", + "title": "Display Model Answer", + "description": "Allow the user to view the 'model answer' if they answer the question incorrectly?", + "default": true + }, + "_canShowFeedback": { + "type": "boolean", + "title": "Display Feedback", + "default": true + }, + "_canShowMarking": { + "type": "boolean", + "title": "Display Marking", + "default": true + }, + "_shouldDisplayAttempts": { + "type": "boolean", + "title": "Display Attempts", + "description": "Display the number of attempts remaining?", + "default": false + }, + "_isRandom": { + "type": "boolean", + "title": "Randomise answers", + "default": false + }, + "_questionWeight": { + "type": "number", + "title": "Question Weight", + "description": "How much this question is worth", + "default": 1, + "_backboneForms": { + "validators": [ + "number" + ] + } + }, + "_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 + }, + "_columns": { + "type": "number", + "title": "Columns", + "description": "Set the number of columns. If value is '0', component uses the default layout.", + "default": 0, + "_backboneForms": { + "validators": [ + "number" + ] + } + }, + "_selectable": { + "type": "number", + "title": "Selectable Items", + "description": "How many items are selectable", + "default": 1, + "_backboneForms": { + "validators": [ + "number" + ] + } + }, + "_feedback": { + "type": "object", + "title": "Feedback", + "default": {}, + "properties": { + "title": { + "type": "string", + "title": "Feedback Title", + "description": "Leave blank to have the component's title shown instead.", + "default": "", + "_adapt": { + "translatable": true + } + }, + "correct": { + "type": "string", + "title": "Correct", + "description": "Correct answer feedback for this question", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "TextArea" + }, + "_incorrect": { + "type": "object", + "title": "Incorrect Feedback", + "default": {}, + "properties": { + "final": { + "type": "string", + "title": "Incorrect Final", + "description": "Incorrect answer feedback for the final attempt", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "TextArea" + }, + "notFinal": { + "type": "string", + "title": "Incorrect Not Final", + "description": "Incorrect answer feedback for any attempt apart from the last attempt. If you leave this blank, the 'Incorrect Final' feedback will be used instead.", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "TextArea" + } + } + }, + "_partlyCorrect": { + "type": "object", + "title": "Partly correct", + "default": {}, + "properties": { + "final": { + "type": "string", + "title": "Partly Correct Final", + "description": "Partly correct answer feedback for the final attempt. If you leave this blank, the 'Incorrect Final' feedback will be used instead.", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "TextArea" + }, + "notFinal": { + "type": "string", + "title": "Partly Correct Not Final", + "description": "Partly correct answer feedback for any attempt apart from the last attempt. If you leave this blank, the 'Partly Correct Final' feedback will be used instead.", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "TextArea" + } + } + } + } + }, + "_buttons": { + "type": "object", + "title": "Buttons", + "default": {}, + "properties": { + "_submit": { + "type": "object", + "title": "Submit", + "default": {}, + "properties": { + "buttonText": { + "type": "string", + "title": "Button text", + "description": "Button label text for the submit button", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + }, + "ariaLabel": { + "type": "string", + "title": "Aria label", + "description": "Aria label for the submit button", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + } + } + }, + "_reset": { + "type": "object", + "title": "Reset", + "default": {}, + "properties": { + "buttonText": { + "type": "string", + "title": "Button text", + "description": "Button label text for the reset button", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + }, + "ariaLabel": { + "type": "string", + "title": "Aria label", + "description": "Aria label for the reset button", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + } + } + }, + "_showCorrectAnswer": { + "type": "object", + "title": "Show Correct Answer", + "default": {}, + "properties": { + "buttonText": { + "type": "string", + "title": "Button text", + "description": "Button label text to show the model answer", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + }, + "ariaLabel": { + "type": "string", + "title": "Aria label", + "description": "Aria label for the show model answer button", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + } + } + }, + "_hideCorrectAnswer": { + "type": "object", + "title": "Hide Correct Answer", + "default": {}, + "properties": { + "buttonText": { + "type": "string", + "title": "Button text", + "description": "Button label text to hide the model answer", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + }, + "ariaLabel": { + "type": "string", + "title": "Aria label", + "description": "Aria label for the hide model answer button", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + } + } + }, + "_showFeedback": { + "type": "object", + "title": "Show Feedback", + "default": {}, + "properties": { + "buttonText": { + "type": "string", + "title": "Button text", + "description": "Button label text to show feedback", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + }, + "ariaLabel": { + "type": "string", + "title": "Aria label", + "description": "Aria label for the show feedback button", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + } + } + }, + "remainingAttemptsText": { + "type": "string", + "title": "Attempts Remaining Text", + "description": "Shown when there are multiple attempts left", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + }, + "remainingAttemptText": { + "type": "string", + "title": "Final Attempt Text", + "description": "Shown when there is one attempt left", + "default": "", + "_adapt": { + "translatable": true + }, + "_backboneForms": "QuestionButton" + } + } + } + } + } + } +} diff --git a/schema/course.schema.json b/schema/course.schema.json new file mode 100644 index 0000000..47a3b2f --- /dev/null +++ b/schema/course.schema.json @@ -0,0 +1,34 @@ +{ + "$anchor": "gmcq-course", + "$schema": "http://json-schema.org/draft/2019-09/schema#", + "type": "object", + "$merge": { + "source": { + "$ref": "course" + }, + "with": { + "properties": { + "_globals": { + "type": "object", + "default": {}, + "properties": { + "_gmcq": { + "type": "object", + "default": {}, + "properties": { + "ariaRegion": { + "type": "string", + "title": "Aria region", + "default": "Multiple choice question", + "_adapt": { + "translatable": true + } + } + } + } + } + } + } + } + } +} From 753f644e4d63ac246196783f5d7053b7d5046bcb Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Fri, 13 Nov 2020 14:03:09 +0000 Subject: [PATCH 02/19] Remove references to QuestionButton --- schema/component.schema.json | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index 9ec7c05..9ac89f0 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -285,8 +285,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } }, "ariaLabel": { "type": "string", @@ -295,8 +294,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } } } }, @@ -312,8 +310,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } }, "ariaLabel": { "type": "string", @@ -322,8 +319,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } } } }, @@ -339,8 +335,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } }, "ariaLabel": { "type": "string", @@ -349,8 +344,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } } } }, @@ -366,8 +360,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } }, "ariaLabel": { "type": "string", @@ -376,8 +369,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } } } }, @@ -393,8 +385,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } }, "ariaLabel": { "type": "string", @@ -403,8 +394,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } } } }, @@ -415,8 +405,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } }, "remainingAttemptText": { "type": "string", @@ -425,8 +414,7 @@ "default": "", "_adapt": { "translatable": true - }, - "_backboneForms": "QuestionButton" + } } } } From 90327d196cdcb04362207fbdabf6c3ee433212bc Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Wed, 18 Nov 2020 12:22:56 +0000 Subject: [PATCH 03/19] Remove validators --- schema/component.schema.json | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index 9ac89f0..5679a53 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -115,12 +115,7 @@ "type": "number", "title": "Attempts", "description": "How many attempts the learner is allowed", - "default": 1, - "_backboneForms": { - "validators": [ - "number" - ] - } + "default": 1 }, "_canShowModelAnswer": { "type": "boolean", @@ -153,12 +148,7 @@ "type": "number", "title": "Question Weight", "description": "How much this question is worth", - "default": 1, - "_backboneForms": { - "validators": [ - "number" - ] - } + "default": 1 }, "_recordInteraction": { "type": "boolean", @@ -170,23 +160,13 @@ "type": "number", "title": "Columns", "description": "Set the number of columns. If value is '0', component uses the default layout.", - "default": 0, - "_backboneForms": { - "validators": [ - "number" - ] - } + "default": 0 }, "_selectable": { "type": "number", "title": "Selectable Items", "description": "How many items are selectable", - "default": 1, - "_backboneForms": { - "validators": [ - "number" - ] - } + "default": 1 }, "_feedback": { "type": "object", From 10ca2584075d6376d76611519ab20d98cc5dd804 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Thu, 19 Nov 2020 10:54:23 +0000 Subject: [PATCH 04/19] Bump version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 084d82f..0fcead9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "5.0.2", + "version": "5.1.0-alpha.1", "framework": ">=5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new", From ead463eb10ac37d50c094e404bdd6773b2ccc79e Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Thu, 21 Jan 2021 15:11:46 +0000 Subject: [PATCH 05/19] Update URL --- schema/component.schema.json | 2 +- schema/course.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index 5679a53..3c23681 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -1,6 +1,6 @@ { "$anchor": "gmcq-component", - "$schema": "http://json-schema.org/draft/2019-09/schema#", + "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "$merge": { "source": { diff --git a/schema/course.schema.json b/schema/course.schema.json index 47a3b2f..c023993 100644 --- a/schema/course.schema.json +++ b/schema/course.schema.json @@ -1,6 +1,6 @@ { "$anchor": "gmcq-course", - "$schema": "http://json-schema.org/draft/2019-09/schema#", + "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "$merge": { "source": { From ea78561d0ca816e42626afd5a5f937147ff41203 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Thu, 21 Jan 2021 15:12:56 +0000 Subject: [PATCH 06/19] Update case --- schema/component.schema.json | 20 ++++++++++---------- schema/course.schema.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index 3c23681..56ae8d5 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -269,8 +269,8 @@ }, "ariaLabel": { "type": "string", - "title": "Aria label", - "description": "Aria label for the submit button", + "title": "ARIA label", + "description": "ARIA label for the submit button", "default": "", "_adapt": { "translatable": true @@ -294,8 +294,8 @@ }, "ariaLabel": { "type": "string", - "title": "Aria label", - "description": "Aria label for the reset button", + "title": "ARIA label", + "description": "ARIA label for the reset button", "default": "", "_adapt": { "translatable": true @@ -319,8 +319,8 @@ }, "ariaLabel": { "type": "string", - "title": "Aria label", - "description": "Aria label for the show model answer button", + "title": "ARIA label", + "description": "ARIA label for the show model answer button", "default": "", "_adapt": { "translatable": true @@ -344,8 +344,8 @@ }, "ariaLabel": { "type": "string", - "title": "Aria label", - "description": "Aria label for the hide model answer button", + "title": "ARIA label", + "description": "ARIA label for the hide model answer button", "default": "", "_adapt": { "translatable": true @@ -369,8 +369,8 @@ }, "ariaLabel": { "type": "string", - "title": "Aria label", - "description": "Aria label for the show feedback button", + "title": "ARIA label", + "description": "ARIA label for the show feedback button", "default": "", "_adapt": { "translatable": true diff --git a/schema/course.schema.json b/schema/course.schema.json index c023993..ede708f 100644 --- a/schema/course.schema.json +++ b/schema/course.schema.json @@ -18,7 +18,7 @@ "properties": { "ariaRegion": { "type": "string", - "title": "Aria region", + "title": "ARIA region", "default": "Multiple choice question", "_adapt": { "translatable": true From ff5ccd96bf745510d3cbce77d9c3b0edd0d78dc7 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Thu, 21 Jan 2021 15:13:09 +0000 Subject: [PATCH 07/19] Bump version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 0fcead9..f2ce7f2 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "5.1.0-alpha.1", + "version": "5.1.0-alpha.2", "framework": ">=5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new", From 7971a48450e780ab64ef223e4a7b1c4d5fadc462 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Fri, 5 Mar 2021 11:10:58 +0000 Subject: [PATCH 08/19] Clarity first pass --- schema/component.schema.json | 76 +++++++++++++++--------------------- 1 file changed, 31 insertions(+), 45 deletions(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index 56ae8d5..3ea8795 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -28,7 +28,6 @@ "instruction": { "type": "string", "title": "Instruction", - "description": "This is the instruction text", "default": "", "_adapt": { "translatable": true @@ -67,8 +66,8 @@ }, "alt": { "type": "string", - "title": "Alt", - "description": "Alternative text for the image", + "title": "Alternative text", + "description": "A description of the image; required when it has meaning that must be conveyed to the learner. Avoid duplication if the item text already provides context and leave blank", "default": "", "_adapt": { "translatable": true @@ -87,7 +86,7 @@ }, "text": { "type": "string", - "title": "Item Text", + "title": "Text", "description": "Text that will be displayed with the image", "default": "", "_adapt": { @@ -96,13 +95,13 @@ }, "_shouldBeSelected": { "type": "boolean", - "title": "Correct answer?", + "title": "Mark this option as correct", "default": false }, "feedback": { "type": "string", "title": "Answer-specific feedback", - "description": "When 'Selectable Items' is set to 1, this can be used to give the user feedback specific to the answer they selected - if incorrect.", + "description": "When 'Selectable items' is set to 1, this can be used to give the user feedback specific to the answer they selected - if incorrect", "default": "", "_adapt": { "translatable": true @@ -113,30 +112,29 @@ }, "_attempts": { "type": "number", - "title": "Attempts", + "title": "Allowed attempts", "description": "How many attempts the learner is allowed", "default": 1 }, "_canShowModelAnswer": { "type": "boolean", - "title": "Display Model Answer", - "description": "Allow the user to view the 'model answer' if they answer the question incorrectly?", + "title": "Enable correct answer toggle", + "description": "Allow the user to view the 'model answer' if they answer the question incorrectly", "default": true }, "_canShowFeedback": { "type": "boolean", - "title": "Display Feedback", + "title": "Enable feedback", "default": true }, "_canShowMarking": { "type": "boolean", - "title": "Display Marking", + "title": "Enable marking", "default": true }, "_shouldDisplayAttempts": { "type": "boolean", - "title": "Display Attempts", - "description": "Display the number of attempts remaining?", + "title": "Show number of remaining attempts", "default": false }, "_isRandom": { @@ -146,25 +144,25 @@ }, "_questionWeight": { "type": "number", - "title": "Question Weight", + "title": "Question weight", "description": "How much this question is worth", "default": 1 }, "_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.", + "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 }, "_columns": { "type": "number", "title": "Columns", - "description": "Set the number of columns. If value is '0', component uses the default layout.", + "description": "Set the number of columns. If value is '0', component uses the default layout", "default": 0 }, "_selectable": { "type": "number", - "title": "Selectable Items", + "title": "Selectable items", "description": "How many items are selectable", "default": 1 }, @@ -175,8 +173,8 @@ "properties": { "title": { "type": "string", - "title": "Feedback Title", - "description": "Leave blank to have the component's title shown instead.", + "title": "Title", + "description": "Leave blank to have the component's title shown instead", "default": "", "_adapt": { "translatable": true @@ -194,12 +192,12 @@ }, "_incorrect": { "type": "object", - "title": "Incorrect Feedback", + "title": "Incorrect", "default": {}, "properties": { "final": { "type": "string", - "title": "Incorrect Final", + "title": "Default incorrect feedback", "description": "Incorrect answer feedback for the final attempt", "default": "", "_adapt": { @@ -209,8 +207,8 @@ }, "notFinal": { "type": "string", - "title": "Incorrect Not Final", - "description": "Incorrect answer feedback for any attempt apart from the last attempt. If you leave this blank, the 'Incorrect Final' feedback will be used instead.", + "title": "Try again 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 @@ -226,8 +224,8 @@ "properties": { "final": { "type": "string", - "title": "Partly Correct Final", - "description": "Partly correct answer feedback for the final attempt. If you leave this blank, the 'Incorrect Final' feedback will be used instead.", + "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 @@ -236,8 +234,8 @@ }, "notFinal": { "type": "string", - "title": "Partly Correct Not Final", - "description": "Partly correct answer feedback for any attempt apart from the last attempt. If you leave this blank, the 'Partly Correct Final' feedback will be used instead.", + "title": "Try again 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 @@ -250,7 +248,7 @@ }, "_buttons": { "type": "object", - "title": "Buttons", + "title": "Button overrides", "default": {}, "properties": { "_submit": { @@ -261,7 +259,6 @@ "buttonText": { "type": "string", "title": "Button text", - "description": "Button label text for the submit button", "default": "", "_adapt": { "translatable": true @@ -270,7 +267,6 @@ "ariaLabel": { "type": "string", "title": "ARIA label", - "description": "ARIA label for the submit button", "default": "", "_adapt": { "translatable": true @@ -286,7 +282,6 @@ "buttonText": { "type": "string", "title": "Button text", - "description": "Button label text for the reset button", "default": "", "_adapt": { "translatable": true @@ -295,7 +290,6 @@ "ariaLabel": { "type": "string", "title": "ARIA label", - "description": "ARIA label for the reset button", "default": "", "_adapt": { "translatable": true @@ -305,13 +299,12 @@ }, "_showCorrectAnswer": { "type": "object", - "title": "Show Correct Answer", + "title": "Show correct answer", "default": {}, "properties": { "buttonText": { "type": "string", "title": "Button text", - "description": "Button label text to show the model answer", "default": "", "_adapt": { "translatable": true @@ -320,7 +313,6 @@ "ariaLabel": { "type": "string", "title": "ARIA label", - "description": "ARIA label for the show model answer button", "default": "", "_adapt": { "translatable": true @@ -330,13 +322,12 @@ }, "_hideCorrectAnswer": { "type": "object", - "title": "Hide Correct Answer", + "title": "Hide correct answer", "default": {}, "properties": { "buttonText": { "type": "string", "title": "Button text", - "description": "Button label text to hide the model answer", "default": "", "_adapt": { "translatable": true @@ -345,7 +336,6 @@ "ariaLabel": { "type": "string", "title": "ARIA label", - "description": "ARIA label for the hide model answer button", "default": "", "_adapt": { "translatable": true @@ -355,13 +345,12 @@ }, "_showFeedback": { "type": "object", - "title": "Show Feedback", + "title": "Show feedback", "default": {}, "properties": { "buttonText": { "type": "string", "title": "Button text", - "description": "Button label text to show feedback", "default": "", "_adapt": { "translatable": true @@ -370,7 +359,6 @@ "ariaLabel": { "type": "string", "title": "ARIA label", - "description": "ARIA label for the show feedback button", "default": "", "_adapt": { "translatable": true @@ -380,8 +368,7 @@ }, "remainingAttemptsText": { "type": "string", - "title": "Attempts Remaining Text", - "description": "Shown when there are multiple attempts left", + "title": "Remaining attempts label", "default": "", "_adapt": { "translatable": true @@ -389,8 +376,7 @@ }, "remainingAttemptText": { "type": "string", - "title": "Final Attempt Text", - "description": "Shown when there is one attempt left", + "title": "Final attempt label", "default": "", "_adapt": { "translatable": true From 445a4c71de3b314d63171fb0f3fa8ecf236ad2d8 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Fri, 5 Mar 2021 11:13:27 +0000 Subject: [PATCH 09/19] Add target attribute; bump version --- bower.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bower.json b/bower.json index f2ce7f2..ea342a6 100644 --- a/bower.json +++ b/bower.json @@ -1,10 +1,11 @@ { "name": "adapt-contrib-gmcq", - "version": "5.1.0-alpha.2", + "version": "5.1.0-alpha.3", "framework": ">=5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new", "component" : "gmcq", + "targetAttribute": "_gmcq", "displayName" : "Graphical Multiple Choice Question", "description": "A multiple choice question component, with images", "main": "/js/adapt-contrib-gmcq.js", From 303f4834d8843b0424cde0fd44de8036e9b64f3d Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Fri, 5 Mar 2021 15:51:21 +0000 Subject: [PATCH 10/19] Rename feedback --- schema/component.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index 3ea8795..71edde9 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -207,7 +207,7 @@ }, "notFinal": { "type": "string", - "title": "Try again feedback", + "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": { @@ -234,7 +234,7 @@ }, "notFinal": { "type": "string", - "title": "Try again feedback", + "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": { From 924d76f59ca26228f0872aa278d3d65cb1add6f4 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Fri, 5 Mar 2021 15:51:28 +0000 Subject: [PATCH 11/19] Bump version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index ea342a6..ad8e8f4 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "5.1.0-alpha.3", + "version": "5.1.0-alpha.4", "framework": ">=5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new", From b5fc6c90af150a66e6af1ea3fa1a66bdb7368403 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Thu, 25 Mar 2021 12:36:23 +0000 Subject: [PATCH 12/19] Update schema to use new $patch keyword --- schema/course.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/course.schema.json b/schema/course.schema.json index ede708f..0de0f7b 100644 --- a/schema/course.schema.json +++ b/schema/course.schema.json @@ -2,7 +2,7 @@ "$anchor": "gmcq-course", "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "$merge": { + "$patch": { "source": { "$ref": "course" }, From 77307f76bbc01fbcc6b54e7939743960ebda4611 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Thu, 25 Mar 2021 17:10:12 +0000 Subject: [PATCH 13/19] Bump version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index ad8e8f4..1ed4894 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "5.1.0-alpha.4", + "version": "5.1.0-alpha.5", "framework": ">=5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new", From 5f7bf0cbec454c066b37a7c398943e18cfa75f64 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Thu, 15 Apr 2021 14:50:26 +0100 Subject: [PATCH 14/19] Update asset fields --- schema/component.schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index 71edde9..a7b7efb 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -46,6 +46,7 @@ "properties": { "large": { "type": "string", + "isObjectId": true, "title": "Large", "description": "Large image for this item - used on desktop", "default": "", @@ -56,9 +57,9 @@ }, "small": { "type": "string", + "isObjectId": true, "title": "Small", "description": "Small image for this item - used on mobiles", - "default": "", "_backboneForms": { "type": "Asset", "media": "image" From c0a475bae095d5278c1d5f7ec4ec16cf24b70874 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Thu, 15 Apr 2021 14:51:48 +0100 Subject: [PATCH 15/19] Bump version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index f386fba..ad73347 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "5.1.0", + "version": "5.2.0-alpha.1", "framework": ">=5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new", From 6e600e19f98bb025029a0c7af3e422706d73ed39 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Thu, 6 May 2021 14:25:16 +0100 Subject: [PATCH 16/19] Bump versions --- bower.json | 2 +- schema/component.schema.json | 2 +- schema/course.schema.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index ad73347..5a24d12 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "5.2.0-alpha.1", + "version": "5.2.0-beta.1", "framework": ">=5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new", diff --git a/schema/component.schema.json b/schema/component.schema.json index a7b7efb..a0b4a38 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -1,6 +1,6 @@ { "$anchor": "gmcq-component", - "$schema": "https://json-schema.org/draft/2019-09/schema", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "$merge": { "source": { diff --git a/schema/course.schema.json b/schema/course.schema.json index 0de0f7b..0d2841c 100644 --- a/schema/course.schema.json +++ b/schema/course.schema.json @@ -1,6 +1,6 @@ { "$anchor": "gmcq-course", - "$schema": "https://json-schema.org/draft/2019-09/schema", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "$patch": { "source": { From a8ef4cd104d1ba9858f4e378d1dc9cde4b0688cc Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Mon, 28 Jun 2021 11:56:30 +0100 Subject: [PATCH 17/19] Add item scoring fields to schema --- schema/component.schema.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/schema/component.schema.json b/schema/component.schema.json index a0b4a38..583193b 100644 --- a/schema/component.schema.json +++ b/schema/component.schema.json @@ -99,6 +99,11 @@ "title": "Mark this option as correct", "default": false }, + "_isPartlyCorrect": { + "type": "boolean", + "title": "Mark this option as partly correct", + "default": false + }, "feedback": { "type": "string", "title": "Answer-specific feedback", @@ -107,6 +112,12 @@ "_adapt": { "translatable": true } + }, + "_score": { + "type": "number", + "title": "Score", + "description": "If item scoring is enabled, selected item scores are summed to give the question score", + "default": 0 } } } @@ -143,10 +154,16 @@ "title": "Randomise answers", "default": false }, + "_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": "How much this question is worth", + "description": "When item scoring is disabled, this is the question score for a correct response", "default": 1 }, "_recordInteraction": { From 0023c2af668e6d32d4abdec035f3a9a0bf9be5b7 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Mon, 28 Jun 2021 11:56:49 +0100 Subject: [PATCH 18/19] Bump version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index c58c50b..58ca9bf 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "5.2.0", + "version": "5.3.0-beta.1", "framework": ">=5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new", From 42b29b48fb241f0629504c0985f23631e2e2f148 Mon Sep 17 00:00:00 2001 From: Tom Greenfield Date: Wed, 4 Aug 2021 12:45:30 +0100 Subject: [PATCH 19/19] Revert version for PR --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 58ca9bf..c58c50b 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "5.3.0-beta.1", + "version": "5.2.0", "framework": ">=5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new",