From e12e76753f24e39b653409cf7c79697f2fdb8a85 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Fri, 4 Mar 2016 09:52:47 +0000 Subject: [PATCH 01/32] Added column functionality --- js/adapt-contrib-gmcq.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/adapt-contrib-gmcq.js b/js/adapt-contrib-gmcq.js index 463efd3..493f768 100644 --- a/js/adapt-contrib-gmcq.js +++ b/js/adapt-contrib-gmcq.js @@ -25,6 +25,18 @@ define(function(require) { return events; }, + + setUpColumns: function() { + var columns = this.model.get('_columns'); + + if (!columns) return; + + this.$el.addClass('gmcq-column-layout'); + + if (Adapt.device.screenSize === 'large') { + this.$('.gmcq-item').css('width', (100 / columns) + '%'); + } + }, onItemSelected: function(event) { From 68b3d54dfd7be6796f15c489feb7f21bc79fde66 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Fri, 4 Mar 2016 09:54:18 +0000 Subject: [PATCH 02/32] Added column styling --- less/gmcq.less | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/less/gmcq.less b/less/gmcq.less index f1d065c..9f56f85 100644 --- a/less/gmcq.less +++ b/less/gmcq.less @@ -1,5 +1,45 @@ .gmcq-component { + &.gmcq-column-layout { + .gmcq-widget { + font-size: 0; + text-align: center; + } + .gmcq-item { + display: inline-block; + float: none; + vertical-align: top; + + .dir-rtl & { + float: none; + } + + &.even, + &.odd { + label { + margin: 2.5%; + + .dir-rtl & { + margin: 2.5%; + } + + @media (max-width: @device-width-medium) { + margin: 0; + } + } + } + } + + .gmcq-item-inner { + font-size: @body-text-font-size; + text-align: left; + + .dir-rtl & { + text-align: right; + } + } + } + .gmcq-item { position: relative; width: 50%; From fa57323ed7f75e947d4a0ccee4c6db88ec3dcb3e Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Fri, 4 Mar 2016 09:54:35 +0000 Subject: [PATCH 03/32] Bumped version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 07a6907..1fb3eac 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "2.0.2", + "version": "2.0.3", "framework": "^2.0.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://adaptlearning.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=10100&issuetype=1&priority=6&components=10508", From 47f6d083cbae24a6df5553e1b61d7df38ce74b41 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Fri, 4 Mar 2016 09:55:41 +0000 Subject: [PATCH 04/32] Added description to new attribute, bumped version --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6333923..4652339 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ guide the learner’s interaction with the component. **_recordInteraction** (boolean) Determines whether or not the learner's answers will be recorded to the LMS via cmi.interactions. Default is `true`. For further information, see the entry for `_shouldRecordInteractions` in the README for [adapt-contrib-spoor](https://github.com/adaptlearning/adapt-contrib-spoor). +**_columns** (number): Defines the number of columns wide the **_items** are displayed in. If the value of **_numberOfColumns** is `2`, each **_items** will be 50% wide. Similarly, if the value of **_numberOfColumns** is `3`, each **_items** will be 33.3% wide. In mobile view, the width of each **_items** is 100%. + **_items** (array): Each *item* represents one choice for the multiple choice question and contains values for **_graphic**, **text**, and **_shouldBeSelected**. >**text** (string): Optional text that is displayed as part of the multiple choice option. @@ -104,7 +106,7 @@ label is not a visible element. It is utilized by assistive technology such as s No known limitations. ---------------------------- -**Version number:** 2.0.2 adapt learning logo +**Version number:** 2.0.3 adapt learning logo **Framework versions:** 2.0 **Author / maintainer:** Adapt Core Team with [contributors](https://github.com/adaptlearning/adapt-contrib-gmcq/graphs/contributors) **Accessibility support:** WAI AA From 082baff0f53efb72d796285015d9a352a2617724 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Fri, 4 Mar 2016 09:56:05 +0000 Subject: [PATCH 05/32] Updated example JSON --- example.json | 1 + 1 file changed, 1 insertion(+) diff --git a/example.json b/example.json index 7ed02eb..a3860bb 100644 --- a/example.json +++ b/example.json @@ -12,6 +12,7 @@ "_selectable":1, "_canShowModelAnswer": true, "_recordInteraction":true, + "_columns": 3, "title": "GMCQ", "displayTitle": "GMCQ", "body": "Which of the following options would you consider to be correct?", From 55bd19943b359444e2f31e9cd2ec0a9ddb664281 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Fri, 4 Mar 2016 09:57:41 +0000 Subject: [PATCH 06/32] Added new attribute to properties.schema --- properties.schema | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/properties.schema b/properties.schema index e2da1f4..f8b6b7b 100644 --- a/properties.schema +++ b/properties.schema @@ -73,6 +73,15 @@ "validators": [], "help": "If set to 'true', the user's answer(s) will be recorded to cmi.interactions on the LMS (where supported)." }, + "_columns": { + "type": "number", + "required": false, + "default": 0, + "title": "Columns", + "inputType": "Number", + "validators": ["number"], + "help": "Set the number of columns. If value is '0', component uses the default layout." + }, "_selectable": { "type":"number", "required":true, From 754543efd4b9953145a13d37b60030f85f3f5d98 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Fri, 4 Mar 2016 10:00:29 +0000 Subject: [PATCH 07/32] Changed tabs to spaces --- less/gmcq.less | 64 +++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/less/gmcq.less b/less/gmcq.less index 9f56f85..64e0b96 100644 --- a/less/gmcq.less +++ b/less/gmcq.less @@ -1,44 +1,44 @@ .gmcq-component { &.gmcq-column-layout { - .gmcq-widget { - font-size: 0; - text-align: center; - } + .gmcq-widget { + font-size: 0; + text-align: center; + } - .gmcq-item { - display: inline-block; - float: none; - vertical-align: top; + .gmcq-item { + display: inline-block; + float: none; + vertical-align: top; - .dir-rtl & { - float: none; - } + .dir-rtl & { + float: none; + } - &.even, - &.odd { - label { - margin: 2.5%; + &.even, + &.odd { + label { + margin: 2.5%; - .dir-rtl & { - margin: 2.5%; - } + .dir-rtl & { + margin: 2.5%; + } - @media (max-width: @device-width-medium) { - margin: 0; - } - } - } - } + @media (max-width: @device-width-medium) { + margin: 0; + } + } + } + } - .gmcq-item-inner { - font-size: @body-text-font-size; - text-align: left; + .gmcq-item-inner { + font-size: @body-text-font-size; + text-align: left; - .dir-rtl & { - text-align: right; - } - } - } + .dir-rtl & { + text-align: right; + } + } + } .gmcq-item { position: relative; From e2902d99c8ab8ae73e7b415726ab4882ffccde33 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Fri, 4 Mar 2016 11:35:07 +0000 Subject: [PATCH 08/32] Added comment to explain 'font-size: 0;' --- less/gmcq.less | 1 + 1 file changed, 1 insertion(+) diff --git a/less/gmcq.less b/less/gmcq.less index 64e0b96..cc66d30 100644 --- a/less/gmcq.less +++ b/less/gmcq.less @@ -1,6 +1,7 @@ .gmcq-component { &.gmcq-column-layout { .gmcq-widget { + // Font size set to 0 so there's no gap between items font-size: 0; text-align: center; } From 8d106bbfbc0ce43486b576aade499c27e028b318 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Mon, 7 Mar 2016 10:55:53 +0000 Subject: [PATCH 09/32] Added call for setUpColumns --- js/adapt-contrib-gmcq.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/adapt-contrib-gmcq.js b/js/adapt-contrib-gmcq.js index 493f768..b1f6bcd 100644 --- a/js/adapt-contrib-gmcq.js +++ b/js/adapt-contrib-gmcq.js @@ -67,12 +67,18 @@ define(function(require) { onQuestionRendered: function() { this.resizeImage(Adapt.device.screenSize); + this.listenTo(Adapt, 'device:resize', this.onScreenSizeChanged); + this.setUpColumns(); this.$('label').imageready(_.bind(function() { this.setReadyStatus(); }, this)); }, + + onScreenSizeChanged: function() { + this.setUpColumns(); + }, resizeImage: function(width) { From 612848247fc63085fd402f09b3cdd4343c7844d1 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Mon, 7 Mar 2016 11:20:29 +0000 Subject: [PATCH 10/32] Added removeClass ...for when a device has one orientation that is large and the other is medium. JS will now remove inline width and class so that it reverts to default styling. --- js/adapt-contrib-gmcq.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/adapt-contrib-gmcq.js b/js/adapt-contrib-gmcq.js index b1f6bcd..00ec737 100644 --- a/js/adapt-contrib-gmcq.js +++ b/js/adapt-contrib-gmcq.js @@ -31,10 +31,12 @@ define(function(require) { if (!columns) return; - this.$el.addClass('gmcq-column-layout'); - if (Adapt.device.screenSize === 'large') { + this.$el.addClass('gmcq-column-layout'); this.$('.gmcq-item').css('width', (100 / columns) + '%'); + } else { + this.$el.removeClass('gmcq-column-layout'); + this.$('.gmcq-item').css('width', ''); } }, From f9dabb8e09dd43a0a53873fd227b593377b686d4 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Mon, 7 Mar 2016 11:56:01 +0000 Subject: [PATCH 11/32] JS Amends Moved 'device:resize' listen to event to setupQuestion function alongside 'device:changed' event. Renamed onScreenSizeChanged function to onDeviceResize - better description of function. Moved setUpColumns function to bottom of file. --- js/adapt-contrib-gmcq.js | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/js/adapt-contrib-gmcq.js b/js/adapt-contrib-gmcq.js index 00ec737..f6c3fe5 100644 --- a/js/adapt-contrib-gmcq.js +++ b/js/adapt-contrib-gmcq.js @@ -25,20 +25,6 @@ define(function(require) { return events; }, - - setUpColumns: function() { - var columns = this.model.get('_columns'); - - if (!columns) return; - - if (Adapt.device.screenSize === 'large') { - this.$el.addClass('gmcq-column-layout'); - this.$('.gmcq-item').css('width', (100 / columns) + '%'); - } else { - this.$el.removeClass('gmcq-column-layout'); - this.$('.gmcq-item').css('width', ''); - } - }, onItemSelected: function(event) { @@ -62,14 +48,16 @@ define(function(require) { this.restoreUserAnswers(); - this.listenTo(Adapt, 'device:changed', this.resizeImage); + this.listenTo(Adapt, { + 'device:changed': this.resizeImage, + 'device:resize': this.onDeviceResize + }); }, onQuestionRendered: function() { this.resizeImage(Adapt.device.screenSize); - this.listenTo(Adapt, 'device:resize', this.onScreenSizeChanged); this.setUpColumns(); this.$('label').imageready(_.bind(function() { @@ -78,7 +66,7 @@ define(function(require) { }, - onScreenSizeChanged: function() { + onDeviceResize: function() { this.setUpColumns(); }, @@ -93,6 +81,20 @@ define(function(require) { }, + setUpColumns: function() { + var columns = this.model.get('_columns'); + + if (!columns) return; + + if (Adapt.device.screenSize === 'large') { + this.$el.addClass('gmcq-column-layout'); + this.$('.gmcq-item').css('width', (100 / columns) + '%'); + } else { + this.$el.removeClass('gmcq-column-layout'); + this.$('.gmcq-item').css('width', ''); + } + }, + // hack for IE8 forceChangeEvent: function(event) { From 5a4fe9e93b120a0e15fca861f67af6aaac12a474 Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Mon, 7 Mar 2016 12:17:22 +0000 Subject: [PATCH 12/32] Removed redundant media query --- less/gmcq.less | 4 ---- 1 file changed, 4 deletions(-) diff --git a/less/gmcq.less b/less/gmcq.less index cc66d30..438b78e 100644 --- a/less/gmcq.less +++ b/less/gmcq.less @@ -23,10 +23,6 @@ .dir-rtl & { margin: 2.5%; } - - @media (max-width: @device-width-medium) { - margin: 0; - } } } } From 79dd6d0b163a6968fef25e33c0c98cdad3b51431 Mon Sep 17 00:00:00 2001 From: Simon Date Date: Tue, 8 Mar 2016 12:23:37 +0000 Subject: [PATCH 13/32] Update example.json Updated the ID's to be c-05, b-05 --- example.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example.json b/example.json index a3860bb..9c63dc3 100644 --- a/example.json +++ b/example.json @@ -1,6 +1,6 @@ { - "_id":"c-125", - "_parentId":"b-60", + "_id":"c-05", + "_parentId":"b-05", "_type":"component", "_component":"gmcq", "_classes":"", From 39a1079c7c220a1c0441f3e38589ebf75b5569bf Mon Sep 17 00:00:00 2001 From: Sarveshwar Gavhane Date: Tue, 5 Apr 2016 16:40:20 +0530 Subject: [PATCH 14/32] _canShowModelAnswer added to the properties.schema --- properties.schema | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/properties.schema b/properties.schema index f8b6b7b..1a45c9a 100644 --- a/properties.schema +++ b/properties.schema @@ -37,6 +37,15 @@ "validators": ["required", "number"], "help": "How many attempts the learner is allowed" }, + "_canShowModelAnswer": { + "type":"boolean", + "required":true, + "default": true, + "title": "Display Model Answer", + "inputType": {"type": "Boolean", "options": [true, false]}, + "validators": [], + "help": "Select 'true' to display the Model Answer" + }, "_shouldDisplayAttempts": { "type":"boolean", "required":false, From a877dfbb855da1405e5233c05a19dbad4630ede5 Mon Sep 17 00:00:00 2001 From: Sarveshwar Gavhane Date: Wed, 6 Apr 2016 10:32:21 +0530 Subject: [PATCH 15/32] help text changed --- properties.schema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/properties.schema b/properties.schema index 1a45c9a..5abf8b0 100644 --- a/properties.schema +++ b/properties.schema @@ -44,7 +44,7 @@ "title": "Display Model Answer", "inputType": {"type": "Boolean", "options": [true, false]}, "validators": [], - "help": "Select 'true' to display the Model Answer" + "help": "Select 'true' to allow the user to view the 'model answer' should they answer the question incorrectly" }, "_shouldDisplayAttempts": { "type":"boolean", From fbccc602531f675a290e5e372c12d8bb1011c21b Mon Sep 17 00:00:00 2001 From: Matt Leathes Date: Thu, 28 Apr 2016 15:12:25 +0100 Subject: [PATCH 16/32] change issues link from Jira to Github --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 1fb3eac..b6e21f1 100644 --- a/bower.json +++ b/bower.json @@ -3,7 +3,7 @@ "version": "2.0.3", "framework": "^2.0.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", - "issues": "https://adaptlearning.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=10100&issuetype=1&priority=6&components=10508", + "issues": "https://github.com/adaptlearning/adapt_framework/issues/new?title=contrib-gmcq%3A%20please%20enter%20a%20brief%20summary%20of%20the%20issue%20here&body=please%20provide%20a%20full%20description%20of%20the%20problem,%20including%20steps%20on%20how%20to%20replicate,%20what%20browser(s)/device(s)%20the%20problem%20occurs%20on%20and,%20where%20helpful,%20screenshots.", "displayName" : "Graphical Multiple Choice Question", "component" : "gmcq", "assetFields" : [ From 0bf739d94b5742fc6b4899f523a5bd83902218fb Mon Sep 17 00:00:00 2001 From: Brian Quinn Date: Mon, 23 May 2016 15:27:03 +0100 Subject: [PATCH 17/32] Added 'translatable' to properties.schema This is in preparation for multi-language support. Also added "_canShowFeedback" property and repositioned the "_items" property. --- properties.schema | 207 ++++++++++++++++++++++++++-------------------- 1 file changed, 119 insertions(+), 88 deletions(-) diff --git a/properties.schema b/properties.schema index 5abf8b0..5dff3ee 100644 --- a/properties.schema +++ b/properties.schema @@ -9,7 +9,8 @@ "required": true, "default": "This component is a graphical multiple choice question. Once you have selected an option select the submit button below.", "inputType": "Text", - "validators": [] + "validators": [], + "translatable": true } }, "properties":{ @@ -26,7 +27,80 @@ "default": "", "inputType": "Text", "validators": [], - "help": "This is the instruction text" + "help": "This is the instruction text", + "translatable": true + }, + "_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" + }, + "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", + "translatable": true + } + } + }, + "text": { + "type":"string", + "required":false, + "default": "", + "title": "Item Text", + "inputType": "Text", + "validators": [], + "help": "This text will display with the image", + "translatable": true + }, + "_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":"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", + "translatable": true + } + } + } }, "_attempts": { "type":"number", @@ -46,6 +120,15 @@ "validators": [], "help": "Select 'true' to allow the user to view the 'model answer' should they answer the question incorrectly" }, + "_canShowFeedback": { + "type":"boolean", + "required":true, + "default": true, + "title": "Display Feedback", + "inputType": {"type": "Boolean", "options": [true, false]}, + "validators": [], + "help": "Select 'true' to allow the user to view feedback on their answer" + }, "_shouldDisplayAttempts": { "type":"boolean", "required":false, @@ -100,75 +183,6 @@ "validators": ["number", "required"], "help": "How many items are selectable" }, - "_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" - }, - "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":"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" - } - } - } - }, "_feedback": { "type":"object", "required":true, @@ -181,7 +195,8 @@ "title": "Correct", "inputType": "TextArea", "validators": ["required"], - "help": "Correct feedback for this question" + "help": "Correct feedback for this question", + "translatable": true }, "_incorrect": { "type":"object", @@ -195,7 +210,8 @@ "title": "Incorrect Final", "inputType": "TextArea", "validators": ["required"], - "help": "Incorrect feedback for the final attempt" + "help": "Incorrect feedback for the final attempt", + "translatable": true }, "notFinal": { "type":"string", @@ -204,7 +220,8 @@ "title": "Incorrect Not Final", "inputType": "TextArea", "validators": [], - "help": "Incorrect feedback for any attempt apart from the last attempt" + "help": "Incorrect feedback for any attempt apart from the last attempt", + "translatable": true } } }, @@ -219,7 +236,8 @@ "title": "Partly Correct Final", "inputType": "TextArea", "validators": [], - "help": "Partly correct feedback for the final attempt" + "help": "Partly correct feedback for the final attempt", + "translatable": true }, "notFinal": { "type":"string", @@ -228,7 +246,8 @@ "title": "Partly Correct Not Final", "inputType": "TextArea", "validators": [], - "help": "Partly correct feedback for any attempt apart from the last attempt" + "help": "Partly correct feedback for any attempt apart from the last attempt", + "translatable": true } } } @@ -250,7 +269,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text for the submit button" + "help": "Button label text for the submit button", + "translatable": true }, "ariaLabel": { "type":"string", @@ -259,7 +279,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the submit button" + "help": "Aria label for the submit button", + "translatable": true } } }, @@ -274,7 +295,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text for the reset button" + "help": "Button label text for the reset button", + "translatable": true }, "ariaLabel": { "type":"string", @@ -283,7 +305,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the reset button" + "help": "Aria label for the reset button", + "translatable": true } } }, @@ -298,7 +321,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text to show the model answer" + "help": "Button label text to show the model answer", + "translatable": true }, "ariaLabel": { "type":"string", @@ -307,7 +331,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the show model answer button" + "help": "Aria label for the show model answer button", + "translatable": true } } }, @@ -322,7 +347,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text to hide the model answer" + "help": "Button label text to hide the model answer", + "translatable": true }, "ariaLabel": { "type":"string", @@ -331,7 +357,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the hide model answer button" + "help": "Aria label for the hide model answer button", + "translatable": true } } }, @@ -346,7 +373,8 @@ "title": "", "inputType": "QuestionButton", "validators": [], - "help": "Button label text to show feedback" + "help": "Button label text to show feedback", + "translatable": true }, "ariaLabel": { "type":"string", @@ -355,7 +383,8 @@ "title": "", "inputType": "Text", "validators": [], - "help": "Aria label for the show feedback button" + "help": "Aria label for the show feedback button", + "translatable": true } } }, @@ -366,7 +395,8 @@ "title": "Attempts Remaining Text", "inputType": "Text", "validators": [], - "help": "Shown when there are multiple attempts left" + "help": "Shown when there are multiple attempts left", + "translatable": true }, "remainingAttemptText": { "type":"string", @@ -375,7 +405,8 @@ "title": "Final Attempt Text", "inputType": "Text", "validators": [], - "help": "Shown when there is one attempt left" + "help": "Shown when there is one attempt left", + "translatable": true } } } From 97cfc739b767e78819aa0fbdbe595c54ca0cd6a6 Mon Sep 17 00:00:00 2001 From: Brian Quinn Date: Fri, 17 Jun 2016 16:46:18 +0100 Subject: [PATCH 18/32] Resolves #1104, removes 'h5' class from gmcq-item-inner --- README.md | 2 +- bower.json | 2 +- templates/gmcq.hbs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4652339..8ba0559 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ label is not a visible element. It is utilized by assistive technology such as s No known limitations. ---------------------------- -**Version number:** 2.0.3 adapt learning logo +**Version number:** 2.0.4 adapt learning logo **Framework versions:** 2.0 **Author / maintainer:** Adapt Core Team with [contributors](https://github.com/adaptlearning/adapt-contrib-gmcq/graphs/contributors) **Accessibility support:** WAI AA diff --git a/bower.json b/bower.json index b6e21f1..af0a1c3 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-gmcq", - "version": "2.0.3", + "version": "2.0.4", "framework": "^2.0.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new?title=contrib-gmcq%3A%20please%20enter%20a%20brief%20summary%20of%20the%20issue%20here&body=please%20provide%20a%20full%20description%20of%20the%20problem,%20including%20steps%20on%20how%20to%20replicate,%20what%20browser(s)/device(s)%20the%20problem%20occurs%20on%20and,%20where%20helpful,%20screenshots.", diff --git a/templates/gmcq.hbs b/templates/gmcq.hbs index 1295392..3cb44e2 100644 --- a/templates/gmcq.hbs +++ b/templates/gmcq.hbs @@ -14,7 +14,7 @@
-
+
{{{text}}}
From b088bc572d05ee5bbf4b5234cf80acb099ab533f Mon Sep 17 00:00:00 2001 From: Ryan Lynch Date: Tue, 21 Jun 2016 17:43:03 +0100 Subject: [PATCH 19/32] ariaLabels should have an inputType of QuestionButton --- properties.schema | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/properties.schema b/properties.schema index 5dff3ee..96cb862 100644 --- a/properties.schema +++ b/properties.schema @@ -277,7 +277,7 @@ "required": false, "default": "", "title": "", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Aria label for the submit button", "translatable": true @@ -303,7 +303,7 @@ "required": false, "default": "", "title": "", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Aria label for the reset button", "translatable": true @@ -329,7 +329,7 @@ "required": false, "default": "", "title": "", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Aria label for the show model answer button", "translatable": true From ec192c71bbf55fc133f4411bca76c51bfbf6f1cd Mon Sep 17 00:00:00 2001 From: Ryan Lynch Date: Tue, 21 Jun 2016 17:44:44 +0100 Subject: [PATCH 20/32] Revert "ariaLabels should have an inputType of QuestionButton" This reverts commit b088bc572d05ee5bbf4b5234cf80acb099ab533f. --- properties.schema | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/properties.schema b/properties.schema index 96cb862..5dff3ee 100644 --- a/properties.schema +++ b/properties.schema @@ -277,7 +277,7 @@ "required": false, "default": "", "title": "", - "inputType": "QuestionButton", + "inputType": "Text", "validators": [], "help": "Aria label for the submit button", "translatable": true @@ -303,7 +303,7 @@ "required": false, "default": "", "title": "", - "inputType": "QuestionButton", + "inputType": "Text", "validators": [], "help": "Aria label for the reset button", "translatable": true @@ -329,7 +329,7 @@ "required": false, "default": "", "title": "", - "inputType": "QuestionButton", + "inputType": "Text", "validators": [], "help": "Aria label for the show model answer button", "translatable": true From 8575b786b0ca79b0c6425aafb69feac1c545b23c Mon Sep 17 00:00:00 2001 From: Ryan Lynch Date: Tue, 21 Jun 2016 19:28:57 +0100 Subject: [PATCH 21/32] ariaLabels should have inputType QuestionButton --- properties.schema | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/properties.schema b/properties.schema index 5dff3ee..22d9c78 100644 --- a/properties.schema +++ b/properties.schema @@ -277,7 +277,7 @@ "required": false, "default": "", "title": "", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Aria label for the submit button", "translatable": true @@ -303,7 +303,7 @@ "required": false, "default": "", "title": "", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Aria label for the reset button", "translatable": true @@ -329,7 +329,7 @@ "required": false, "default": "", "title": "", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Aria label for the show model answer button", "translatable": true @@ -355,7 +355,7 @@ "required": false, "default": "", "title": "", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Aria label for the hide model answer button", "translatable": true @@ -381,7 +381,7 @@ "required": false, "default": "", "title": "", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Aria label for the show feedback button", "translatable": true @@ -393,7 +393,7 @@ "required": false, "default": "", "title": "Attempts Remaining Text", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Shown when there are multiple attempts left", "translatable": true @@ -403,7 +403,7 @@ "required": false, "default": "", "title": "Final Attempt Text", - "inputType": "Text", + "inputType": "QuestionButton", "validators": [], "help": "Shown when there is one attempt left", "translatable": true From b9526ec248f7173f12b785bebcd16bc35d60dadd Mon Sep 17 00:00:00 2001 From: Chuck Lorenz Date: Mon, 4 Jul 2016 05:30:48 -0500 Subject: [PATCH 22/32] update _selectable --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ba0559..3ea895e 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ guide the learner’s interaction with the component. **_questionWeight** (number): A number which reflects the significance of the question in relation to the other questions in the course. This number is used in calculations of the final score reported to the LMS. -**_selectable** (number): Defines the number of **_items**, or answers, that can be selected. If the value of **_selectable** is `1`, **_items** will be presented with HTML radio buttons. If the value is greater than `1`, they will be presented with HTML checkboxes. This number must match the number of **_items** whose **_shouldBeSelected** is set to `true`. The default is `1`. +**_selectable** (number): Defines the number of **_items**, or answers, that can be selected. If the value of **_selectable** is `1`, **_items** will be presented with HTML radio buttons. If the value is greater than `1`, they will be presented with HTML checkboxes. This number must match or exceed the number of **_items** whose **_shouldBeSelected** is set to `true`. The default is `1`. **_canShowModelAnswer** (boolean): Setting this to `false` prevents the [**_showCorrectAnswer** button](https://github.com/adaptlearning/adapt_framework/wiki/Core-Buttons) from being displayed. The default is `true`. From 15872e8fc449dd468bbad8fc67a991c6a315905d Mon Sep 17 00:00:00 2001 From: tomgreenfield Date: Fri, 8 Jul 2016 16:50:27 +0100 Subject: [PATCH 23/32] Hook into _canShowMarking --- bower.json | 2 +- less/gmcq.less | 3 ++- templates/gmcq.hbs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index af0a1c3..457511e 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "adapt-contrib-gmcq", "version": "2.0.4", - "framework": "^2.0.0", + "framework": "^2.0.11", "homepage": "https://github.com/adaptlearning/adapt-contrib-gmcq", "issues": "https://github.com/adaptlearning/adapt_framework/issues/new?title=contrib-gmcq%3A%20please%20enter%20a%20brief%20summary%20of%20the%20issue%20here&body=please%20provide%20a%20full%20description%20of%20the%20problem,%20including%20steps%20on%20how%20to%20replicate,%20what%20browser(s)/device(s)%20the%20problem%20occurs%20on%20and,%20where%20helpful,%20screenshots.", "displayName" : "Graphical Multiple Choice Question", diff --git a/less/gmcq.less b/less/gmcq.less index 438b78e..bc5295a 100644 --- a/less/gmcq.less +++ b/less/gmcq.less @@ -210,7 +210,8 @@ .gmcq-item-icon { display: none; } - .selected .gmcq-correct-icon { + .incorrect .selected .gmcq-correct-icon, + .correct .selected .gmcq-correct-icon { display: block; } } diff --git a/templates/gmcq.hbs b/templates/gmcq.hbs index 3cb44e2..9ef969d 100644 --- a/templates/gmcq.hbs +++ b/templates/gmcq.hbs @@ -2,7 +2,7 @@ {{> component this}}