Skip to content

Commit

Permalink
Merge pull request #32 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 365fa75 + 3d40704 commit e64fd17
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 5 deletions.
6 changes: 4 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "adapt-contrib-mcq",
"version": "0.0.1",
"version": "0.0.2",
"homepage": "https://github.com/adaptlearning/adapt-contrib-mcq",
"authors": [
"Daryl Hedley <[email protected]>"
],
"description": "Please enter a description about your component here. This is what will get shown when registered with the Adapt registry so make it good",
"description": "An Adapt core multiple choice question.",
"main": "/js/adapt-contrib-mcq.js",
"displayName" : "Multiple Choice Question",
"component" : "mcq",
"keywords": [
"adapt-plugin",
"adapt-component"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "adapt-contrib-mcq",
"version": "0.0.1",
"description": "Description of your component",
"version": "0.0.2",
"description": "An Adapt core multiple choice question",
"main": "",
"scripts": {
"test": "./node_modules/.bin/karma start --single-run --browsers PhantomJS"
Expand All @@ -16,7 +16,7 @@
"url": "https://github.com/adaptlearning/adapt-contrib-mcq/issues"
},
"devDependencies": {
"karma": "~0.9",
"karma": "~0.10",
"karma-mocha": "*",
"karma-expect": "*"
}
Expand Down
88 changes: 88 additions & 0 deletions properties.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"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
},
"_isRandom": {
"type":"boolean",
"required":true
},
"_questionWeight": {
"type":"number",
"required":false
},
"_selectable": {
"type":"number",
"required":true
},
"buttons": {
"type":"object",
"required":false,
"properties":{
"hideCorrectAnswer": {
"type":"string",
"required":false,
"default":"Your Answer"
},
"reset": {
"type":"string",
"required":false,
"default":"Reset"
},
"showCorrectAnswer": {
"type":"string",
"required":false,
"default":"Model Answer"
},
"submit": {
"type":"string",
"required":false,
"default":"Submit"
}
}
},
"feedback": {
"type":"object",
"required":true,
"properties":{
"correct": {
"type":"string",
"required":true
},
"incorrect": {
"type":"string",
"required":true
},
"partly": {
"type":"string",
"required":true
}
}
},
"items": {
"type":"array",
"required":true,
"items":
{
"type":"object",
"required":true,
"properties":{
"shouldBeSelected": {
"type":"boolean",
"required":true
},
"text": {
"type":"string",
"required":true
}
}
}
}
}
}

0 comments on commit e64fd17

Please sign in to comment.