Skip to content

Commit

Permalink
Merge pull request #11 from adaptlearning/json-schema
Browse files Browse the repository at this point in the history
JSON schema
  • Loading branch information
darylhedley committed Apr 29, 2014
2 parents b9b7692 + dd23c06 commit 83ac2b2
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 5 deletions.
9 changes: 6 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "adapt-contrib-slider",
"version": "0.0.1",
"version": "0.0.2",
"homepage": "https://github.com/adaptlearning/adapt-contrib-slider",
"authors": [
"Daryl Hedley <[email protected]>"
"Daryl Hedley <[email protected]>",
"Dan Gray <[email protected]>"
],
"description": "A question component that allows the learner to position a slider on scale",
"description": "A question component that allows the learner to position a slider on a scale",
"main": "/js/adapt-contrib-slider.js",
"displayName" : "Slider",
"component" : "slider",
"keywords": [
"adapt-plugin",
"adapt-component"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapt-contrib-slider",
"version": "0.0.1",
"version": "0.0.2",
"description": "A question component that allows the learner to position a slider on scale",
"main": "",
"scripts": {
Expand All @@ -16,7 +16,7 @@
"url": "https://github.com/adaptlearning/adapt-contrib-slider/issues"
},
"devDependencies": {
"karma": "~0.9",
"karma": "~0.10",
"karma-mocha": "*",
"karma-expect": "*"
}
Expand Down
98 changes: 98 additions & 0 deletions properties.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"id": "http://jsonschema.net",
"$ref": "http://localhost/plugins/content/component/model.schema",
"properties":{
"_attempts": {
"type":"number",
"required":true,
"default":1
},
"_correctAnswer": {
"type":"number"
},
"_correctRange": {
"type":"object",
"properties":{
"bottom": {
"type":"number",
"required":true
},
"top": {
"type":"number",
"required":true
}
}
},
"_questionWeight": {
"type":"number",
"required":false
},
"_scaleEnd": {
"type":"number",
"required":true
},
"_scaleStart": {
"type":"number",
"required":true
},
"_showNumber": {
"type":"boolean",
"required":true
},
"_showScaleIndicator": {
"type":"boolean",
"required":true
},
"button": {
"type":"object",
"required":true,
"properties":{
"model": {
"type":"string",
"required":true,
"default" : "Model Answer"
},
"reset": {
"type":"string",
"default" : "Reset"
},
"submit": {
"type":"string",
"required":true,
"default" : "Submit"
},
"user": {
"type":"string",
"required":true,
"default" : "My Answer"
}
}
},
"feedback": {
"type":"object",
"required":true,
"properties":{
"correct": {
"type":"string",
"required":true
},
"incorrect": {
"type":"string",
"required":true
},
"partly": {
"type":"string",
"required":true
}
}
},
"labelEnd": {
"type":"string"
},
"labelStart": {
"type":"string"
}
}
}

0 comments on commit 83ac2b2

Please sign in to comment.