]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wip #6387 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Oct 2023 08:40:11 +0000 (10:40 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Oct 2023 08:40:11 +0000 (10:40 +0200)
js/quiz.score.js

index 3f82ec835c9ac20843e0ead49c1ec2e4eddf9965..d19de7bf738c536b11919f2bbd17df7cdd7d054b 100644 (file)
@@ -38,6 +38,7 @@ QuizScore.prototype = {
     },
 
     checkQuestion: function (questionIndex) {
+        questionIndex = parseInt(questionIndex);
         let question = this.quiz.data.questions[questionIndex];
 
         let ok = 'ok';
@@ -127,7 +128,7 @@ QuizScore.prototype = {
         } else {
             log.score = 0;
         }
-        this.logQuestions[questionIndex] = log;
+        this.logQuestions[questionIndex + 1] = log;
     },
 
     getNormalizedScore: function (pct) {