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

This commit is contained in:
thepurpleblob
2005-08-26 11:33:08 +00:00
parent e45b5f24d4
commit 55fdf029ab
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -28,10 +28,11 @@ class quiz_default_format {
/// 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;
}
+1 -1
View File
@@ -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");
}