mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
MDL-68265 mod_lesson: Switch question import to request dir
This commit is contained in:
parent
d939d6e769
commit
a32a52b0a6
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user