]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6182 @1:30 gestion des status de réponses
authorsoufiane <soufiane@cubedesigners.com>
Mon, 7 Aug 2023 10:36:56 +0000 (12:36 +0200)
committersoufiane <soufiane@cubedesigners.com>
Mon, 7 Aug 2023 10:36:56 +0000 (12:36 +0200)
resources/quizv2/js/quiz.js
resources/quizv2/js/quiz.question.js
resources/quizv2/style/100-global.sass
resources/quizv2/style/103-question-multiple.sass
resources/views/quizv2/index.blade.php

index 397076b7cb8b53058830d36b715905b95747e1ce..65731ed7d2a3c66c357dc3199148058cc59bbe3a 100644 (file)
@@ -188,9 +188,9 @@ Quiz.prototype = {
         for(let k in datas) {
             let n = (parseInt(k) + 1)
             let icon = getSpriteIcon("quiz-ok")
-            let $el = $(".active-screen .question-multiple .list-item:nth-of-type("+n+")")
+            let $el = $(".active-screen .question-multiple .list-item:nth-of-type("+n+") label")
             $el.addClass(datas[k])
-            if(datas[k] !== "ok") {
+            if(datas[k] === "nok") {
                 icon = getSpriteIcon("quiz-wrong")
             }
             if(datas[k] !== "neutral") {
index b3a4460b8c76b4b45226df3731770661aeccd0a8..ecc3cd1a05a00e3d9161bca3140a83e84a69b0ea 100644 (file)
@@ -8,7 +8,21 @@ QuizQuestion.prototype = {
 
     },
 
-    getFormData: (responses) => {
+    getAll: function() {
+      return this.quiz.questions
+    },
+
+    byPosition: function(pos) {
+        return this.quiz.data.questions[parseInt(pos)]
+    },
+
+    current: function() {
+        let currentPosition = $(".active-screen").data("position");
+        return this.byPosition(currentPosition)
+    },
+
+    getFormData: function(responses) {
+        //
     },
 }
 
index 4949f7cc5f2a5157250dd17c180f3531e77a1a30..32d6160128a3e6470b57285d84753298c785a30e 100644 (file)
@@ -43,8 +43,7 @@ body
         max-width: 177px
 
 .access
-    width: 100%
-    max-width: 34px
+    width: 34px
     height: 34px
     border-radius: 4px
     +font-size(16)
@@ -53,15 +52,24 @@ body
     margin-left: 16px
     +flex-config(center,false,false,center)
     &.space
-        max-width: 70px
+        width: 70px
     &.infos
-        max-width: 40px
+        width: 40px
     &.ok
         +opacity(.24, background-color, $ok-color)
+
+    &.ok,
+    &.missed
+        svg
+            color: $ok-color
     &.nok
         +opacity(.24, background-color, $nok-color)
+        svg
+            color: $nok-color
+
     &.ok,
-    &.nok
+    &.nok,
+    &.missed
         svg
             width: 15px
             height: 15px
index 866041139f287b1396fed5e884a8d45cb57d5608..8ef46dc6b7d57117a6b8ef20f36857eae59ce6b7 100644 (file)
@@ -24,6 +24,7 @@
                     //
                 &.missed
                     //
+                    +opacity(.80,background-color,$neutral-color)
                 *
                     z-index: 1
 
@@ -37,3 +38,7 @@
                     position: absolute
                     top: 0
                     left: 0
+                &.nok:after
+                    background: transparent
+                &.missed:after
+                    +opacity(.24,background-color,$ok-color)
index fb1fc5066d4731c2c32b1933050849558744d157..a2ff8a67d67eddf6bd1fe4d6491f5d2a968fb18c 100644 (file)
@@ -23,7 +23,6 @@
         @foreach($data->questions as $key => $question)
             @include('quizv2.screens.question_'.$question['type'], ['data'=> $question, 'max' => $totalQuestion, 'position' => $key, 'alphabet' => $alphabet])
         @endforeach
-
         <div id="anim"></div>
     </div>
 </div>