From 8d48eaf342664ef75960921aca262db2c5fc9087 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 12 Oct 2023 16:38:55 +0200 Subject: [PATCH] wip #6387 @1 --- js/quiz.attemptslog.js | 2 ++ js/quiz.score.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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; } } -- 2.39.5