Skip to content

Commit

Permalink
Added 'translatable' to properties.schema
Browse files Browse the repository at this point in the history
This is in preparation for multi-language support.  Also added "_canShowFeedback" property and repositioned the "_items" property.
  • Loading branch information
brian-learningpool committed May 23, 2016
1 parent fbccc60 commit 0bf739d
Showing 1 changed file with 119 additions and 88 deletions.
207 changes: 119 additions & 88 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -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":{
Expand All @@ -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",
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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
}
}
},
Expand All @@ -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",
Expand All @@ -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
}
}
}
Expand All @@ -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",
Expand All @@ -259,7 +279,8 @@
"title": "",
"inputType": "Text",
"validators": [],
"help": "Aria label for the submit button"
"help": "Aria label for the submit button",
"translatable": true
}
}
},
Expand All @@ -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",
Expand All @@ -283,7 +305,8 @@
"title": "",
"inputType": "Text",
"validators": [],
"help": "Aria label for the reset button"
"help": "Aria label for the reset button",
"translatable": true
}
}
},
Expand All @@ -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",
Expand All @@ -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
}
}
},
Expand All @@ -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",
Expand All @@ -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
}
}
},
Expand All @@ -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",
Expand All @@ -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
}
}
},
Expand All @@ -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",
Expand All @@ -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
}
}
}
Expand Down

0 comments on commit 0bf739d

Please sign in to comment.