mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 13:33:52 +02:00
Merge branch 'MDL-68265-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
8ba6b97577
@ -66,9 +66,7 @@ if ($data = $mform->get_data()) {
|
||||
require_sesskey();
|
||||
|
||||
$realfilename = $mform->get_new_filename('questionfile');
|
||||
//TODO: Leave all imported questions in Questionimport for now.
|
||||
$importfile = "{$CFG->tempdir}/questionimport/{$realfilename}";
|
||||
make_temp_directory('questionimport');
|
||||
$importfile = make_request_directory() . "/{$realfilename}";
|
||||
if (!$result = $mform->save_file('questionfile', $importfile, true)) {
|
||||
throw new moodle_exception('uploadproblem');
|
||||
}
|
||||
|
@ -86,9 +86,7 @@ if ($form = $import_form->get_data()) {
|
||||
// work out if this is an uploaded file
|
||||
// or one from the filesarea.
|
||||
$realfilename = $import_form->get_new_filename('newfile');
|
||||
|
||||
$importfile = "{$CFG->tempdir}/questionimport/{$realfilename}";
|
||||
make_temp_directory('questionimport');
|
||||
$importfile = make_request_directory() . "/{$realfilename}";
|
||||
if (!$result = $import_form->save_file('newfile', $importfile, true)) {
|
||||
throw new moodle_exception('uploadproblem');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user