Skip to content

Commit

Permalink
Merge pull request #85 from adaptlearning/hotfix/#83
Browse files Browse the repository at this point in the history
Implement randomisation as per #83
  • Loading branch information
moloko committed Sep 22, 2015
2 parents 9551669 + bf4e552 commit efea5a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapt-contrib-gmcq",
"version": "2.0.0",
"version": "2.0.1",
"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",
Expand Down
7 changes: 5 additions & 2 deletions js/adapt-contrib-gmcq.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ define(function(require) {
};

events = _.extend(events, ie8Events);

}

return events;
Expand All @@ -38,12 +37,15 @@ define(function(require) {
},

setupQuestion: function() {
// Radio button or checkbox
// if only one answer is selectable, we should display radio buttons not checkboxes
this.model.set("_isRadio", (this.model.get("_selectable") == 1) );

this.model.set('_selectedItems', []);

this.setupQuestionItemIndexes();

this.setupRandomisation();

this.restoreUserAnswers();

this.listenTo(Adapt, 'device:changed', this.resizeImage);
Expand Down Expand Up @@ -71,6 +73,7 @@ define(function(require) {

},

// hack for IE8
forceChangeEvent: function(event) {

$("#" + $(event.currentTarget).closest("label").attr("for")).change();
Expand Down

0 comments on commit efea5a8

Please sign in to comment.