Skip to content

Commit

Permalink
fix: use only questions in capture and release
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster committed Aug 7, 2015
1 parent b08ccf2 commit c8f45b3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions js/serializers/questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ define([

//Captures the completion status and user selections of the question components
//Returns and parses a base64 style string
var includes = {
"_isQuestionType": true,
"_isResetOnRevisit": false
};

var serializer = {
serialize: function () {
Expand Down Expand Up @@ -35,11 +39,6 @@ define([

var components = Adapt.components.toJSON();

var includes = {
"_isQuestionType": true,
"_isResetOnRevisit": false
};

components = _.where(components, includes);

var blocks = {};
Expand Down Expand Up @@ -145,7 +144,9 @@ define([
var isCorrect = booleanParameters[4];

var block = Adapt.blocks.findWhere({_trackingId: trackingId});
var component = block.getChildren().models[blockLocation];
var components = block.getChildren();
components = components.where(includes);
var component = components[blockLocation];

component.set("_isComplete", true);
component.set("_isInteractionComplete", isInteractionComplete);
Expand Down

0 comments on commit c8f45b3

Please sign in to comment.