I'm starting to contribute back to the moodle community about some customizations/bug fixes we made here at SFSU, as we haven't got a chance to organize these and contribute them back to the community yet.
In original state moodle redirects instructor to system configuration page if restore is cancelled in middle. This is unwanted becuase instructors do not have access to admin page so they will be logged out. In this bug fix we have changed the code to redirect user to respective course index page if restore is canceled.
File(s) effected: /backup/restore.php
Change :
Replaced
#107 print_continue("$CFG->wwwroot/$CFG->admin/index.php");
with
#107 print_continue("$CFG->wwwroot/course/view.php?id=".$id);
Please consider to check this into the moodle core code. Thanks!