From: moodler Date: Sat, 11 Aug 2007 14:33:55 +0000 (+0000) Subject: Fixed the comparison of text to integer (Eloy's credit, see MDL-10808 ) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c9bd927055f991b795f1e9991d03733fe0f562c7;p=moodle.git Fixed the comparison of text to integer (Eloy's credit, see MDL-10808 ) --- diff --git a/question/upgrade.php b/question/upgrade.php index e87daccb26..6b04a82bcc 100644 --- a/question/upgrade.php +++ b/question/upgrade.php @@ -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){