From fd9f6cd330ddee22636660b89deee2849e9598a6 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Sun, 15 Jun 2008 12:02:43 +0000 Subject: [PATCH] "MDL-14129, fix print_error" --- lang/en_utf8/error.php | 1 + question/import.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lang/en_utf8/error.php b/lang/en_utf8/error.php index a1aaa5aba0..f9d85fdeed 100644 --- a/lang/en_utf8/error.php +++ b/lang/en_utf8/error.php @@ -71,6 +71,7 @@ $string['cannotfindlang'] = 'Cannot find \"$a\" language pack!'; $string['cannotfindsite'] = 'Cannot find site-level course'; $string['cannotfindteacher'] = 'Cannot find teacher.'; $string['cannotfinduser'] = 'Cannot find user named \"$a\"'; +$string['cannotimport'] = 'Import error'; $string['cannotimportgrade'] = 'Grade import error'; $string['cannotimportformat'] = 'Sorry, importing this format is not yet implemented!'; $string['cannotnetgeo'] = 'Can not connect to NetGeo server at http://netgeo.caida.org, please check proxy settings or better install MaxMind GeoLite City data file.'; diff --git a/question/import.php b/question/import.php index b735f41013..619b9f2adb 100644 --- a/question/import.php +++ b/question/import.php @@ -131,12 +131,14 @@ // Do anything before that we need to if (! $qformat->importpreprocess()) { - print_error($txt->importerror, '', $thispageurl->out()); + //TODO: need more detailed error info + print_error('cannotimport', '', $thispageurl->out()); } // Process the uploaded file if (! $qformat->importprocess()) { - print_error($txt->importerror, '', $thispageurl->out()); + //TODO: need more detailed error info + print_error('cannotimport', '', $thispageurl->out()); } // In case anything needs to be done after -- 2.39.5