diff --git a/question/export.php b/question/export.php
index e087eac6aa3..057fc725b0f 100644
--- a/question/export.php
+++ b/question/export.php
@@ -93,15 +93,15 @@
$qformat->setContexttofile(!empty($from_form->contexttofile));
if (! $qformat->exportpreprocess()) { // Do anything before that we need to
- error(get_string('exporterror', 'quiz'), $thispageurl->out());
+ print_error('exporterror', 'quiz', $thispageurl->out());
}
if (! $qformat->exportprocess()) { // Process the export data
- error(get_string('exporterror', 'quiz'), $thispageurl->out());
+ print_error('exporterror', 'quiz', $thispageurl->out());
}
if (! $qformat->exportpostprocess()) { // In case anything needs to be done after
- error(get_string('exporterror', 'quiz'), $thispageurl->out());
+ print_error('exporterror', 'quiz', $thispageurl->out());
}
echo "
";
diff --git a/question/import.php b/question/import.php
index 9af6270e5b2..f75474146f4 100644
--- a/question/import.php
+++ b/question/import.php
@@ -19,7 +19,6 @@
// get display strings
$txt = new stdClass();
- $txt->importerror = get_string('importerror','quiz');
$txt->importquestions = get_string("importquestions", "quiz");
list($catid, $catcontext) = explode(',', $pagevars['cat']);
@@ -134,17 +133,17 @@
// Do anything before that we need to
if (! $qformat->importpreprocess()) {
- error($txt->importerror, $thispageurl->out());
+ print_error('importerror', 'quiz', $thispageurl->out());
}
// Process the uploaded file
if (! $qformat->importprocess()) {
- error($txt->importerror, $thispageurl->out());
+ print_error('importerror', 'quiz', $thispageurl->out());
}
// In case anything needs to be done after
if (! $qformat->importpostprocess()) {
- error($txt->importerror, $thispageurl->out());
+ print_error('importerror', 'quiz', $thispageurl->out());
}
echo "
";