]> git.mjollnir.org Git - moodle.git/commitdiff
questiontypes: MDL-17800
authortjhunt <tjhunt>
Fri, 16 Jan 2009 04:24:24 +0000 (04:24 +0000)
committertjhunt <tjhunt>
Fri, 16 Jan 2009 04:24:24 +0000 (04:24 +0000)
Fix another merge error.

question/type/questiontype.php

index 8dbe88b5929f9b334bf1725031b5bb1bf8c6879e..c8f6bc77208fb368fd20049ba92cf74aa2509bb7 100644 (file)
@@ -1701,6 +1701,7 @@ class default_questiontype {
      * This is used in question/restorelib.php
      */
     function restore($old_question_id,$new_question_id,$info,$restore) {
+        global $DB;
 
         $status = true;
         $extraquestionfields = $this->extra_question_fields();
@@ -1716,7 +1717,7 @@ class default_questiontype {
             foreach ($extraquestionfields as $field) {
                 $record->$field = backup_todb($recordinfo['#'][strtoupper($field)]['0']['#']);
             }
-            if (!insert_record($questionextensiontable, $record)) {
+            if (!$DB->insert_record($questionextensiontable, $record)) {
                 echo "Can't insert record in $questionextensiontable when restoring " .
                                 $this->name() . ' question id ' . $question;
                 $status = false;