]> git.mjollnir.org Git - moodle.git/commitdiff
fixed directory creation issues in advanced upload assignment
authorskodak <skodak>
Mon, 2 Oct 2006 08:44:58 +0000 (08:44 +0000)
committerskodak <skodak>
Mon, 2 Oct 2006 08:44:58 +0000 (08:44 +0000)
mod/assignment/type/upload/assignment.class.php

index 6127b1e5aa29884f43bc6a384c7fdab82ce45e38..ccc670e4f27f3f1e490322d8499dd514a16e43b4 100644 (file)
@@ -504,7 +504,7 @@ class assignment_upload extends assignment_base {
 
         if (data_submitted() and $this->can_manage_responsefiles()) {
             $dir = $this->file_area_name($userid).'/responses';
-            check_dir_exists($CFG->dataroot.'/'.$dir,true);
+            check_dir_exists($CFG->dataroot.'/'.$dir, true, true);
 
             require_once($CFG->dirroot.'/lib/uploadlib.php');
             $um = new upload_manager('newfile',false,true,$this->course,false,0,true);
@@ -541,7 +541,7 @@ class assignment_upload extends assignment_base {
         }
 
         $dir = $this->file_area_name($USER->id);
-        check_dir_exists($CFG->dataroot.'/'.$dir.'/responses',true); // better to create now so that student submissions do not block it later
+        check_dir_exists($CFG->dataroot.'/'.$dir, true, true); // better to create now so that student submissions do not block it later
 
         require_once($CFG->dirroot.'/lib/uploadlib.php');
         $um = new upload_manager('newfile',false,true,$this->course,false,$this->assignment->maxbytes,true);