From 06e9b42a3e7e2f39df9c2ec5a4cf195254169d0c Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 29 Sep 2023 12:57:43 +0200 Subject: [PATCH] wait #6186 @0.25 --- js/quiz.score.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/quiz.score.js b/js/quiz.score.js index d178e92..64e3491 100644 --- a/js/quiz.score.js +++ b/js/quiz.score.js @@ -167,13 +167,13 @@ QuizScore.prototype = { } this.quiz.scorm.saveState(this.getCurrentState()); - if (this.lastAnsweredQuestion === this.getQuestionsCount()) { + if (this.lastAnsweredQuestion === (this.getQuestionsCount() - 1)) { this.quiz.scorm.completed() } }, getQuestionsCount: function () { - return this.quiz.data.questions.length - 1 + return this.quiz.data.questions.length; }, getCurrentState: function () { -- 2.39.5