Skip to content

Commit

Permalink
Merge pull request #52 from adaptlearning/schema-update-backbone-forms
Browse files Browse the repository at this point in the history
Schema updates
  • Loading branch information
darylhedley committed Nov 18, 2014
2 parents 9269c58 + 14cc145 commit 27cce9b
Showing 1 changed file with 144 additions and 86 deletions.
230 changes: 144 additions & 86 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -4,142 +4,200 @@
"id": "http://jsonschema.net",
"$ref": "http://localhost/plugins/content/component/model.schema",
"properties":{
"instruction": {
"type": "string",
"required": false,
"default": "",
"inputType": "Text",
"validators": [],
"help": "This is the instruction text"
},
"_attempts": {
"type":"number",
"required":true,
"default":1,
"minimum":1,
"title": "Number of attempts"
"title": "Attempts",
"inputType":"Number",
"validators": ["required", "number"],
"help": "How many attempts the learner is allow"
},
"_questionWeight": {
"type":"number",
"required":false,
"default": 1,
"title": "Question Weight",
"inputType": "Number",
"validators": ["number"],
"help": "How much this question is worth"
},
"_scaleStart": {
"type":"number",
"required":true,
"default": 1,
"title": "Scale Start",
"inputType": "Number",
"validators": ["required", "number"],
"help": "What number the scale should start on"
},
"_scaleEnd": {
"type":"number",
"required":true,
"default": 1,
"title": "Scale End",
"inputType": "Number",
"validators": ["required", "number"],
"help": "What number the scale should end on"
},
"_correctAnswer": {
"type":"string",
"title": "Single correct answer"
"type":"number",
"default": 1,
"title": "Correct Answer",
"inputType": "Number",
"validators": ["required", "number"],
"help": "Correct answer on the scale"
},
"_correctRange": {
"type":"object",
"title": "Correct answer range",
"properties":{
"_bottom": {
"type":"number",
"title": "Correct answer range start"
"default": 1,
"title": "Correct Range - Bottom",
"inputType": "Number",
"validators": ["number"],
"help": "Correct bottom range answer on the scale"
},
"_top": {
"type":"number",
"title": "Correct answer range end"
"default": 1,
"title": "Correct Range - Top",
"inputType": "Number",
"validators": ["number"],
"help": "Correct top range answer on the scale"
}
}
},
"_questionWeight": {
"type":"number",
"title": "Question weight"
},
"_scaleEnd": {
"type":"number",
"required":true,
"default":10,
"minimum":1,
"title": "Scale end"
},
"_scaleStart": {
"type":"number",
"required":true,
"default":1,
"minimum":1,
"title": "Scale start"
},
"_showNumber": {
"type":"boolean",
"required":true,
"title": "Show number scale"
"default": true,
"title": "Show numbers on scale",
"inputType": {"type": "Boolean", "options": [true, false]},
"validators": [],
"help": "Select 'true' to show the numbers along the scale"
},
"_showScaleIndicator": {
"type":"boolean",
"required":true,
"title": "Show scale position indicator"
"default": true,
"title": "Show scale indicators",
"inputType": {"type": "Boolean", "options": [true, false]},
"validators": [],
"help": "Select 'true' to show the lines along the scale"
},
"_buttons": {
"_feedback": {
"type":"object",
"required":true,
"title": "Buttons",
"title": "Feedback",
"properties":{
"model": {
"type":"string",
"required":true,
"minLength": 1,
"title": "Model answer button label"
},
"reset": {
"type":"string",
"required":true,
"minLength": 1,
"title": "Reset button label"
},
"submit": {
"correct": {
"type":"string",
"required":true,
"minLength": 1,
"title": "Submit button label"
"default": "",
"title": "Correct",
"inputType": "TextArea",
"validators": ["required"],
"help": "Correct feedback for this question"
},
"user": {
"type":"string",
"required":true,
"minLength": 1,
"title": "User answer button label"
}
}
},
"_feedback": {
"type": "object",
"required":true,
"title": "Feedback text",
"properties" : {
"_incorrect": {
"type":"object",
"required": true,
"title": "Feedback for incorrect answers",
"properties": {
"required":true,
"title": "Incorrect Feedback",
"properties":{
"final": {
"type": "string",
"title": "Incorrect final answer"
"type":"string",
"required": true,
"default": "",
"title": "Incorrect Final",
"inputType": "TextArea",
"validators": ["required"],
"help": "Incorrect feedback for the final attempt"
},
"notFinal": {
"type": "string",
"title": "Incorrect non final answer"
"type":"string",
"required": true,
"default": "",
"title": "Incorrect Not Final",
"inputType": "TextArea",
"validators": ["required"],
"help": "Incorrect feedback for any attempt apart from the last attempt"
}
}
},
"_partlyCorrect": {
"type": "object",
"required": true,
"title": "Feedback when answer is partly correct",
"properties": {
"type":"object",
"required":true,
"properties":{
"final": {
"type": "string",
"type":"string",
"required": true,
"minLength": 1,
"title": "Partially correct final answer"
"default": "",
"title": "Partly Correct Final",
"inputType": "TextArea",
"validators": ["required"],
"help": "Partly correct feedback for the final attempt"
},
"notFinal": {
"type": "string",
"title": "Partially correct non final answer"
"type":"string",
"required": true,
"default": "",
"title": "Partly Correct Not Final",
"inputType": "TextArea",
"validators": ["required"],
"help": "Partly correct feedback for any attempt apart from the last attempt"
}
}
},
"correct": {
"type": "string",
"required": true,
"minLength": 1,
"title": "Feedback for correct answer"
}
}
},
"labelEnd": {
"type": "string",
"title": "Slider scale end label"
},
"labelStart": {
"type": "string",
"title": "Slider scale start label"
"_buttons": {
"type":"object",
"title": "Buttons",
"required": false,
"properties":{
"submit": {
"type":"string",
"required": false,
"default": "",
"inputType": "QuestionButton",
"validators": [],
"help": "Button label text for the submit button"
},
"reset": {
"type":"string",
"required": false,
"default": "",
"inputType": "QuestionButton",
"validators": [],
"help": "Button label text for the reset button"
},
"showCorrectAnswer": {
"type":"string",
"required": false,
"default": "",
"inputType": "QuestionButton",
"validators": [],
"help": "Button label text so show the model answer"
},
"hideCorrectAnswer": {
"type":"string",
"required": false,
"default": "",
"inputType": "QuestionButton",
"validators": [],
"help": "Button label text so hide the model answer"
}
}
}
}
}

0 comments on commit 27cce9b

Please sign in to comment.