]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14913 fixing bad copy paste!
authordanmarsden <danmarsden>
Mon, 11 Aug 2008 05:21:33 +0000 (05:21 +0000)
committerdanmarsden <danmarsden>
Mon, 11 Aug 2008 05:21:33 +0000 (05:21 +0000)
mod/choice/restorelib.php

index 474eabf9abdf7df9da61e99611c380b25398f21f..f137efc74fdb24cf19decbdc9c5716b098e58178 100644 (file)
@@ -195,8 +195,7 @@ function choice_options_restore_mods($choiceid,$info,$restore) {
 
     //This function restores the choice_answers
     function choice_answers_restore_mods($choiceid,$info,$restore) {
-
-        global $CFG;
+        global $CFG, $DB;
 
         $status = true;
         if (isset($info['MOD']['#']['ANSWERS']['0']['#']['ANSWER'])) {
@@ -238,7 +237,7 @@ function choice_options_restore_mods($choiceid,$info,$restore) {
                 }
 
                 //The structure is equal to the db, so insert the choice_answers
-                $newid = insert_record ("choice_answers",$answer);
+                $newid = $DB->insert_record ("choice_answers",$answer);
 
                 //Do some output
                 if (($i+1) % 50 == 0) {