My plugin makes backup of an activity in a course and then restores it into another course with backup/restore API.
How can I specify section number or section id to restore this activity into?
Here is my code:
$bc = new backup_controller(backup::TYPE_1ACTIVITY, $mod->id, backup::FORMAT_MOODLE, backup::INTERACTIVE_NO, backup::MODE_IMPORT, $admin_user->id);
$backupid = $bc->get_backupid();
$rc = new restore_controller($backupid, $newcourse->id, backup::INTERACTIVE_NO, backup::MODE_IMPORT, $USER->id, backup::TARGET_CURRENT_ADDING);