Skip to content

Commit

Permalink
MDL-16508
Browse files Browse the repository at this point in the history
Changed deprecated error() calls to print_error()
  • Loading branch information
thepurpleblob committed Sep 15, 2008
1 parent e118ad4 commit c435415
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions question/export.php
Expand Up @@ -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 "<hr />";

Expand Down
7 changes: 3 additions & 4 deletions question/import.php
Expand Up @@ -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']);
Expand Down Expand Up @@ -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 "<hr />";
Expand Down

0 comments on commit c435415

Please sign in to comment.