]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed the comparison of text to integer (Eloy's credit, see MDL-10808 )
authormoodler <moodler>
Sat, 11 Aug 2007 14:33:55 +0000 (14:33 +0000)
committermoodler <moodler>
Sat, 11 Aug 2007 14:33:55 +0000 (14:33 +0000)
question/upgrade.php

index e87daccb26218528b88c58f2b3788426440b1220..6b04a82bcc2d4935bf61783b81df0f368822231d 100644 (file)
@@ -119,7 +119,8 @@ function question_cwqpfs_to_update($categories = null){
     //any cats with questions picking from subcats?
     if (!$cwqpfs = get_records_sql_menu("SELECT DISTINCT qc.id, 1 ".
                                     "FROM {$CFG->prefix}question q, {$CFG->prefix}question_categories qc ".
-                                    "WHERE q.qtype='random' AND qc.id = q.category AND q.questiontext = 1")){
+                                    "WHERE q.qtype='random' AND qc.id = q.category AND ".
+                                     sql_compare_text('q.questiontext'). " = '1'")){
         return array();
     } else {
         if ($categories === null){