From: Vincent Vanwaelscappel Date: Thu, 12 Oct 2023 14:38:55 +0000 (+0200) Subject: wip #6387 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=8d48eaf342664ef75960921aca262db2c5fc9087;p=fluidbook-toolbox-quiz.git wip #6387 @1 --- diff --git a/js/quiz.attemptslog.js b/js/quiz.attemptslog.js index 0b15c1c..cad6761 100644 --- a/js/quiz.attemptslog.js +++ b/js/quiz.attemptslog.js @@ -11,9 +11,11 @@ QuizAttemptsLog.prototype = { } let score = this.quiz.score.getNormalizedScore(true); + if (isNaN(score)) { score = 0; } + let logdata = { score: score, passed: this.quiz.score.isPassed(), questions: this.getQuestionsToLog(), }; diff --git a/js/quiz.score.js b/js/quiz.score.js index d19de7b..bb8986c 100644 --- a/js/quiz.score.js +++ b/js/quiz.score.js @@ -109,7 +109,7 @@ QuizScore.prototype = { log.answer = userAnswers; } else { ok = 'neutral'; - log.answer = $(this).find('input,textarea,select').val(); + log.answer = userAnswers; } }