Dear all:
Just want to report a small glitch (and its possible fix) in the restore.php. I have confirmed that the problem exist in Moodle 1.5.2+, 1.5.4+, and 1.6.3+. In original state Moodle redirects instructor to system configuration page if restore is cancelled in the middle. This is undesired because 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 cancelled.
File(s) affected: /backup/restore.php
Function/part of file affected: if user cancelled restore marked by "//If cancel has been selected, inform and end"
Change:
Replaced
#92 or #85 print_continue("$CFG->wwwroot/$CFG->admin/index.php");
with
#92 or #85 print_continue("$CFG->wwwroot/course/view.php?id=".$id);
Hope this helps...
Backup and restore
Small glitch of restore.php and a quick fix
This discussion has been locked so you can no longer reply to it.