From: jamiesensei Date: Sat, 21 Jun 2008 16:35:26 +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=01f3ba135041002b064ea8c6d377d8368495a3f3;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. Ooops, and adding DB as global variable in method. --- diff --git a/question/type/calculated/questiontype.php b/question/type/calculated/questiontype.php index 8ef3a7c002..2e310c3386 100644 --- a/question/type/calculated/questiontype.php +++ b/question/type/calculated/questiontype.php @@ -1085,6 +1085,7 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype * Alternate DB table prefix may be used to facilitate data deletion. */ function generate_test($name, $courseid = null) { + global $DB; list($form, $question) = parent::generate_test($name, $courseid); $form->feedback = 1; $form->multiplier = array(1, 1);