From c3bfe9fea8dcd9a639b571403fb0f5347ec4530a Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Fri, 10 Nov 2006 04:11:10 +0000 Subject: [PATCH] merged, fields should be restored regardless of whether user data is to be restored --- mod/data/restorelib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mod/data/restorelib.php b/mod/data/restorelib.php index 8e08a1e391..bd11f1e678 100644 --- a/mod/data/restorelib.php +++ b/mod/data/restorelib.php @@ -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 -- 2.39.5