]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-14129, fix print_error"
authordongsheng <dongsheng>
Thu, 8 May 2008 06:27:28 +0000 (06:27 +0000)
committerdongsheng <dongsheng>
Thu, 8 May 2008 06:27:28 +0000 (06:27 +0000)
admin/mnet/index.php
auth/ldap/ntlmsso_attempt.php
auth/ldap/ntlmsso_finish.php
auth/mnet/auth.php
auth/mnet/jump.php
auth/mnet/land.php
auth/shibboleth/login.php
lang/en_utf8/error.php

index 65117677f4d7dfc075fb72949676594e9fbe6390..10e477c28d181051ac0547086af3294d36a5425b 100644 (file)
@@ -43,7 +43,7 @@
                 if (set_config('mnet_dispatcher_mode', $form->mode)) {
                     redirect('index.php', get_string('changessaved'));
                 } else {
-                    print_error('Invalid action parameter.', '', 'index.php');
+                    print_error('invalidaction', '', 'index.php');
                 }
             }
         } elseif (!empty($form->submit) && $form->submit == get_string('delete')) {
index 959f8dc6bf57c3ef48909e1779782c928b9966d8..8f2325cf19c208d98ef49eb2de156c4ec7aad403 100644 (file)
@@ -7,7 +7,7 @@ httpsrequired();
 
 /// Define variables used in page
 if (!$site = get_site()) {
-    print_error("No site found!");
+    print_error("siteisnotdefined");
 }
 
 $authsequence = get_enabled_auth_plugins(true); // auths, in sequence
@@ -31,4 +31,4 @@ redirect($CFG->wwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
 
 
 
-?>
\ No newline at end of file
+?>
index 92b22ee8e4d9a07fa44d5b9bb1e641086348a5a2..1fdc5f4322160128aa2df4b632394822e938400c 100644 (file)
@@ -7,7 +7,7 @@ httpsrequired();
 
 /// Define variables used in page
 if (!$site = get_site()) {
-    print_error("No site found!");
+    print_error("siteisnotdefined", 'debug');
 }
 
 $authsequence = get_enabled_auth_plugins(true); // auths, in sequence
@@ -27,4 +27,4 @@ if (!$authplugin->ntlmsso_finish()) {
     redirect($CFG->wwwroot . '/login/index.php?authldap_skipntlmsso=1', 
              get_string('ntlmsso_failed','auth'), 3);
 }
-?>
\ No newline at end of file
+?>
index 2381ca70fe8318af93b5c27ecd150ba1f2c788f8..9c001f1d1a5b934898596fb5f225d2808ce24bda 100644 (file)
@@ -62,7 +62,7 @@ class auth_plugin_mnet extends auth_plugin_base {
      * @return bool Authentication success or failure.
      */
     function user_login($username, $password) {
-        return false; // print_error("Remote MNET users cannot login locally.");
+        return false; // print_error("mnetlocal");
     }
 
     /**
@@ -273,7 +273,7 @@ class auth_plugin_mnet extends auth_plugin_base {
                 }
                 $message .= "ERROR $code:<br/>$errormessage<br/>";
             }
-            print_error("RPC auth/mnet/user_authorise:<br/>$message");
+            print_error("rpcerror", '', '', $message");
         }
         unset($mnetrequest);
 
@@ -372,7 +372,7 @@ class auth_plugin_mnet extends auth_plugin_base {
         if (!$bool) {
             // TODO: Jonathan to clean up mess
             // Actually, this should never happen (modulo race conditions) - ML
-            print_error("updating user failed in mnet/auth/confirm_mnet_session ");
+            print_error("cannotupdateuser");
         }
 
         // set up the session
index 2d03a6ba488802e0c0832a8b9efd4b8a40d416ec..2504723de84bcaa80c03848353c2dbd1dab610fb 100644 (file)
@@ -17,7 +17,7 @@ require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
 require_login();
 
 if (!is_enabled_auth('mnet')) {
-    print_error('mnet is disabled');
+    print_error('mnetdisable');
 }
 
 // grab the GET params - wantsurl could be anything - take it
index 3836d56e5ad26bb6dc2e4b61d2778c90bf0b1092..72e7f0a8024b6c7e89f67f3e4df9586d4e109ab7 100644 (file)
@@ -20,7 +20,7 @@ if (!$site = get_site()) {
 }
 
 if (!is_enabled_auth('mnet')) {
-    print_error('mnet is disabled');
+    print_error('mnetdisable');
 }
 // grab the GET params
 $token         = required_param('token',    PARAM_BASE64);
index e81b802224f33efb636f918006f43344e387993f..ff6de2dbf563a43375cd964cac32fe9183bd3853 100644 (file)
@@ -21,7 +21,7 @@ httpsrequired();
 
 /// Define variables used in page
     if (!$site = get_site()) {
-        print_error("No site found!");
+        print_error("siteisnotdefined", 'debug');
     }
 
     if (empty($CFG->langmenu)) {
index f6ce1d41adbbc75cd01d9a2572f8bb411175e113..7aa9496c746442db7816e15c3965d8af2079c384 100644 (file)
@@ -58,6 +58,7 @@ $string['cannotupdatecm'] = 'Could not update the course module with the correct
 $string['cannotupdatelevel'] = 'Could not update the indent level on that course module';
 $string['cannotupdaterole'] = 'Cannot update role!';
 $string['cannotupdatemod'] = 'Could not update the $a';
+$string['cannotupdateuser'] = 'updating user failed';
 $stirng['cannotupdaterss'] = 'Cannot update rss';
 $string['cannotupdatesummary'] = 'Could not update the summary!';
 $string['cannotupdatesubcate'] = 'Could not update a child category!';
@@ -149,6 +150,8 @@ $string['missingfield'] = 'Field \"$a\" is missing.';
 $string['missingrequiredfield'] = 'Some required field is missing';
 $string['mimetexisnotexist'] = 'Your system is not configured to run mimeTeX. You need to download the appropriate executable for you PHP_OS platform from <a href=\"http://moodle.org/download/mimetex/\">http://moodle.org/download/mimetex/</a>, or obtain the C source from <a href=\"http://www.forkosh.com/mimetex.zip\"> http://www.forkosh.com/mimetex.zip</a>, compile it and put the executable into your moodle/filter/tex/ directory.';
 $string['mimetexnotexecutable'] = 'Custom mimetex is not executable!';
+$string['mnetdisable'] = 'mnet is disabled';
+$string['mnetlocal'] = 'Remote MNET users cannot login locally.';
 $string['moduledoesnotexist'] = 'This module does not exist';
 $string['moduleinstancedoesnotexist'] = 'The instance of this module does not exist';
 $string['moduledisable'] = 'This module ($a) has been disabled for this particular course';
@@ -187,7 +190,7 @@ $string['processingstops'] = 'Processing stops here. Remaining records ignored.'
 $string['remotedownloaderror'] = 'Download of component to your server failed, please verify proxy settings, PHP cURL extension is highly recommended.<br /><br />You must download the <a href=\"$a->url\">$a->url</a> file manually, copy it to \"$a->dest\" in your server and unzip it there.';
 $string['remotedownloadnotallowed'] = 'Download of components to your server isn\'t allowed (allow_url_fopen is disabled).<br /><br />You must download the <a href=\"$a->url\">$a->url</a> file manually, copy it to \"$a->dest\" in your server and unzip it there.';
 $string['restricteduser'] = 'Sorry, but your current account \"$a\" is restricted from doing that.';
-$string['rpcerror'] = 'RPC enrol/mnet/available_courses:<br/> ($a)';
+$string['rpcerror'] = 'RPC enrol/mnet/available_courses: ($a)';
 $string['scheduledbackupsdisabled'] = 'Scheduled backups have been disabled by the server admin';
 $string['sectionnotexist'] = 'This section does not exist';
 $string['sendmessage'] = 'Send Message';