From 08121fadcb5a1c35a5fa15800b3ee6bee1e10aa2 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 9 May 2008 15:02:24 +0000 Subject: [PATCH] Problem when editing calculated questions when installed on Postgres. --- question/type/calculated/questiontype.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/question/type/calculated/questiontype.php b/question/type/calculated/questiontype.php index a587a684b1..4ef8358604 100644 --- a/question/type/calculated/questiontype.php +++ b/question/type/calculated/questiontype.php @@ -921,12 +921,13 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype $questionusingstr = get_string('usedinquestion','qtype_calculated'); $itemscountstr = get_string('itemscount','qtype_datasetdependent'); $text =''; - if (!empty($form->category)) { + if (!empty($form->category)) { + list($category) = explode(',', $form->category); $sql = "SELECT i.*,d.* FROM {$CFG->prefix}question_datasets d, {$CFG->prefix}question_dataset_definitions i WHERE i.id = d.datasetdefinition - AND i.category = '$form->category'; + AND i.category = $category; " ; if ($records = get_records_sql($sql)) { foreach ($records as $r) { -- 2.39.5