ok: this.questionStatus[questionIndex].ok,
score: this.score,
maxScore: this.maxScore,
- status: this.questionStatus
+ status: this.questionStatus,
+ answersStatus: this.questionStatus[questionIndex].answers,
};
},
}
this.questionStatus[questionIndex] = {
- ok: ok,
- answers: answersStatus,
- // dbg_min_score: min_score,
+ ok: ok, answers: answersStatus, // dbg_min_score: min_score,
// dbg_this_score: this_score
};
if ($(this).hasClass('validate')) {
let review = $this.sendUserAnswers();
// Si la revue instantanée est activée, on affiche les résultats
- if (this.quiz.data.instantReview) {
+ if ($this.quiz.data.instantReview) {
$this.instantReview(review);
} else {
// Sinon, on passe directement à la question suivante
$(activeScreen).find('.btn.validate').addClass('none');
$(activeScreen).find('.btn.continue').removeClass('none');
+ let results=review.answersStatus;
+ console.log(review);
+
for (let k in results) {
+ console.log(k);
let answerResult = results[k];
let n = (parseInt(k) + 1);
let icon = getSpriteIcon("quiz-ok");
- let $el = form.fid(".list-item:nth-of-type(" + n + ") label");
+ let $el = form.find(".list-item:nth-of-type(" + n + ") label");
$el.addClass(answerResult);
if (answerResult === "nok") {
icon = getSpriteIcon("quiz-wrong");
},
getCurrentForm: function () {
- return $(this.activeScreen).find('form');
+ return this.getActiveScreen().find('form');
},
resetForm: () => {