MDL-16464 qtype_multichoice: fix missed question -> questionid.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 2 Oct 2013 09:16:22 +0000 (10:16 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 2 Oct 2013 09:16:22 +0000 (10:16 +0100)
question/type/multichoice/questiontype.php

index 164acce..d7cea13 100644 (file)
@@ -176,7 +176,7 @@ class qtype_multichoice extends question_type {
 
     public function delete_question($questionid, $contextid) {
         global $DB;
-        $DB->delete_records('qtype_multichoice_options', array('question' => $questionid));
+        $DB->delete_records('qtype_multichoice_options', array('questionid' => $questionid));
 
         parent::delete_question($questionid, $contextid);
     }