From: jamiesensei Date: Sat, 21 Jun 2008 16:33:55 +0000 (+0000) Subject: CONTRIB-490 "Adding support for generation of test calculated question type" replacin... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c9f4940e6480d8254c00711095a3a6fa1bfe3c7d;p=moodle.git CONTRIB-490 "Adding support for generation of test calculated question type" replacing old dml function call with new call to method on $DB. --- diff --git a/question/type/calculated/questiontype.php b/question/type/calculated/questiontype.php index d01f223d18..8ef3a7c002 100644 --- a/question/type/calculated/questiontype.php +++ b/question/type/calculated/questiontype.php @@ -1101,7 +1101,7 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype $form->questiontext = "What is {a} + {b}?"; if ($courseid) { - $course = get_record('course', 'id', $courseid); + $course = $DB->get_record('course', array('id'=> $courseid)); } $new_question = $this->save_question($question, $form, $course);