Import now passes $course object to import/export format object.
This commit is contained in:
+2
-1
@@ -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
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user