"MDL-14129, fix print_error"

This commit is contained in:
dongsheng 2008-06-15 11:07:51 +00:00
parent 655ce32e33
commit d9f30321da
3 changed files with 4 additions and 2 deletions

View File

@ -27,6 +27,7 @@ $string['cannotsavedata'] = 'Cannot save data';
$string['cannotsaveagreement'] = 'Could not save your agreement';
$string['cannotcallscript'] = 'You cannot call this script in that way';
$string['cannotcreatebackupdir'] = 'Could not create backupdata folder. The site administrator needs to fix the file permissions';
$string['cannotcreatecategory'] = 'The category was not inserted.';
$string['cannotcreatedefaultcat'] = 'Error creating a default category for context $a';
$string['cannotcreategroup'] = 'Error creating group';
$string['cannotcreatelangdir'] = 'Cannot create lang dir.';
@ -382,6 +383,7 @@ $string['unknownrole'] = 'Unknown role \"$a\"';
$string['unknownuseraction'] = 'Sorry, I do not understand this user action.';
$string['unknoworder'] = 'Unknown ordering';
$string['unknowparamtype'] = 'Unknown parameter type: $a';
$string['unknowquestiontype'] = 'Unsupported question type $a';
$string['unknowuploadaction'] = 'Error: Unknow upload action ($a).';
$string['unsupportedevent'] = 'Unsupported event type';
$string['upgraderequires19'] = 'ERROR: New Moodle version was installed on server, unfortunately upgrade from the previous version is not supported.<br />Please upgrade first to latest 1.9.x release. You can also return to previous version by reinstalling original files.';

View File

@ -385,7 +385,7 @@ class qformat_default {
$category->sortorder = 999;
$category->stamp = make_unique_id_code();
if (!($id = $DB->insert_record('question_categories', $category))) {
print_error( "cannot create new category - $catname" );
print_error("cannotcreatecategory");
}
$category->id = $id;
$parent = $id;

View File

@ -1003,7 +1003,7 @@ class qformat_xml extends qformat_default {
default:
// try support by optional plugin
if (!$data = $this->try_exporting_using_qtypes( $question->qtype, $question )) {
print_error( "Unsupported question type $question->qtype" );
print_error('unknowquestiontype', '', '', $question->qtype );
}
$expout .= $data;
}