]> git.mjollnir.org Git - moodle.git/commitdiff
merged, fields should be restored regardless of whether user data is to be restored
authortoyomoyo <toyomoyo>
Fri, 10 Nov 2006 04:11:10 +0000 (04:11 +0000)
committertoyomoyo <toyomoyo>
Fri, 10 Nov 2006 04:11:10 +0000 (04:11 +0000)
mod/data/restorelib.php

index 8e08a1e3918d11e1dfee7892ed54e57e175c79cb..bd11f1e67860a7cde5dcd233935b28fdbc2787a5 100644 (file)
@@ -112,11 +112,12 @@ function data_restore_mods($mod,$restore) {
                 // Moodle 1.5
                 $restore_userdata_selected = $restore->mods['data']->userinfo;
             }
+            
+            //Restore data_fields first!!! need to hold an array of [oldid]=>newid due to double dependencies
+            $status = $status and data_fields_restore_mods ($mod->id, $newid, $info, $restore);
+            
             if ($restore_userdata_selected) {
-                //Restore data_fields first!!! need to hold an array of [oldid]=>newid due to double dependencies
-                $status = $status and data_fields_restore_mods ($mod->id, $newid, $info, $restore);
                 $status = $status and data_records_restore_mods ($mod->id, $newid, $info, $restore);
-
             }
 
             // If the backup contained $data->participants, $data->assesspublic