From 0bf739d94b5742fc6b4899f523a5bd83902218fb Mon Sep 17 00:00:00 2001 From: Brian Quinn Date: Mon, 23 May 2016 15:27:03 +0100 Subject: [PATCH] Added 'translatable' to properties.schema This is in preparation for multi-language support. Also added "_canShowFeedback" property and repositioned the "_items" property. --- properties.schema | 207 ++++++++++++++++++++++++++-------------------- 1 file changed, 119 insertions(+), 88 deletions(-) diff --git a/properties.schema b/properties.schema index 5abf8b0..5dff3ee 100644 --- a/properties.schema +++ b/properties.schema @@ -9,7 +9,8 @@ "required": true, "default": "This component is a graphical multiple choice question. Once you have selected an option select the submit button below.", "inputType": "Text", - "validators": [] + "validators": [], + "translatable": true } }, "properties":{ @@ -26,7 +27,80 @@ "default": "", "inputType": "Text", "validators": [], - "help": "This is the instruction text" + "help": "This is the instruction text", + "translatable": true + }, + "_items": { + "type":"array", + "required":true, + "title": "Items", + "items": { + "type":"object", + "required":true, + "properties":{ + "_graphic": { + "type":"object", + "required":true, + "title": "Graphic", + "properties":{ + "large": { + "type":"string", + "required":true, + "default": "", + "inputType": "Asset:image", + "validators": [], + "help": "Large image for this item - used on desktop" + }, + "small": { + "type":"string", + "required":true, + "default": "", + "inputType": "Asset:image", + "validators": [], + "help": "Small image for this item - used on mobiles" + }, + "alt": { + "type":"string", + "required":false, + "default": "", + "inputType": "Text", + "validators": [], + "help": "Alternative text for this items image", + "translatable": true + } + } + }, + "text": { + "type":"string", + "required":false, + "default": "", + "title": "Item Text", + "inputType": "Text", + "validators": [], + "help": "This text will display with the image", + "translatable": true + }, + "_shouldBeSelected": { + "type":"boolean", + "required":true, + "default": true, + "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" + }, + "feedback": { + "type":"string", + "required":false, + "default": "", + "title": "Option Specific Feedback", + "inputType": "Text", + "validators": [], + "help": "This text will be displayed as feedback if there is only one selectable item for this component", + "translatable": true + } + } + } }, "_attempts": { "type":"number", @@ -46,6 +120,15 @@ "validators": [], "help": "Select 'true' to allow the user to view the 'model answer' should 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" + }, "_shouldDisplayAttempts": { "type":"boolean", "required":false, @@ -100,75 +183,6 @@ "validators": ["number", "required"], "help": "How many items are selectable" }, - "_items": { - "type":"array", - "required":true, - "title": "Items", - "items": { - "type":"object", - "required":true, - "properties":{ - "_graphic": { - "type":"object", - "required":true, - "title": "Graphic", - "properties":{ - "large": { - "type":"string", - "required":true, - "default": "", - "inputType": "Asset:image", - "validators": [], - "help": "Large image for this item - used on desktop" - }, - "small": { - "type":"string", - "required":true, - "default": "", - "inputType": "Asset:image", - "validators": [], - "help": "Small image for this item - used on mobiles" - }, - "alt": { - "type":"string", - "required":false, - "default": "", - "inputType": "Text", - "validators": [], - "help": "Alternative text for this items image" - } - } - }, - "text": { - "type":"string", - "required":false, - "default": "", - "title": "Item Text", - "inputType": "Text", - "validators": [], - "help": "This text will display with the image" - }, - "_shouldBeSelected": { - "type":"boolean", - "required":true, - "default": true, - "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" - }, - "feedback": { - "type":"string", - "required":false, - "default": "", - "title": "Option Specific Feedback", - "inputType": "Text", - "validators": [], - "help": "This text will be displayed as feedback if there is only one selectable item for this component" - } - } - } - }, "_feedback": { "type":"object", "required":true, @@ -181,7 +195,8 @@ "title": "Correct", "inputType": "TextArea", "validators": ["required"], - "help": "Correct feedback for this question" + "help": "Correct feedback for this question", + "translatable": true }, "_incorrect": { "type":"object", @@ -195,7 +210,8 @@ "title": "Incorrect Final", "inputType": "TextArea", "validators": ["required"], - "help": "Incorrect feedback for the final attempt" + "help": "Incorrect feedback for the final attempt", + "translatable": true }, "notFinal": { "type":"string", @@ -204,7 +220,8 @@ "title": "Incorrect Not Final", "inputType": "TextArea", "validators": [], - "help": "Incorrect feedback for any attempt apart from the last attempt" + "help": "Incorrect feedback for any attempt apart from the last attempt", + "translatable": true } } }, @@ -219,7 +236,8 @@ "title": "Partly Correct Final", "inputType": "TextArea", "validators": [], - "help": "Partly correct feedback for the final attempt" + "help": "Partly correct feedback for the final attempt", + "translatable": true }, "notFinal": { "type":"string", @@ -228,7 +246,8 @@ "title": "Partly Correct Not Final", "inputType": "TextArea", "validators": [], - "help": "Partly correct feedback for any attempt apart from the last attempt" + "help": "Partly correct feedback for any attempt apart from the last attempt", + "translatable": true } } } @@ -250,7 +269,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text for the submit button" + "help": "Button label text for the submit button", + "translatable": true }, "ariaLabel": { "type":"string", @@ -259,7 +279,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the submit button" + "help": "Aria label for the submit button", + "translatable": true } } }, @@ -274,7 +295,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text for the reset button" + "help": "Button label text for the reset button", + "translatable": true }, "ariaLabel": { "type":"string", @@ -283,7 +305,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the reset button" + "help": "Aria label for the reset button", + "translatable": true } } }, @@ -298,7 +321,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text to show the model answer" + "help": "Button label text to show the model answer", + "translatable": true }, "ariaLabel": { "type":"string", @@ -307,7 +331,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the show model answer button" + "help": "Aria label for the show model answer button", + "translatable": true } } }, @@ -322,7 +347,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text to hide the model answer" + "help": "Button label text to hide the model answer", + "translatable": true }, "ariaLabel": { "type":"string", @@ -331,7 +357,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the hide model answer button" + "help": "Aria label for the hide model answer button", + "translatable": true } } }, @@ -346,7 +373,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text to show feedback" + "help": "Button label text to show feedback", + "translatable": true }, "ariaLabel": { "type":"string", @@ -355,7 +383,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the show feedback button" + "help": "Aria label for the show feedback button", + "translatable": true } } }, @@ -366,7 +395,8 @@ "title": "Attempts Remaining Text", "inputType": "Text", "validators": [], - "help": "Shown when there are multiple attempts left" + "help": "Shown when there are multiple attempts left", + "translatable": true }, "remainingAttemptText": { "type":"string", @@ -375,7 +405,8 @@ "title": "Final Attempt Text", "inputType": "Text", "validators": [], - "help": "Shown when there is one attempt left" + "help": "Shown when there is one attempt left", + "translatable": true } } }