]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6655 @0:20
authorsoufiane <soufiane@cubedesigners.com>
Tue, 23 Jan 2024 11:30:08 +0000 (12:30 +0100)
committersoufiane <soufiane@cubedesigners.com>
Tue, 23 Jan 2024 11:30:08 +0000 (12:30 +0100)
js/quiz.screen.outro.js

index 5b51780a49be1f30a93b1c2585ec986f29343965..4e56a6462a21f4ab28a66b343e759c0a1c6615ae 100644 (file)
@@ -218,12 +218,15 @@ QuizScreenOutro.prototype = {
         let answersUser = this.quiz.score.answers;
         let wrongIcon = getSpriteIcon("quiz-wrong");
 
+        console.log(status)
+        console.log(this.quiz.score)
+
         reviewList = reviewList.map((c, i) => {
             return {
                 'question': c['question'],
                 'type': c['type'],
                 'correctAnswers': c['answers'].filter((c__,k) => { //on filtre les rĂ©ponses
-                    let status_ = answersUser[i]
+                    let status_ = c['answers']
                     if(c['type'] === "multiple") {
                         status_ = parseInt(c['answers'][k].correct) === 1;
                     }
@@ -239,7 +242,7 @@ QuizScreenOutro.prototype = {
                     if(c['type'] === "match" && !quiz.score.isPassed() && c['answers'][answersUser[i][k_]] > 0) {
                         c_['proposition'] = c['answers'][answersUser[i][k_]]['proposition']
                     }
-                    c_['status'] = status[i].answers[[answersUser[i][k_]]]
+                    c_['status'] = status[i].answers[k_]
                     return c_
                 }),
                 'status': status[i].ok,
@@ -247,6 +250,8 @@ QuizScreenOutro.prototype = {
             }
         })
 
+        console.log('reviewList',reviewList)
+
         let html = '';
         for (var i in reviewList) {
             i = parseInt(i);