return min_score;
},
+ runEndAction: function () {
+ if (this.isPassed()) {
+ this.execAction(this.quiz.data.passedAction);
+ } else {
+ this.execAction(this.quiz.data.failedAction);
+ }
+ },
+
updateScore: function (saveState) {
this.maxScore = 0;
this.score = 0;
return {
q: this.lastAnsweredQuestion, a: this.answers
};
+ },
+ execAction: function (action) {
+ if (action === undefined || action === null || action === '' || !action) {
+ return;
+ }
+ try {
+ eval(action);
+ } catch (e) {
+ console.error('Error while running code ' + action + ' :: ' + e.message);
+ }
}
};
}, 2500);
$("[id^=score-]").text(score)
- $("[id^=maxScore-]").text(maxScore)
+ $("[id^=maxScore-]").text(maxScore);
+
+ this.quiz.score.runEndAction();
this.animate(score, percent)
this.displayReviewList()