]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6186 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 29 Sep 2023 10:57:43 +0000 (12:57 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 29 Sep 2023 10:57:43 +0000 (12:57 +0200)
js/quiz.score.js

index d178e92adb2c06aac4d8df4b461279d5a71698d2..64e349190df14c6c583e2b5952d962257b989cdd 100644 (file)
@@ -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 () {