Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed where export file is created to course file area, not categor…

…y->course file area
  • Loading branch information...
commit b8e151340ca6e54819a2c99fe878994bc39ea24e 1 parent 6dcd78b
thepurpleblob authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 mod/quiz/format.php
View
6 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 @@ function importpostprocess() {
// 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 @@ function exportprocess($filename) {
// 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)) {
Please sign in to comment.
Something went wrong with that request. Please try again.