From 162d02c3624a54d5a302fdfeadde20244010b145 Mon Sep 17 00:00:00 2001 From: Eloy Lafuente Date: Wed, 28 Jul 2010 10:30:30 +0000 Subject: [PATCH] NOBUG backup - choice_answers aren't children of choice_options --- mod/choice/backup/moodle2/restore_choice_stepslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/choice/backup/moodle2/restore_choice_stepslib.php b/mod/choice/backup/moodle2/restore_choice_stepslib.php index 8b305f218ce..67d031f9454 100644 --- a/mod/choice/backup/moodle2/restore_choice_stepslib.php +++ b/mod/choice/backup/moodle2/restore_choice_stepslib.php @@ -79,7 +79,7 @@ class restore_choice_activity_structure_step extends restore_activity_structure_ $data = (object)$data; $oldid = $data->id; $data->choiceid = $this->get_new_parentid('choice'); - $data->optionid = $this->get_new_parentid('choice_option'); + $data->optionid = $this->get_mappingid('choice_option', $oldid); $data->userid = $this->get_mappingid('user', $data->userid); $newitemid = $DB->insert_record('choice_answers', $data);