From c9bd927055f991b795f1e9991d03733fe0f562c7 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 11 Aug 2007 14:33:55 +0000 Subject: [PATCH] Fixed the comparison of text to integer (Eloy's credit, see MDL-10808 ) --- question/upgrade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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){ -- 2.39.5