From a876bf33e9e640cb762e61e660e9e34c16bd30f4 Mon Sep 17 00:00:00 2001 From: soufiane Date: Mon, 29 Jan 2024 15:49:53 +0100 Subject: [PATCH] wait #6690 @0:15 --- js/quiz.screen.outro.js | 42 +++++++++++++++++++++++------------------ js/quiz.screens.js | 3 ++- style/105-outro.sass | 2 +- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/js/quiz.screen.outro.js b/js/quiz.screen.outro.js index 2998115..4c53bd2 100644 --- a/js/quiz.screen.outro.js +++ b/js/quiz.screen.outro.js @@ -201,8 +201,9 @@ QuizScreenOutro.prototype = { } }, - returnContentClass: function(str = "") { - return str.length >= 83 ? "content" : "" + returnContentClass: function(str = "", type = "") { + let maxLength = type === "multiple" ? 200 : type === "draganddrop" ? 75 : 85 + return str.length >= maxLength ? "content" : "" }, displayReviewList: function () { @@ -282,7 +283,7 @@ QuizScreenOutro.prototype = { nokClass = "nok" } html += '
'; - html += '

' + correctAnswers[j].answer +'

'; + html += '

' + correctAnswers[j].answer +'

'; html += htmlSpan; html += '
'; } @@ -299,25 +300,30 @@ QuizScreenOutro.prototype = { 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}` + if(correctAnswers.filter( (n) => { return n['drop_area'] !== undefined } ).length === correctAnswers.length) { + + 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 += '
    • ' } - html += '
    • ' + correctAnswers[k].answer + '

      ' - html += htmlSpan - html += '
    • ' } } + html += '
    ' + html += '
    ' } - html += '
' - 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 72a5402..53e2b8b 100644 --- a/js/quiz.screens.js +++ b/js/quiz.screens.js @@ -61,7 +61,8 @@ QuizScreens.prototype = { return false; } - if($this.getActiveScreenType() === 'draganddrop' && $this.activeScreen.find(".list-item").length > 0) { + if(($this.getActiveScreenType() === 'draganddrop' && $this.activeScreen.find(".list-item").length > 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 f4dae42..5a68723 100644 --- a/style/105-outro.sass +++ b/style/105-outro.sass @@ -322,7 +322,7 @@ border-radius: 8px min-height: 52px .slot - +flex-config(space-between) + +flex-config(space-between,false,false,center) background-color: rgba($texts-color,.08) !important .match-title, -- 2.39.5