From 2ef2b3f19d499c5222fc161524fd6fe2b5d41d1c Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 23 Mar 2006 02:50:21 +0000 Subject: [PATCH] Fixed Fatal error: Call to undefined function get_course() in /data/www/html/server/dev/mod/data/field/file/field.class.php on line 133 --- mod/data/field/file/field.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/data/field/file/field.class.php b/mod/data/field/file/field.class.php index 61f7bb3ecd..88f0c336db 100755 --- a/mod/data/field/file/field.class.php +++ b/mod/data/field/file/field.class.php @@ -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){ -- 2.39.5