From 402220cadc191b5f35e7bb66ed3d4c60f19811bb Mon Sep 17 00:00:00 2001 From: brian-learningpool Date: Mon, 13 Oct 2014 16:38:00 +0100 Subject: [PATCH 1/8] Bumped version to 1.1.1 --- bower.json | 8 +++++--- package.json | 12 ++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/bower.json b/bower.json index 4f9ab83..6ed209e 100644 --- a/bower.json +++ b/bower.json @@ -1,15 +1,17 @@ { "name": "adapt-contrib-mcq", - "version": "0.0.1", + "version": "1.1.1", "homepage": "https://github.com/adaptlearning/adapt-contrib-mcq", "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" : "Multiple Choice Question", + "component" : "mcq", + "description": "A multiple choice question component", "main": "/js/adapt-contrib-mcq.js", "keywords": [ "adapt-plugin", "adapt-component" ], "license": "GPLv3" -} +} \ No newline at end of file diff --git a/package.json b/package.json index f52e940..c57be1c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "adapt-contrib-mcq", - "version": "0.0.1", - "description": "Description of your component", + "version": "1.1.1", + "description": "A multiple choice question component", "main": "", "scripts": { "test": "./node_modules/.bin/karma start --single-run --browsers PhantomJS" @@ -16,8 +16,8 @@ "url": "https://github.com/adaptlearning/adapt-contrib-mcq/issues" }, "devDependencies": { - "karma": "~0.10", - "karma-mocha": "*", - "karma-expect": "*" + "karma": "0.10", + "karma-mocha": "0.1.0", + "karma-expect": "1.1.0" } -} +} \ No newline at end of file From ac58da0d039a21205e4fb978d8e2b79e767f203d Mon Sep 17 00:00:00 2001 From: brian-learningpool Date: Mon, 13 Oct 2014 16:48:04 +0100 Subject: [PATCH 2/8] 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 6ed209e..cbed37d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-mcq", - "version": "1.1.1", + "version": "1.1.2", "homepage": "https://github.com/adaptlearning/adapt-contrib-mcq", "authors": [ "Daryl Hedley " diff --git a/package.json b/package.json index c57be1c..f0ea9b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-mcq", - "version": "1.1.1", + "version": "1.1.2", "description": "A multiple choice question component", "main": "", "scripts": { From 9895681e312b5650747b56d2b7b85e1fc8f3baf3 Mon Sep 17 00:00:00 2001 From: Brian Quinn Date: Fri, 17 Oct 2014 16:29:18 +0100 Subject: [PATCH 3/8] Update properties.schema --- properties.schema | 62 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 17 deletions(-) diff --git a/properties.schema b/properties.schema index 4e2a0ea..f2c84d6 100644 --- a/properties.schema +++ b/properties.schema @@ -7,87 +7,115 @@ "_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, + "title": "Selectable answers" }, "_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, + "minLength": 1, + "title": "Partially correct final answer" }, "notFinal": { - "type":"string" + "type":"string", + "title": "Partially correct non final answer" } } }, "correct": { "type":"string", - "required":true + "required":true, + "minLength": 1, + "title": "Feedback for correct answer" } } }, - "items": { + "_items": { "type":"array", "required":true, + "title": "Question answers", "items": { "type":"object", "required":true, "properties":{ - "shouldBeSelected": { + "_shouldBeSelected": { "type":"boolean", - "required":true + "required":true, + "title": "Correct answer" }, "text": { "type":"string", - "required":true + "required":true, + "minLength": 1, + "title": "Answer text" } } } From 330d064b0e1a11aeb8949f250810f95a981afe67 Mon Sep 17 00:00:00 2001 From: brian-learningpool Date: Tue, 21 Oct 2014 10:04:03 +0100 Subject: [PATCH 4/8] Bumped version to 1.1.3 This is to support the Adapt Builder. --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index cbed37d..20845e3 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-mcq", - "version": "1.1.2", + "version": "1.1.3", "homepage": "https://github.com/adaptlearning/adapt-contrib-mcq", "authors": [ "Daryl Hedley " diff --git a/package.json b/package.json index f0ea9b6..451931d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-mcq", - "version": "1.1.2", + "version": "1.1.3", "description": "A multiple choice question component", "main": "", "scripts": { From 721226776a8b9c5dfb62572b772f016136ac71b2 Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Tue, 18 Nov 2014 14:49:06 +0000 Subject: [PATCH 5/8] Updates to schema --- properties.schema | 189 ++++++++++++++++++++++++++++++---------------- 1 file changed, 125 insertions(+), 64 deletions(-) diff --git a/properties.schema b/properties.schema index f2c84d6..d846172 100644 --- a/properties.schema +++ b/properties.schema @@ -4,121 +4,182 @@ "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" }, "_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, - "title": "Selectable answers" + "default": 1, + "title": "Selectable Items", + "inputType": "Number", + "validators": ["number", "required"], + "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":{ + "text": { + "type":"string", + "required":true, + "default": "", + "title": "Item Text", + "inputType": "Text", + "validators": ["required"], + "help": "This text will display as the item text" + }, + "_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, - "minLength": 1, - "title": "Partially correct final answer" + "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, - "minLength": 1, - "title": "Feedback for correct answer" } } }, - "_items": { - "type":"array", - "required":true, - "title": "Question answers", - "items": - { - "type":"object", - "required":true, - "properties":{ - "_shouldBeSelected": { - "type":"boolean", - "required":true, - "title": "Correct answer" - }, - "text": { - "type":"string", - "required":true, - "minLength": 1, - "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 1e5a1f2fbe4bf8c387affb447a89830d2bb7883f Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Tue, 18 Nov 2014 15:22:33 +0000 Subject: [PATCH 6/8] Spelling hiccups --- properties.schema | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/properties.schema b/properties.schema index d846172..c98d3d9 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", @@ -169,7 +169,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", @@ -177,7 +177,7 @@ "default": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text so hide the model answer" + "help": "Button label text to hide the model answer" } } } From 00525125d1f92c6d15d262340b909904c34f5b3b Mon Sep 17 00:00:00 2001 From: Himanshu Rajotia Date: Thu, 8 Jan 2015 12:25:00 +0530 Subject: [PATCH 7/8] added _feedback for items --- properties.schema | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/properties.schema b/properties.schema index c98d3d9..649981f 100644 --- a/properties.schema +++ b/properties.schema @@ -73,6 +73,15 @@ "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" } } } From 3fd3f6133118e6f7e3ce92eaa386b791f653ff5a Mon Sep 17 00:00:00 2001 From: Daryl Hedley Date: Wed, 21 Jan 2015 14:43:11 +0000 Subject: [PATCH 8/8] Adds support for _supportedLayout fixes #86 --- 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 20845e3..85d8a19 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-mcq", - "version": "1.1.3", + "version": "1.1.5", "homepage": "https://github.com/adaptlearning/adapt-contrib-mcq", "authors": [ "Daryl Hedley " diff --git a/package.json b/package.json index 451931d..6a0beab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-mcq", - "version": "1.1.3", + "version": "1.1.5", "description": "A multiple choice question component", "main": "", "scripts": { diff --git a/properties.schema b/properties.schema index c98d3d9..e4a83aa 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": "half-width", + "editorOnly": true + }, "instruction": { "type": "string", "required": false,