]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-14129, fix print_error"
authordongsheng <dongsheng>
Sun, 15 Jun 2008 11:47:27 +0000 (11:47 +0000)
committerdongsheng <dongsheng>
Sun, 15 Jun 2008 11:47:27 +0000 (11:47 +0000)
lang/en_utf8/debug.php
lang/en_utf8/error.php
lib/accesslib.php
lib/adminlib.php

index bded62dd24a23fd991b7aeddbee35e478162ab9f..365bcba1c411ffd90e83fac2506b407199eec856 100644 (file)
@@ -11,6 +11,7 @@ $string['cannotupgradecapabilities'] = 'Had trouble upgrading the core capabilit
 $string['cannotupdateversion'] = 'Upgrade failed!  (Could not update version in config table)';
 $string['cannotupdaterelease'] = 'ERROR: Could not update release version in database!!';
 $string['cannotsetupsite'] = 'Serious Error! Could not set up the site!';
+$string['cannotsetuptable'] = '$a tables could NOT be set up successfully!';
 $string['cannotfindadmin'] = 'Could not find an admin user!';
 $string['cannotupgradedbcustom'] = 'Upgrade of local database customisations failed! (Could not update version in config table)';
 $string['configmoodle'] = 'Moodle has not been configured yet. You need to edit config.php first.';
index 090ccf7f80a43e5cc1fc89553ee24449280ff475..a1aaa5aba0cec517ceb62fca894e28d226083275 100644 (file)
@@ -18,6 +18,7 @@ $string['cannotaddcoursemodule'] = 'Could not add a new course module';
 $string['cannotaddcoursemoduletosection'] = 'Could not add the new course module to that section';
 $string['cannotaddcmtosection'] = 'Could not add the new course module to that section';
 $string['cannotaddrss'] = 'You do not have permission to add rss feeds';
+$string['cannotaddmodule'] = '$a module could not be added to the module list!';
 $string['cannotaddnewmodule'] = 'Could not add a new module of $a';
 $string['cannotaddnewinstance'] = 'Could not add a new instance of $a';
 $string['cannotsaveconfig'] = 'Problem saving config \"$a[0]\" as \"$a[1]\" for plugin \"$a[2]\"'; 
index e72cc410218ed9040cf56370a13102652b198da1..4f6eeb5578c646d46fef3beaba422b8fb4b5a7ec 100755 (executable)
@@ -880,7 +880,7 @@ function require_capability($capability, $context, $userid=NULL, $doanything=tru
 
     if (!has_capability($capability, $context, $userid, $doanything)) {
         $capabilityname = get_capability_string($capability);
-        print_error($errormessage, $stringfile, $errorlink, $capabilityname);
+        print_error('nopermissions', '', $errorlink, $capabilityname);
     }
 }
 
index 3cae116116e198913b44d4c38b5338d7fdcac0da..6a1a87b045c04912f408a698e8220f6017f9f745 100644 (file)
@@ -558,10 +558,10 @@ function upgrade_activity_modules($return) {
                     echo '<hr />';
                     }
                 } else {
-                    print_error($module->name .' module could not be added to the module list!');
+                    print_error('cannotaddmodule', '', '', $module->name);
                 }
             } else {
-                print_error($module->name .' tables could NOT be set up successfully!');
+                print_error('cannotsetuptable', 'debug', '', $module->name);
             }
         }