Quellcode durchsuchen

WIP: Fix query that makes matching update wrong see BT#11761 Need to be tested.

jmontoyaa vor 8 Jahren
Ursprung
Commit
82ae9c3cf1
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      app/Migrations/Schema/V110/Version20151221150100.php

+ 2 - 2
app/Migrations/Schema/V110/Version20151221150100.php

@@ -42,9 +42,9 @@ class Version20151221150100 extends AbstractMigrationChamilo
         $this->addSql("
             UPDATE c_quiz_answer a
             INNER JOIN c_quiz_answer b
-            ON a.question_id = b.question_id
+            ON (a.question_id = b.question_id AND b.c_id = a.c_id)
             INNER JOIN c_quiz_question q
-            ON b.question_id = q.id
+            ON (b.question_id = q.id AND b.c_id = q.c_id)
             SET a.correct = b.id_auto
             WHERE
                 a.correct = b.id AND