Permalink
Browse files

fixing bug MDL-8651: import course data should clean up after itself

  • Loading branch information...
1 parent 2dd1350 commit bd2cf8f04659e8a982185b95e7f5185c51c99575 mjollnir_ committed Mar 2, 2007
Showing with 9 additions and 0 deletions.
  1. +9 −0 backup/restore_execute.html
@@ -53,6 +53,15 @@
print_simple_box(get_string("restorefinished"),"center");
} else {
print_simple_box(get_string("importdatafinished"),"center");
+ $file = $CFG->dataroot . '/'
+ . $SESSION->import_preferences->backup_course
+ . '/backupdata/' . $SESSION->import_preferences->backup_name;
+ if (is_readable($file)) {
+ unlink($file);
+ }
+ else {
+ error_log("import course data: couldn't unlink $file");
+ }
unset($SESSION->restore);
}
print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id);

0 comments on commit bd2cf8f

Please sign in to comment.