From 54259d4babfb602f15932796c142e617e7a9411b Mon Sep 17 00:00:00 2001 From: brian-learningpool Date: Mon, 13 Oct 2014 16:44:45 +0100 Subject: [PATCH 1/9] Bumped version to 1.1.1 --- bower.json | 13 ++++++++++--- package.json | 10 +++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index 14f0f1d..aa302fc 100644 --- a/bower.json +++ b/bower.json @@ -1,15 +1,22 @@ { "name": "adapt-contrib-gmcq", - "version": "0.0.1", + "version": "1.1.1", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "authors": [ "Daryl Hedley " ], - "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", + "displayName" : "Graphical Multiple Choice Question", + "component" : "gmcq", + "assetFields" : [ + "_items[]._graphic.small", + "_items[]._graphic.medium", + "_items[]._graphic.large" + ], + "description": "A multiple choice question component, with images", "main": "/js/adapt-contrib-gmcq.js", "keywords": [ "adapt-plugin", "adapt-component" ], "license": "GPLv3" -} +} \ No newline at end of file diff --git a/package.json b/package.json index b4808ec..d2eed8d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "adapt-contrib-gmcq", - "version": "0.0.1", - "description": "Description of your component", + "version": "1.1.1", + "description": "A multiple choice question component, with images", "main": "", "scripts": { "test": "./node_modules/.bin/karma start --single-run --browsers PhantomJS" @@ -16,8 +16,8 @@ "url": "https://github.com/adaptlearning/adapt-contrib-gmcq/issues" }, "devDependencies": { - "karma": "~0.10", - "karma-mocha": "*", - "karma-expect": "*" + "karma": "0.10", + "karma-mocha": "0.1.0", + "karma-expect": "1.1.0" } } From be5ed98ba3849d378d9a91ddc4558ce75c582c28 Mon Sep 17 00:00:00 2001 From: Brian Quinn Date: Fri, 17 Oct 2014 16:36:54 +0100 Subject: [PATCH 2/9] Update properties.schema --- properties.schema | 85 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 20 deletions(-) diff --git a/properties.schema b/properties.schema index 07a10d6..6dc73b7 100644 --- a/properties.schema +++ b/properties.schema @@ -4,78 +4,110 @@ "id": "http://jsonschema.net", "$ref": "http://localhost/plugins/content/component/model.schema", "properties":{ + "instruction": { + "type":"string", + "title": "Instruction text" + }, "_attempts": { "type":"number", "required":true, - "default":1 + "default":1, + "minimum": 1, + "title": "Number of attempts" }, "_isRandom": { "type":"boolean", - "required":true + "required":true, + "default":false, + "title": "Random order" }, "_questionWeight": { "type":"number", - "required":false + "required":false, + "title":"Question weight" }, "_selectable": { "type":"number", - "required":true + "required":true, + "minimum": 1, + "default":1, + "title": "Number of items to select" }, "_buttons": { "type":"object", + "title": "Buttons", "properties":{ "hideCorrectAnswer": { - "type":"string" + "type":"string", + "title": "Hide correct answer button label" }, "reset": { - "type":"string" + "type":"string", + "title": "Reset button label" }, "showCorrectAnswer": { - "type":"string" + "type":"string", + "title": "Show correct answer button label" }, "submit": { - "type":"string" + "type":"string", + "title": "Submit button label" } } }, "_feedback": { "type":"object", "required":true, + "title": "Feedback text", "properties":{ "_incorrect": { "type":"object", "required":true, + "title": "Feedback for incorrect answers", "properties":{ "final": { - "type":"string" + "type":"string", + "required":true, + "minLength": 1, + "title": "Incorrect final answer" }, "notFinal": { - "type":"string" + "type":"string", + "title": "Incorrect non final answer" } } }, "_partlyCorrect": { "type":"object", "required":true, + "title": "Feedback when answer is partly correct", "properties":{ "final": { "type":"string", - "required":true + "required":true, + "title": "Partially correct final answer", + "minLength": 1 }, "notFinal": { - "type":"string" + "type":"string", + "title": "Partially correct non final answer" } } }, "correct": { "type":"string", - "required":true + "required":true, + "title": "Feedback for correct answer", + "minLength": 1 } } }, "_items": { "type":"array", "required":true, + "minItems": 1, + "maxItems": 8, + "title": "Answers", "items": { "type":"object", "required":true, @@ -83,36 +115,49 @@ "_graphic": { "type":"object", "required":true, + "title": "Graphic", "properties":{ "alt": { "type":"string", - "required":false + "required":false, + "title": "Alternative text" }, "large": { "type":"string", - "required":true + "required":true, + "title": "Large graphic asset", + "minLength": 1 }, "medium": { "type":"string", - "required":true + "required":true, + "title": "Medium size graphic asset", + "minLength": 1 }, "small": { "type":"string", - "required":true + "required":true, + "title": "Small graphic asset", + "minLength": 1 }, "title": { "type":"string", - "required":true + "required":true, + "title": "Graphic title", + "minLength": 1 } } }, "_shouldBeSelected": { "type":"boolean", - "required":true + "required":true, + "default":false, + "title": "Correct answer" }, "text": { "type":"string", - "required":false + "required":false, + "title": "Answer text" } } } From 870d8fa5d0e9f41728013165891d491224720e86 Mon Sep 17 00:00:00 2001 From: brian-learningpool Date: Tue, 21 Oct 2014 11:25:43 +0100 Subject: [PATCH 3/9] Bumped version to 1.1.2 --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index aa302fc..dd6155f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "1.1.1", + "version": "1.1.2", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "authors": [ "Daryl Hedley " diff --git a/package.json b/package.json index d2eed8d..df0c60c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "1.1.1", + "version": "1.1.2", "description": "A multiple choice question component, with images", "main": "", "scripts": { From 95cb9db71d2948198416ac681e25325831d2f71c Mon Sep 17 00:00:00 2001 From: brian-learningpool Date: Tue, 21 Oct 2014 11:28:09 +0100 Subject: [PATCH 4/9] Bumped version to 1.1.3 --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index dd6155f..fd5bbe9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "1.1.2", + "version": "1.1.3", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "authors": [ "Daryl Hedley " diff --git a/package.json b/package.json index df0c60c..23c2438 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "1.1.2", + "version": "1.1.3", "description": "A multiple choice question component, with images", "main": "", "scripts": { From 756e048380db1f098d1d748aeff639d0a79edf41 Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Tue, 18 Nov 2014 14:35:33 +0000 Subject: [PATCH 5/9] Schema updates --- properties.schema | 268 ++++++++++++++++++++++++++++------------------ 1 file changed, 163 insertions(+), 105 deletions(-) diff --git a/properties.schema b/properties.schema index 6dc73b7..fa74d11 100644 --- a/properties.schema +++ b/properties.schema @@ -4,161 +4,219 @@ "id": "http://jsonschema.net", "$ref": "http://localhost/plugins/content/component/model.schema", "properties":{ - "instruction": { - "type":"string", - "title": "Instruction text" + "instruction": { + "type": "string", + "required": false, + "default": "", + "inputType": "Text", + "validators": [], + "help": "This is the instruction text" }, - "_attempts": { + "_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" }, "_isRandom": { "type":"boolean", "required":true, - "default":false, - "title": "Random order" + "default": true, + "title": "Randomised Items", + "inputType": {"type": "Boolean", "options": [true, false]}, + "validators": [], + "help": "If set to 'true', all items will be randomised" }, "_questionWeight": { "type":"number", "required":false, - "title":"Question weight" + "default": 1, + "title": "Question Weight", + "inputType": "Number", + "validators": ["number"], + "help": "How much this question is worth" }, "_selectable": { "type":"number", "required":true, - "minimum": 1, - "default":1, - "title": "Number of items to select" + "default": 1, + "title": "Selectable Items", + "inputType": "Number", + "validators": ["number"], + "help": "How many items are selectable" }, - "_buttons": { - "type":"object", - "title": "Buttons", - "properties":{ - "hideCorrectAnswer": { - "type":"string", - "title": "Hide correct answer button label" - }, - "reset": { - "type":"string", - "title": "Reset button label" - }, - "showCorrectAnswer": { - "type":"string", - "title": "Show correct answer button label" - }, - "submit": { - "type":"string", - "title": "Submit button label" + "_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" + }, + "medium": { + "type":"string", + "required":true, + "default": "", + "inputType": "Asset:image", + "validators": [], + "help": "Medium image for this item - used on tablets" + }, + "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":"object", "required":true, - "title": "Feedback text", + "title": "Feedback", "properties":{ + "correct": { + "type":"string", + "required":true, + "default": "", + "title": "Correct", + "inputType": "TextArea", + "validators": ["required"], + "help": "Correct feedback for this question" + }, "_incorrect": { "type":"object", "required":true, - "title": "Feedback for incorrect answers", + "title": "Incorrect Feedback", "properties":{ "final": { "type":"string", - "required":true, - "minLength": 1, - "title": "Incorrect final answer" + "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" + "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":{ "final": { "type":"string", - "required":true, - "title": "Partially correct final answer", - "minLength": 1 + "required": true, + "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" + "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, - "title": "Feedback for correct answer", - "minLength": 1 } } }, - "_items": { - "type":"array", - "required":true, - "minItems": 1, - "maxItems": 8, - "title": "Answers", - "items": { - "type":"object", - "required":true, - "properties":{ - "_graphic": { - "type":"object", - "required":true, - "title": "Graphic", - "properties":{ - "alt": { - "type":"string", - "required":false, - "title": "Alternative text" - }, - "large": { - "type":"string", - "required":true, - "title": "Large graphic asset", - "minLength": 1 - }, - "medium": { - "type":"string", - "required":true, - "title": "Medium size graphic asset", - "minLength": 1 - }, - "small": { - "type":"string", - "required":true, - "title": "Small graphic asset", - "minLength": 1 - }, - "title": { - "type":"string", - "required":true, - "title": "Graphic title", - "minLength": 1 - } - } - }, - "_shouldBeSelected": { - "type":"boolean", - "required":true, - "default":false, - "title": "Correct answer" - }, - "text": { - "type":"string", - "required":false, - "title": "Answer text" - } + "_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" } } } From 5ead99fce2524a14c2ac2d3f8654ac00d827049d Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Tue, 18 Nov 2014 14:36:06 +0000 Subject: [PATCH 6/9] Revert "Schema updates" This reverts commit 756e048380db1f098d1d748aeff639d0a79edf41. --- properties.schema | 268 ++++++++++++++++++---------------------------- 1 file changed, 105 insertions(+), 163 deletions(-) diff --git a/properties.schema b/properties.schema index fa74d11..6dc73b7 100644 --- a/properties.schema +++ b/properties.schema @@ -4,219 +4,161 @@ "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" + "instruction": { + "type":"string", + "title": "Instruction text" }, - "_attempts": { + "_attempts": { "type":"number", "required":true, "default":1, - "title": "Attempts", - "inputType":"Number", - "validators": ["required", "number"], - "help": "How many attempts the learner is allow" + "minimum": 1, + "title": "Number of attempts" }, "_isRandom": { "type":"boolean", "required":true, - "default": true, - "title": "Randomised Items", - "inputType": {"type": "Boolean", "options": [true, false]}, - "validators": [], - "help": "If set to 'true', all items will be randomised" + "default":false, + "title": "Random order" }, "_questionWeight": { "type":"number", "required":false, - "default": 1, - "title": "Question Weight", - "inputType": "Number", - "validators": ["number"], - "help": "How much this question is worth" + "title":"Question weight" }, "_selectable": { "type":"number", "required":true, - "default": 1, - "title": "Selectable Items", - "inputType": "Number", - "validators": ["number"], - "help": "How many items are selectable" + "minimum": 1, + "default":1, + "title": "Number of items to select" }, - "_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" - }, - "medium": { - "type":"string", - "required":true, - "default": "", - "inputType": "Asset:image", - "validators": [], - "help": "Medium image for this item - used on tablets" - }, - "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" - } + "_buttons": { + "type":"object", + "title": "Buttons", + "properties":{ + "hideCorrectAnswer": { + "type":"string", + "title": "Hide correct answer button label" + }, + "reset": { + "type":"string", + "title": "Reset button label" + }, + "showCorrectAnswer": { + "type":"string", + "title": "Show correct answer button label" + }, + "submit": { + "type":"string", + "title": "Submit button label" } } }, "_feedback": { "type":"object", "required":true, - "title": "Feedback", + "title": "Feedback text", "properties":{ - "correct": { - "type":"string", - "required":true, - "default": "", - "title": "Correct", - "inputType": "TextArea", - "validators": ["required"], - "help": "Correct feedback for this question" - }, "_incorrect": { "type":"object", "required":true, - "title": "Incorrect Feedback", + "title": "Feedback for incorrect answers", "properties":{ "final": { "type":"string", - "required": true, - "default": "", - "title": "Incorrect Final", - "inputType": "TextArea", - "validators": ["required"], - "help": "Incorrect feedback for the final attempt" + "required":true, + "minLength": 1, + "title": "Incorrect final answer" }, "notFinal": { "type":"string", - "required": true, - "default": "", - "title": "Incorrect Not Final", - "inputType": "TextArea", - "validators": ["required"], - "help": "Incorrect feedback for any attempt apart from the last attempt" + "title": "Incorrect non final answer" } } }, "_partlyCorrect": { "type":"object", "required":true, + "title": "Feedback when answer is partly correct", "properties":{ "final": { "type":"string", - "required": true, - "default": "", - "title": "Partly Correct Final", - "inputType": "TextArea", - "validators": ["required"], - "help": "Partly correct feedback for the final attempt" + "required":true, + "title": "Partially correct final answer", + "minLength": 1 }, "notFinal": { "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" + "title": "Partially correct non final answer" } } + }, + "correct": { + "type":"string", + "required":true, + "title": "Feedback for correct answer", + "minLength": 1 } } }, - "_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" + "_items": { + "type":"array", + "required":true, + "minItems": 1, + "maxItems": 8, + "title": "Answers", + "items": { + "type":"object", + "required":true, + "properties":{ + "_graphic": { + "type":"object", + "required":true, + "title": "Graphic", + "properties":{ + "alt": { + "type":"string", + "required":false, + "title": "Alternative text" + }, + "large": { + "type":"string", + "required":true, + "title": "Large graphic asset", + "minLength": 1 + }, + "medium": { + "type":"string", + "required":true, + "title": "Medium size graphic asset", + "minLength": 1 + }, + "small": { + "type":"string", + "required":true, + "title": "Small graphic asset", + "minLength": 1 + }, + "title": { + "type":"string", + "required":true, + "title": "Graphic title", + "minLength": 1 + } + } + }, + "_shouldBeSelected": { + "type":"boolean", + "required":true, + "default":false, + "title": "Correct answer" + }, + "text": { + "type":"string", + "required":false, + "title": "Answer text" + } } } } From 266dc8c1d04beb6848ea083dee444717b8df6b96 Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Tue, 18 Nov 2014 14:36:44 +0000 Subject: [PATCH 7/9] Schema updates --- properties.schema | 268 ++++++++++++++++++++++++++++------------------ 1 file changed, 163 insertions(+), 105 deletions(-) diff --git a/properties.schema b/properties.schema index 6dc73b7..fa74d11 100644 --- a/properties.schema +++ b/properties.schema @@ -4,161 +4,219 @@ "id": "http://jsonschema.net", "$ref": "http://localhost/plugins/content/component/model.schema", "properties":{ - "instruction": { - "type":"string", - "title": "Instruction text" + "instruction": { + "type": "string", + "required": false, + "default": "", + "inputType": "Text", + "validators": [], + "help": "This is the instruction text" }, - "_attempts": { + "_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" }, "_isRandom": { "type":"boolean", "required":true, - "default":false, - "title": "Random order" + "default": true, + "title": "Randomised Items", + "inputType": {"type": "Boolean", "options": [true, false]}, + "validators": [], + "help": "If set to 'true', all items will be randomised" }, "_questionWeight": { "type":"number", "required":false, - "title":"Question weight" + "default": 1, + "title": "Question Weight", + "inputType": "Number", + "validators": ["number"], + "help": "How much this question is worth" }, "_selectable": { "type":"number", "required":true, - "minimum": 1, - "default":1, - "title": "Number of items to select" + "default": 1, + "title": "Selectable Items", + "inputType": "Number", + "validators": ["number"], + "help": "How many items are selectable" }, - "_buttons": { - "type":"object", - "title": "Buttons", - "properties":{ - "hideCorrectAnswer": { - "type":"string", - "title": "Hide correct answer button label" - }, - "reset": { - "type":"string", - "title": "Reset button label" - }, - "showCorrectAnswer": { - "type":"string", - "title": "Show correct answer button label" - }, - "submit": { - "type":"string", - "title": "Submit button label" + "_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" + }, + "medium": { + "type":"string", + "required":true, + "default": "", + "inputType": "Asset:image", + "validators": [], + "help": "Medium image for this item - used on tablets" + }, + "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":"object", "required":true, - "title": "Feedback text", + "title": "Feedback", "properties":{ + "correct": { + "type":"string", + "required":true, + "default": "", + "title": "Correct", + "inputType": "TextArea", + "validators": ["required"], + "help": "Correct feedback for this question" + }, "_incorrect": { "type":"object", "required":true, - "title": "Feedback for incorrect answers", + "title": "Incorrect Feedback", "properties":{ "final": { "type":"string", - "required":true, - "minLength": 1, - "title": "Incorrect final answer" + "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" + "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":{ "final": { "type":"string", - "required":true, - "title": "Partially correct final answer", - "minLength": 1 + "required": true, + "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" + "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, - "title": "Feedback for correct answer", - "minLength": 1 } } }, - "_items": { - "type":"array", - "required":true, - "minItems": 1, - "maxItems": 8, - "title": "Answers", - "items": { - "type":"object", - "required":true, - "properties":{ - "_graphic": { - "type":"object", - "required":true, - "title": "Graphic", - "properties":{ - "alt": { - "type":"string", - "required":false, - "title": "Alternative text" - }, - "large": { - "type":"string", - "required":true, - "title": "Large graphic asset", - "minLength": 1 - }, - "medium": { - "type":"string", - "required":true, - "title": "Medium size graphic asset", - "minLength": 1 - }, - "small": { - "type":"string", - "required":true, - "title": "Small graphic asset", - "minLength": 1 - }, - "title": { - "type":"string", - "required":true, - "title": "Graphic title", - "minLength": 1 - } - } - }, - "_shouldBeSelected": { - "type":"boolean", - "required":true, - "default":false, - "title": "Correct answer" - }, - "text": { - "type":"string", - "required":false, - "title": "Answer text" - } + "_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" } } } From dd96404481fd29e92eaa242f777e163d1d98b5e1 Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Tue, 18 Nov 2014 15:21:05 +0000 Subject: [PATCH 8/9] Spelling hiccups --- properties.schema | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/properties.schema b/properties.schema index fa74d11..b8edb00 100644 --- a/properties.schema +++ b/properties.schema @@ -19,7 +19,7 @@ "title": "Attempts", "inputType":"Number", "validators": ["required", "number"], - "help": "How many attempts the learner is allow" + "help": "How many attempts the learner is allowed" }, "_isRandom": { "type":"boolean", @@ -208,7 +208,7 @@ "default": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text so show the model answer" + "help": "Button label text to show the model answer" }, "hideCorrectAnswer": { "type":"string", @@ -216,7 +216,7 @@ "default": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text so hide the model answer" + "help": "Button label text to hide the model answer" } } } From d6b5cb13434689f455c0d56b74fea6fca42a2d10 Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Wed, 21 Jan 2015 14:48:20 +0000 Subject: [PATCH 9/9] Adds support for _supportedLayout fixes #63 --- bower.json | 2 +- package.json | 2 +- properties.schema | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index fd5bbe9..f12bd07 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "1.1.3", + "version": "1.1.5", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "authors": [ "Daryl Hedley " diff --git a/package.json b/package.json index 23c2438..3ec9d35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "1.1.3", + "version": "1.1.5", "description": "A multiple choice question component, with images", "main": "", "scripts": { diff --git a/properties.schema b/properties.schema index b8edb00..8fea85d 100644 --- a/properties.schema +++ b/properties.schema @@ -4,6 +4,13 @@ "id": "http://jsonschema.net", "$ref": "http://localhost/plugins/content/component/model.schema", "properties":{ + "_supportedLayout": { + "type": "string", + "required": true, + "enum": ["full-width", "half-width", "both"], + "default": "both", + "editorOnly": true + }, "instruction": { "type": "string", "required": false,