]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed Fatal error: Call to undefined function get_course() in /data/www/html/server...
authormoodler <moodler>
Thu, 23 Mar 2006 02:50:21 +0000 (02:50 +0000)
committermoodler <moodler>
Thu, 23 Mar 2006 02:50:21 +0000 (02:50 +0000)
mod/data/field/file/field.class.php

index 61f7bb3ecd0df4e4d7428fae2baf719e0250d2cd..88f0c336db26598871ea2cd94430ae1ea1ca073c 100755 (executable)
@@ -130,11 +130,11 @@ class data_field_file extends data_field_base {
         $names = explode('_',$name);
         switch ($names[2]) {
             case 0:    //file just uploaded
-                $course = get_course('course', 'id', $this->data->course);
+                //$course = get_course('course', 'id', $this->data->course);
 
                 $filename = $_FILES[$names[0].'_'.$names[1]];
                 $filename = $filename['name'];
-                $dir = $course->id.'/'.$CFG->moddata.'/data/'.$this->data->id.'/'.$this->field->id.'/'.$recordid;
+                $dir = $this->data->course.'/'.$CFG->moddata.'/data/'.$this->data->id.'/'.$this->field->id.'/'.$recordid;
 
                 //only use the manager if file is present, to avoid "are you sure you selected a file to upload" msg
                 if ($filename){