Index: preset.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/data/preset.php,v retrieving revision 1.24.2.7 diff -u -r1.24.2.7 preset.php --- mod/data/preset.php 18 Jun 2008 11:39:43 -0000 1.24.2.7 +++ mod/data/preset.php 18 Jun 2008 14:36:27 -0000 @@ -494,12 +494,15 @@ } $exportfile = "$CFG->dataroot/$course->id/moddata/data/$data->id/$presetname.zip"; - @unlink($exportfile); + unlink($exportfile); $status = zip_files($filelist, $exportfile); // ToDo: status check - // ToDo: remove temporary files + foreach ($filelist as $file) { + unlink($file); + } + rmdir($exportdir); - // Return the full path to the ZIP file to be exported: + // Return the full path to the exported preset file: return $exportfile; }