Skip to content

Commit

Permalink
Merge pull request #118 from adaptlearning/bugfix/attempts-restore
Browse files Browse the repository at this point in the history
bugfix/attempts-restore: attemptsLeft restore fix
  • Loading branch information
Himanshu Rajotia committed Dec 16, 2015
2 parents 6709e55 + 4776d40 commit 0d9f7a0
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 0d9f7a0

Please sign in to comment.