wip-MDL-31396 - data - Exporting a preset as a zip code changed to remove errors.
authorAdrian Greeve <adrian@moodle.com>
Thu, 2 Feb 2012 23:59:52 +0000 (07:59 +0800)
committerAdrian Greeve <adrian@moodle.com>
Mon, 6 Feb 2012 01:46:20 +0000 (09:46 +0800)
mod/data/lib.php

index 2bee85b..22ee9a7 100644 (file)
@@ -3144,7 +3144,7 @@ function data_presets_export($course, $cm, $data, $tostorage=false) {
     $presetname = clean_filename($data->name) . '-preset-' . gmdate("Ymd_Hi");
     $exportsubdir = "mod_data/presetexport/$presetname";
     make_temp_directory($exportsubdir);
     $presetname = clean_filename($data->name) . '-preset-' . gmdate("Ymd_Hi");
     $exportsubdir = "mod_data/presetexport/$presetname";
     make_temp_directory($exportsubdir);
-    $exportdir = "$CFG->dataroot/$exportsubdir";
+    $exportdir = "$CFG->tempdir/$exportsubdir";
 
     // Assemble "preset.xml":
     $presetxmldata = data_presets_generate_xml($course, $cm, $data);
 
     // Assemble "preset.xml":
     $presetxmldata = data_presets_generate_xml($course, $cm, $data);