From b8e151340ca6e54819a2c99fe878994bc39ea24e Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Tue, 6 Jul 2004 14:27:38 +0000 Subject: [PATCH] Changed where export file is created to course file area, not category->course file area --- mod/quiz/format.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/quiz/format.php b/mod/quiz/format.php index e1cb9e3501..b9e542a247 100644 --- a/mod/quiz/format.php +++ b/mod/quiz/format.php @@ -12,6 +12,7 @@ class quiz_default_format { var $displayerrors = true; var $category = NULL; + var $course = NULL; var $questionids = array(); /// Importing functions @@ -145,10 +146,11 @@ class quiz_default_format { // Export functions - function exportpreprocess($category) { + function exportpreprocess($category, $course) { /// Does any pre-processing that may be desired $this->category = $category; // Important + $this->course = $course; // As is this! return true; } @@ -160,7 +162,7 @@ class quiz_default_format { // create a directory for the exports (if not already existing) $dirname = get_string("exportfilename","quiz"); - $courseid = $this->category->course; + $courseid = $this->course->id; $path = $CFG->dataroot.'/'.$courseid.'/'.$dirname; if (!is_dir($path)) { if (!mkdir($path, $CFG->directorypermissions)) { -- 2.39.5