From: soufiane Date: Wed, 28 Feb 2024 17:54:23 +0000 (+0100) Subject: wait #6758 @1:00 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=cdf259297eb5567aaf1dd383a9037e9a93928267;p=fluidbook-toolbox-quiz.git wait #6758 @1:00 --- diff --git a/js/quiz.screen.outro.js b/js/quiz.screen.outro.js index 540dc46..5283d61 100644 --- a/js/quiz.screen.outro.js +++ b/js/quiz.screen.outro.js @@ -201,11 +201,6 @@ QuizScreenOutro.prototype = { } }, - returnContentClass: function(str = "", type = "") { - let maxLength = type === "multiple" ? 200 : type === "draganddrop" ? 75 : 85 - return str.length >= maxLength ? "content" : "" - }, - displayReviewList: function () { let $ul = $("#answers-list"); if ($ul.length === 0 || this.quiz.data.review === 'never' || (this.quiz.data.review === 'passed' && !this.quiz.score.isPassed())) { @@ -288,7 +283,7 @@ QuizScreenOutro.prototype = { nokClass = "nok" } html += '
'; - html += '

' + correctAnswers[j].answer +'

'; + html += '

' + correctAnswers[j].answer +'

'; html += htmlSpan; html += '
'; } @@ -317,7 +312,7 @@ QuizScreenOutro.prototype = { if (correctAnswers[k].status === "nok") { htmlSpan = `${wrongIcon}` } - html += '
  • ' + correctAnswers[k].answer + '

    ' + html += '
  • ' + correctAnswers[k].answer + '

    ' html += htmlSpan html += '
  • ' } @@ -346,9 +341,9 @@ QuizScreenOutro.prototype = { htmlSpan = `${wrongIcon}` } html += '
    ' - html += '

    ' + correctAnswers[k].answer + '

    ' + html += '

    ' + correctAnswers[k].answer + '

    ' html += htmlSpan !== "" ? htmlSpan : '
    ' - html += '

    ' + correctAnswers[k].proposition + '

    ' + html += '

    ' + correctAnswers[k].proposition + '

    ' html += '
    ' } } else { @@ -364,7 +359,18 @@ QuizScreenOutro.prototype = { // mise en place de la scrollbar personnalisé // https://github.com/Grsmto/simplebar/tree/master/packages/simplebar const simpleBar = new SimpleBar($ul.get(0)) + this.addClassContent(); + }, + + addClassContent: function() { + $(".area-item,.match-item,.multiple-item").each(function() { + let p = $(this).find("p") + if(p.get(0).scrollHeight > p.get(0).clientHeight) { + p.addClass("content") + } + }) } + };