Skip to content

Commit

Permalink
bugfix/attempts-restore: attemptsLeft restore fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster committed Dec 14, 2015
1 parent 6709e55 commit 4776d40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/serializers/questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ define([
var numericParameters = [
blockLocation,
block['_trackingId'],
component['_score'] || 0
component['_score'] || 0,
component['_attemptsLeft'] || 0
];

var booleanParameters = [
Expand Down Expand Up @@ -137,6 +138,7 @@ define([
var blockLocation = numericParameters[0];
var trackingId = numericParameters[1];
var score = numericParameters[2];
var attemptsLeft = numericParameters[3] || 0;

var hasUserAnswer = booleanParameters[0];
var isUserAnswerArray = booleanParameters[1];
Expand All @@ -154,6 +156,7 @@ define([
component.set("_isSubmitted", isSubmitted);
component.set("_score", score);
component.set("_isCorrect", isCorrect);
component.set("_attemptsLeft", attemptsLeft);

if (hasUserAnswer) {
var userAnswer = dataItem[2];
Expand Down

0 comments on commit 4776d40

Please sign in to comment.