Merge branch MDL-29189-master of git://github.com/samhemelryk/moodle
[moodle.git] / mod / assignment / lib.php
index 8811370..e1c3d73 100644 (file)
@@ -3730,7 +3730,7 @@ function assignment_extend_settings_navigation(settings_navigation $settings, na
 function assignment_pack_files($filesforzipping) {
         global $CFG;
         //create path for new zip file.
-        $tempzip = tempnam($CFG->dataroot.'/temp/', 'assignment_');
+        $tempzip = tempnam($CFG->tempdir.'/', 'assignment_');
         //zip files
         $zipper = new zip_packer();
         if ($zipper->archive_to_pathname($filesforzipping, $tempzip)) {