From: tjhunt Date: Fri, 15 Aug 2008 06:44:12 +0000 (+0000) Subject: Temporary fix to the fact that the files API work has broken question import. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8239d2c6c83413411ba72342f853dd81c46393b4;p=moodle.git Temporary fix to the fact that the files API work has broken question import. --- diff --git a/question/import_form.php b/question/import_form.php index 6e5a7766a0..f20dcd4897 100644 --- a/question/import_form.php +++ b/question/import_form.php @@ -52,7 +52,6 @@ class question_import_form extends moodleform { //-------------------------------------------------------------------------------- $mform->addElement('header', 'importfileupload', get_string('importfileupload','quiz')); - $this->set_upload_manager(new upload_manager('newfile', true, false, $COURSE, false, 0, false, true, false)); $mform->addElement('file', 'newfile', get_string('upload')); //-------------------------------------------------------------------------------- $mform->addElement('submit', 'submitbutton', get_string('uploadthisfile')); @@ -77,7 +76,9 @@ class question_import_form extends moodleform { function get_importfile_name(){ if ($this->is_submitted() and $this->is_validated()) { // return the temporary filename to process - return $this->_upload_manager->files['newfile']['tmp_name']; + // TODO change this to use the files API properly. + return $_FILES['newfile']['tmp_name']; +// return $this->_upload_manager->files['newfile']['tmp_name']; }else{ return NULL; }