From da1bee2cb93884cf07ef8a3092b8eb884420e503 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Sun, 11 Dec 2011 22:15:48 +0000 Subject: [PATCH] MDL-30689 qtype base: fix typo in extra_answer_fields code. --- question/type/questiontype.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/type/questiontype.php b/question/type/questiontype.php index 751f6db6b70..f0b08766164 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -488,7 +488,7 @@ class default_questiontype { $question->options->answers = $DB->get_records_sql(" SELECT qa.*, qax." . implode(', qax.', $extra_answer_fields) . " FROM {question_answers} qa, {$answer_extension_table} qax - WHERE qa.questionid = ? AND qax.answerid = qa.id", array($question->id)); + WHERE qa.question = ? AND qax.answerid = qa.id", array($question->id)); if (!$question->options->answers) { echo $OUTPUT->notification("Failed to load question answers from the table $answer_extension_table for questionid " . $question->id);