]> git.mjollnir.org Git - moodle.git/commitdiff
Changed where export file is created to course file area, not category->course file...
authorthepurpleblob <thepurpleblob>
Tue, 6 Jul 2004 14:27:38 +0000 (14:27 +0000)
committerthepurpleblob <thepurpleblob>
Tue, 6 Jul 2004 14:27:38 +0000 (14:27 +0000)
mod/quiz/format.php

index e1cb9e3501bf5676a1199f27fc3c72c05328a0f4..b9e542a247057f98d16c6ecdd5c78e084954b9f0 100644 (file)
@@ -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)) {