From: toyomoyo Date: Fri, 10 Nov 2006 04:11:10 +0000 (+0000) Subject: merged, fields should be restored regardless of whether user data is to be restored X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c3bfe9fea8dcd9a639b571403fb0f5347ec4530a;p=moodle.git merged, fields should be restored regardless of whether user data is to be restored --- 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