From f23ea9b7533261feded666a0aea0136c251654be Mon Sep 17 00:00:00 2001 From: soufiane Date: Mon, 29 Jan 2024 17:27:34 +0100 Subject: [PATCH] wait #6691 @0:30 --- js/quiz.screen.outro.js | 43 +++++++++++++++++++++-------------------- js/quiz.screens.js | 2 +- style/105-outro.sass | 3 +++ 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/js/quiz.screen.outro.js b/js/quiz.screen.outro.js index 4c53bd2..215b006 100644 --- a/js/quiz.screen.outro.js +++ b/js/quiz.screen.outro.js @@ -295,45 +295,44 @@ QuizScreenOutro.prototype = { if (review.type === "draganddrop") { nokClass = "" - html += '
' - html += '

' + review.data.area_1.title + '

' + review.data.area_2.title + '

' - html += '
' - html += '
' - - if(correctAnswers.filter( (n) => { return n['drop_area'] !== undefined } ).length === correctAnswers.length) { + if(answersUser[i].length === correctAnswers.length) { + html += '
' + html += '

' + review.data.area_1.title + '

' + review.data.area_2.title + '

' + html += '
' + html += '
' for (let i = 1; i < 3; i++) { let area = i === 1 ? review.data.area_1 : review.data.area_2 html += '
' html += '
    ' - if (correctAnswers.length > 0) { - for (let k in correctAnswers) { - if (correctAnswers[k].drop_area === i) { - htmlSpan = "" - if (correctAnswers[k].status === "nok") { - htmlSpan = `${wrongIcon}` - } - html += '
  • ' + correctAnswers[k].answer + '

    ' - html += htmlSpan - html += '
  • ' + for (let k in correctAnswers) { + if (correctAnswers[k].drop_area === i) { + htmlSpan = "" + if (correctAnswers[k].status === "nok") { + htmlSpan = `${wrongIcon}` } + html += '
  • ' + correctAnswers[k].answer + '

    ' + html += htmlSpan + html += '
  • ' } } html += '
' html += '
' } + html += '
' + } else { html += '

'+this.quiz.l10n.__("Failed because you didn't answer in time")+'

' } - html += '
' } if (review.type === "match") { html += '
' - html += '
' - html += '

' + this.quiz.l10n.__('Question') + '

' + this.quiz.l10n.__('Answers') + '

' - html += '
' - if(correctAnswers.length > 0) { + if(answersUser[i].length === correctAnswers.length) { + html += '
' + html += '

' + this.quiz.l10n.__('Question') + '

' + this.quiz.l10n.__('Answers') + '

' + html += '
' + for (let k in correctAnswers) { htmlSpan = "" if (statusByAnswer.answers[k] === "nok") { @@ -345,6 +344,8 @@ QuizScreenOutro.prototype = { html += '

' + correctAnswers[k].proposition + '

' html += '
' } + } else { + html += '

'+this.quiz.l10n.__("Failed because you didn't answer in time")+'

' } html += '' } diff --git a/js/quiz.screens.js b/js/quiz.screens.js index 53e2b8b..9fb995e 100644 --- a/js/quiz.screens.js +++ b/js/quiz.screens.js @@ -62,7 +62,7 @@ QuizScreens.prototype = { } if(($this.getActiveScreenType() === 'draganddrop' && $this.activeScreen.find(".list-item").length > 0) - && (parseInt($this.quiz.question.current().countdown_enable) && $this.intervalCountDown !== 0)) { + && (parseInt($this.quiz.question.current().countdown_enable) && $this.intervalCountDown > 0)) { return false; } diff --git a/style/105-outro.sass b/style/105-outro.sass index 5a68723..c1d9b64 100644 --- a/style/105-outro.sass +++ b/style/105-outro.sass @@ -362,6 +362,9 @@ border-radius: 5px +opacity(.24, background-color, $texts-color) + .timeout + margin-top: 8px + #resume width: 100% max-width: 300px -- 2.39.5