From 0aa78279aeff926dd75eea39b18754d2e69ae064 Mon Sep 17 00:00:00 2001 From: Eloy Lafuente Date: Wed, 28 Jul 2010 22:23:15 +0000 Subject: [PATCH] MDL-21432 backup - fix for section and activity restore --- backup/moodle2/restore_plan_builder.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup/moodle2/restore_plan_builder.class.php b/backup/moodle2/restore_plan_builder.class.php index 025922da098..ee5176a4f7f 100644 --- a/backup/moodle2/restore_plan_builder.class.php +++ b/backup/moodle2/restore_plan_builder.class.php @@ -79,10 +79,10 @@ abstract class restore_plan_builder { switch ($controller->get_type()) { case backup::TYPE_1ACTIVITY: - self::build_activity_plan($controller, $controller->get_courseid()); + self::build_activity_plan($controller, key($controller->get_info()->activities)); break; case backup::TYPE_1SECTION: - self::build_section_plan($controller, $controller->get_courseid()); + self::build_section_plan($controller, key($controller->get_info()->sections)); break; case backup::TYPE_1COURSE: self::build_course_plan($controller, $controller->get_courseid());