MDL-25031 fixed question ugprade - credit goes to Mark Nelson
authorPetr Skoda <skodak@moodle.org>
Mon, 15 Nov 2010 05:53:22 +0000 (05:53 +0000)
committerPetr Skoda <skodak@moodle.org>
Mon, 15 Nov 2010 05:53:22 +0000 (05:53 +0000)
question/type/numerical/db/upgrade.php

index b679aaa..96c8014 100644 (file)
@@ -68,7 +68,7 @@ function xmldb_qtype_numerical_upgrade($oldversion) {
         $rs = $DB->get_recordset_sql('
                 SELECT qno.*, q.oldquestiontextformat
                 FROM {question_numerical_options} qno
         $rs = $DB->get_recordset_sql('
                 SELECT qno.*, q.oldquestiontextformat
                 FROM {question_numerical_options} qno
-                JOIN {question} q ON qno = q.id');
+                JOIN {question} q ON qno.question = q.id');
         foreach ($rs as $record) {
             if ($CFG->texteditors !== 'textarea' && $record->oldquestiontextformat == FORMAT_MOODLE) {
                 $record->instructions = text_to_html($record->questiontext, false, false, true);
         foreach ($rs as $record) {
             if ($CFG->texteditors !== 'textarea' && $record->oldquestiontextformat == FORMAT_MOODLE) {
                 $record->instructions = text_to_html($record->questiontext, false, false, true);