From 643a7e2b59a18acbbc934bc0c1cf8fdb381a4022 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 23 Oct 2014 11:18:13 +0200 Subject: [PATCH] Fixing query in question pool fixes BT#8922 --- main/exercice/question_pool.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/exercice/question_pool.php b/main/exercice/question_pool.php index 8a983a8954..f958b91e3c 100755 --- a/main/exercice/question_pool.php +++ b/main/exercice/question_pool.php @@ -493,6 +493,7 @@ if ($exerciseId > 0) { SELECT q.* FROM $TBL_QUESTIONS q LEFT OUTER JOIN $TBL_EXERCICE_QUESTION r ON (q.c_id = r.c_id AND q.id = r.question_id) + $from WHERE q.c_id = '$selected_course' AND r.question_id is null @@ -503,6 +504,7 @@ if ($exerciseId > 0) { SELECT q.* FROM $TBL_QUESTIONS q INNER JOIN $TBL_EXERCICE_QUESTION r ON (q.c_id = r.c_id AND q.id = r.question_id) + $from WHERE r.c_id = '$selected_course' AND (r.exercice_id = '-1' OR r.exercice_id = '0')