Permalink
Browse files

Import now passes $course object to import/export format object.

  • Loading branch information...
1 parent e45b5f2 commit 55fdf029ab8f71c705dd57503b520cb058cf0500 thepurpleblob committed Aug 26, 2005
Showing with 3 additions and 2 deletions.
  1. +2 −1 mod/quiz/format.php
  2. +1 −1 mod/quiz/import.php
View
@@ -28,10 +28,11 @@ function provide_export() {
/// Importing functions
- function importpreprocess($category) {
+ function importpreprocess($category, $course=NULL ) {
/// Does any pre-processing that may be desired
$this->category = $category; // Important
+ $this->course = $course;
return true;
}
View
@@ -57,7 +57,7 @@
$classname = "quiz_format_$form->format";
$format = new $classname();
- if (! $format->importpreprocess($category)) { // Do anything before that we need to
+ if (! $format->importpreprocess($category,$course)) { // Do anything before that we need to
error("Error occurred during pre-processing!",
"$CFG->wwwroot/mod/quiz/import.php?category=$category->id");
}

0 comments on commit 55fdf02

Please sign in to comment.