]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-14129, fix print_error"
authordongsheng <dongsheng>
Sun, 15 Jun 2008 11:07:51 +0000 (11:07 +0000)
committerdongsheng <dongsheng>
Sun, 15 Jun 2008 11:07:51 +0000 (11:07 +0000)
lang/en_utf8/error.php
question/format.php
question/format/xml/format.php

index fa59f0b10be326d410ec3de7ae1f05ad7a4308bc..72540a968ab9e29a2b99a62de0605d95877520c1 100644 (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.';
index e6865264f6192e5c7ee8310b6a80577fd8b7976a..1ec5ad46e170f450603bcda7a7965ed40c186749 100644 (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;
index 352fe5ab27e082df15e96c6b3fc432f6290788e4..dd84da0dc8fc82f4635294ca7559ef46dbf58db3 100755 (executable)
@@ -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;
         }