]> git.mjollnir.org Git - moodle.git/commitdiff
Finally, the parenthesis were causing problems too. MDL-10808
authorstronk7 <stronk7>
Sat, 11 Aug 2007 22:58:17 +0000 (22:58 +0000)
committerstronk7 <stronk7>
Sat, 11 Aug 2007 22:58:17 +0000 (22:58 +0000)
question/upgrade.php

index 6b04a82bcc2d4935bf61783b81df0f368822231d..295ae596d8a1e2ca41458bbb26130539e680f84f 100644 (file)
@@ -103,8 +103,8 @@ function question_delete_unused_random(){
     $result = true;
     //delete all 'random' questions that are not been used in a quiz.
     if ($qqis = get_records_sql("SELECT q.* FROM {$CFG->prefix}question q LEFT JOIN ".
-                                    "({$CFG->prefix}quiz_question_instances qqi) ".
-                                    "ON (q.id = qqi.question) WHERE q.qtype='random' AND qqi.question IS NULL")){
+                                    "{$CFG->prefix}quiz_question_instances qqi ".
+                                    "ON q.id = qqi.question WHERE q.qtype='random' AND qqi.question IS NULL")){
         $qqilist = join(array_keys($qqis), ',');
         $result = $result && delete_records_select('question', "id IN ($qqilist)");
     }