From be8487fbf57fd3c2ac54a916677c1c498131a054 Mon Sep 17 00:00:00 2001 From: moloko Date: Wed, 14 Jun 2017 20:42:54 +0100 Subject: [PATCH 1/2] Amend schema to change boolean selects to checkboxes, as per https://github.com/adaptlearning/adapt_authoring/issues/1380 Also update help text to avoid referencing the type of UI element that is used in case we want to change it in the future to a different one. --- properties.schema | 56 ++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/properties.schema b/properties.schema index 357cfb9..acf60ec 100644 --- a/properties.schema +++ b/properties.schema @@ -7,7 +7,7 @@ "ariaRegion": { "type": "string", "required": true, - "default": "This component is a graphical multiple choice question. Once you have selected an option select the submit button below.", + "default": "This is a graphical multiple choice question. Once you have selected an option, select the submit button below.", "inputType": "Text", "validators": [], "translatable": true @@ -65,7 +65,7 @@ "default": "", "inputType": "Text", "validators": [], - "help": "Alternative text for this items image", + "help": "Alternative text for the image", "translatable": true }, "attribution": { @@ -86,26 +86,25 @@ "title": "Item Text", "inputType": "Text", "validators": [], - "help": "This text will display with the image", + "help": "Text that will be displayed with the image", "translatable": true }, "_shouldBeSelected": { "type": "boolean", "required": true, "default": false, - "title": "Should Be Selected", - "inputType": {"type": "Boolean", "options": [true, false]}, - "validators": [], - "help": "Set this item to 'true' if this is one of the correct answers" + "title": "Correct answer?", + "inputType": "Checkbox", + "validators": [] }, "feedback": { "type":"string", "required":false, "default": "", - "title": "Option Specific Feedback", + "title": "Answer-specific feedback", "inputType": "Text", "validators": [], - "help": "This text will be displayed as feedback if there is only one selectable item for this component", + "help": "When 'Selectable Items' is set to 1, this can be used to give the user feedback specific to the answer they selected", "translatable": true } } @@ -125,44 +124,41 @@ "required":true, "default": true, "title": "Display Model Answer", - "inputType": {"type": "Boolean", "options": [true, false]}, + "inputType": "Checkbox", "validators": [], - "help": "Select 'true' to allow the user to view the 'model answer' should they answer the question incorrectly" + "help": "Allow the user to view the 'model answer' if they answer the question incorrectly?" }, "_canShowFeedback": { "type":"boolean", "required":true, "default": true, "title": "Display Feedback", - "inputType": {"type": "Boolean", "options": [true, false]}, - "validators": [], - "help": "Select 'true' to allow the user to view feedback on their answer" + "inputType": "Checkbox", + "validators": [] }, "_canShowMarking": { "type": "boolean", "default": true, "title": "Display Marking", - "inputType": { "type": "Boolean", "options": [ true, false ] }, - "validators": [], - "help": "Select 'true' to display ticks and crosses on question completion" + "inputType": "Checkbox", + "validators": [] }, "_shouldDisplayAttempts": { "type":"boolean", "required":false, "default": false, "title": "Display Attempts", - "inputType": {"type": "Boolean", "options": [true, false]}, + "inputType": "Checkbox", "validators": [], - "help": "Select 'true' to display the numbers of attempts left" + "help": "Display the number of attempts remaining?" }, "_isRandom": { "type":"boolean", "required":false, "default": false, - "title": "Randomised Items", - "inputType": {"type": "Boolean", "options": [true, false]}, - "validators": [], - "help": "If set to 'true', all items will be randomised" + "title": "Randomise answers", + "inputType": "Checkbox", + "validators": [] }, "_questionWeight": { "type":"number", @@ -178,9 +174,9 @@ "required":false, "default": true, "title": "Record interaction", - "inputType": {"type": "Boolean", "options": [true, false]}, + "inputType": "Checkbox", "validators": [], - "help": "If set to 'true', the user's answer(s) will be recorded to cmi.interactions on the LMS (where supported)." + "help": "If disabled, recording the user's answer(s) to this question to cmi.interactions on the LMS will be disabled for this component only." }, "_columns": { "type": "number", @@ -212,7 +208,7 @@ "title": "Correct", "inputType": "TextArea", "validators": [], - "help": "Correct feedback for this question", + "help": "Correct answer feedback for this question", "translatable": true }, "_incorrect": { @@ -227,7 +223,7 @@ "title": "Incorrect Final", "inputType": "TextArea", "validators": [], - "help": "Incorrect feedback for the final attempt", + "help": "Incorrect answer feedback for the final attempt", "translatable": true }, "notFinal": { @@ -237,7 +233,7 @@ "title": "Incorrect Not Final", "inputType": "TextArea", "validators": [], - "help": "Incorrect feedback for any attempt apart from the last attempt", + "help": "Incorrect answer feedback for any attempt apart from the last attempt. If you leave this blank, the 'Incorrect Final' feedback will be used instead.", "translatable": true } } @@ -253,7 +249,7 @@ "title": "Partly Correct Final", "inputType": "TextArea", "validators": [], - "help": "Partly correct feedback for the final attempt", + "help": "Partly correct answer feedback for the final attempt. If you leave this blank, the 'Incorrect Final' feedback will be used instead.", "translatable": true }, "notFinal": { @@ -263,7 +259,7 @@ "title": "Partly Correct Not Final", "inputType": "TextArea", "validators": [], - "help": "Partly correct feedback for any attempt apart from the last attempt", + "help": "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.", "translatable": true } } From ece32b4bcfb20a4b70c52d5f1ee9fc3d5ecf5b16 Mon Sep 17 00:00:00 2001 From: moloko Date: Wed, 14 Jun 2017 20:44:46 +0100 Subject: [PATCH 2/2] make spacing consistent --- properties.schema | 152 +++++++++++++++++++++++----------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/properties.schema b/properties.schema index acf60ec..0ee55b1 100644 --- a/properties.schema +++ b/properties.schema @@ -1,5 +1,5 @@ { - "type":"object", + "type": "object", "$schema": "http://json-schema.org/draft-04/schema", "id": "http://jsonschema.net", "$ref": "http://localhost/plugins/content/component/model.schema", @@ -13,7 +13,7 @@ "translatable": true } }, - "properties":{ + "properties": { "_supportedLayout": { "type": "string", "required": true, @@ -31,37 +31,37 @@ "translatable": true }, "_items": { - "type":"array", - "required":true, + "type": "array", + "required": true, "title": "Items", "items": { - "type":"object", - "required":true, - "properties":{ + "type": "object", + "required": true, + "properties": { "_graphic": { - "type":"object", - "required":true, + "type": "object", + "required": true, "title": "Graphic", - "properties":{ + "properties": { "large": { - "type":"string", - "required":true, + "type": "string", + "required": true, "default": "", "inputType": "Asset:image", "validators": [], "help": "Large image for this item - used on desktop" }, "small": { - "type":"string", - "required":true, + "type": "string", + "required": true, "default": "", "inputType": "Asset:image", "validators": [], "help": "Small image for this item - used on mobiles" }, "alt": { - "type":"string", - "required":false, + "type": "string", + "required": false, "default": "", "inputType": "Text", "validators": [], @@ -69,8 +69,8 @@ "translatable": true }, "attribution": { - "type":"string", - "required":false, + "type": "string", + "required": false, "default": "", "inputType": "Text", "validators": [], @@ -80,8 +80,8 @@ } }, "text": { - "type":"string", - "required":false, + "type": "string", + "required": false, "default": "", "title": "Item Text", "inputType": "Text", @@ -98,8 +98,8 @@ "validators": [] }, "feedback": { - "type":"string", - "required":false, + "type": "string", + "required": false, "default": "", "title": "Answer-specific feedback", "inputType": "Text", @@ -111,17 +111,17 @@ } }, "_attempts": { - "type":"number", - "required":true, - "default":1, + "type": "number", + "required": true, + "default": 1, "title": "Attempts", - "inputType":"Number", + "inputType": "Number", "validators": ["required", "number"], "help": "How many attempts the learner is allowed" }, "_canShowModelAnswer": { - "type":"boolean", - "required":true, + "type": "boolean", + "required": true, "default": true, "title": "Display Model Answer", "inputType": "Checkbox", @@ -129,8 +129,8 @@ "help": "Allow the user to view the 'model answer' if they answer the question incorrectly?" }, "_canShowFeedback": { - "type":"boolean", - "required":true, + "type": "boolean", + "required": true, "default": true, "title": "Display Feedback", "inputType": "Checkbox", @@ -144,8 +144,8 @@ "validators": [] }, "_shouldDisplayAttempts": { - "type":"boolean", - "required":false, + "type": "boolean", + "required": false, "default": false, "title": "Display Attempts", "inputType": "Checkbox", @@ -153,16 +153,16 @@ "help": "Display the number of attempts remaining?" }, "_isRandom": { - "type":"boolean", - "required":false, + "type": "boolean", + "required": false, "default": false, "title": "Randomise answers", "inputType": "Checkbox", "validators": [] }, "_questionWeight": { - "type":"number", - "required":false, + "type": "number", + "required": false, "default": 1, "title": "Question Weight", "inputType": "Number", @@ -170,8 +170,8 @@ "help": "How much this question is worth" }, "_recordInteraction": { - "type":"boolean", - "required":false, + "type": "boolean", + "required": false, "default": true, "title": "Record interaction", "inputType": "Checkbox", @@ -188,8 +188,8 @@ "help": "Set the number of columns. If value is '0', component uses the default layout." }, "_selectable": { - "type":"number", - "required":true, + "type": "number", + "required": true, "default": 1, "title": "Selectable Items", "inputType": "Number", @@ -197,12 +197,12 @@ "help": "How many items are selectable" }, "_feedback": { - "type":"object", + "type": "object", "required": false, "title": "Feedback", - "properties":{ + "properties": { "correct": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "Correct", @@ -212,12 +212,12 @@ "translatable": true }, "_incorrect": { - "type":"object", + "type": "object", "required": false, "title": "Incorrect Feedback", - "properties":{ + "properties": { "final": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "Incorrect Final", @@ -227,7 +227,7 @@ "translatable": true }, "notFinal": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "Incorrect Not Final", @@ -239,11 +239,11 @@ } }, "_partlyCorrect": { - "type":"object", - "required":false, - "properties":{ + "type": "object", + "required": false, + "properties": { "final": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "Partly Correct Final", @@ -253,7 +253,7 @@ "translatable": true }, "notFinal": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "Partly Correct Not Final", @@ -267,16 +267,16 @@ } }, "_buttons": { - "type":"object", + "type": "object", "title": "Buttons", "required": false, - "properties":{ + "properties": { "_submit": { - "type":"object", + "type": "object", "title": "Submit", - "properties":{ + "properties": { "buttonText": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -286,7 +286,7 @@ "translatable": true }, "ariaLabel": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -298,11 +298,11 @@ } }, "_reset": { - "type":"object", + "type": "object", "title": "Reset", - "properties":{ + "properties": { "buttonText": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -312,7 +312,7 @@ "translatable": true }, "ariaLabel": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -324,11 +324,11 @@ } }, "_showCorrectAnswer": { - "type":"object", + "type": "object", "title": "Show Correct Answer", - "properties":{ + "properties": { "buttonText": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -338,7 +338,7 @@ "translatable": true }, "ariaLabel": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -350,11 +350,11 @@ } }, "_hideCorrectAnswer": { - "type":"object", + "type": "object", "title": "Hide Correct Answer", - "properties":{ + "properties": { "buttonText": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -364,7 +364,7 @@ "translatable": true }, "ariaLabel": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -376,11 +376,11 @@ } }, "_showFeedback": { - "type":"object", + "type": "object", "title": "Show Feedback", - "properties":{ + "properties": { "buttonText": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -390,7 +390,7 @@ "translatable": true }, "ariaLabel": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "", @@ -402,7 +402,7 @@ } }, "remainingAttemptsText": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "Attempts Remaining Text", @@ -412,7 +412,7 @@ "translatable": true }, "remainingAttemptText": { - "type":"string", + "type": "string", "required": false, "default": "", "title": "Final Attempt Text",