mirror of
https://github.com/moodle/moodle.git
synced 2025-04-23 09:23:09 +02:00
MDL-56642 dataformat: set temp dir
Thanks to Chien Wen-Chang for proposing a patch
This commit is contained in:
parent
e6cb76dfbb
commit
1491f21554
@ -49,6 +49,9 @@ abstract class spout_base extends \core\dataformat\base {
|
||||
*/
|
||||
public function send_http_headers() {
|
||||
$this->writer = \Box\Spout\Writer\WriterFactory::create($this->spouttype);
|
||||
if (method_exists('setTempFolder', $this->writer)) {
|
||||
$this->writer->setTempFolder(make_request_directory());
|
||||
}
|
||||
$filename = $this->filename . $this->get_extension();
|
||||
$this->writer->openToBrowser($filename);
|
||||
if ($this->sheettitle && $this->writer instanceof \Box\Spout\Writer\AbstractMultiSheetsWriter) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user