From c43541599b8399e586e05a7fd340cb3d645495c2 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Mon, 15 Sep 2008 14:21:02 +0000 Subject: [PATCH] MDL-16508 Changed deprecated error() calls to print_error() --- question/export.php | 6 +++--- question/import.php | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) 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 "
";