]> git.mjollnir.org Git - moodle.git/commitdiff
Adding two helper functions and modify upgrade to
authorstronk7 <stronk7>
Fri, 26 Jan 2007 21:28:48 +0000 (21:28 +0000)
committerstronk7 <stronk7>
Fri, 26 Jan 2007 21:28:48 +0000 (21:28 +0000)
work properly under MSSQL and Oracle. MDL-8303

Merged from MOODLE_17_STABLE

question/type/numerical/db/upgrade.php

index 05dab091e1d5a384d29f01f63c741874891fbec9..d01a86e1a44bb5be25c85461d6e6b1c30c34229d 100644 (file)
@@ -27,7 +27,7 @@ function xmldb_qtype_numerical_upgrade($oldversion=0) {
     // from the empty string to *, to be like short answer questions.
     if ($result && $oldversion < 2006121500) {
         $result = set_field_select('question_answers', 'answer', '*',
-                "answer = '' AND question IN (SELECT id FROM {$CFG->prefix}question WHERE qtype = '" . NUMERICAL . "')");
+            sql_compare_text('answer') . " = '" . sql_empty() . "' AND question IN (SELECT id FROM {$CFG->prefix}question WHERE qtype = '" . NUMERICAL . "')");
     }
 
     return $result;