"MDL-14129, fix print_error"

This commit is contained in:
dongsheng 2008-05-08 06:27:28 +00:00
parent 54d8f804fa
commit 3db241b342
8 changed files with 15 additions and 12 deletions

View File

@ -43,7 +43,7 @@
if (set_config('mnet_dispatcher_mode', $form->mode)) { if (set_config('mnet_dispatcher_mode', $form->mode)) {
redirect('index.php', get_string('changessaved')); redirect('index.php', get_string('changessaved'));
} else { } else {
print_error('Invalid action parameter.', '', 'index.php'); print_error('invalidaction', '', 'index.php');
} }
} }
} elseif (!empty($form->submit) && $form->submit == get_string('delete')) { } elseif (!empty($form->submit) && $form->submit == get_string('delete')) {

View File

@ -7,7 +7,7 @@ httpsrequired();
/// Define variables used in page /// Define variables used in page
if (!$site = get_site()) { if (!$site = get_site()) {
print_error("No site found!"); print_error("siteisnotdefined");
} }
$authsequence = get_enabled_auth_plugins(true); // auths, in sequence $authsequence = get_enabled_auth_plugins(true); // auths, in sequence

View File

@ -7,7 +7,7 @@ httpsrequired();
/// Define variables used in page /// Define variables used in page
if (!$site = get_site()) { if (!$site = get_site()) {
print_error("No site found!"); print_error("siteisnotdefined", 'debug');
} }
$authsequence = get_enabled_auth_plugins(true); // auths, in sequence $authsequence = get_enabled_auth_plugins(true); // auths, in sequence

View File

@ -62,7 +62,7 @@ class auth_plugin_mnet extends auth_plugin_base {
* @return bool Authentication success or failure. * @return bool Authentication success or failure.
*/ */
function user_login($username, $password) { 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/>"; $message .= "ERROR $code:<br/>$errormessage<br/>";
} }
print_error("RPC auth/mnet/user_authorise:<br/>$message"); print_error("rpcerror", '', '', $message");
} }
unset($mnetrequest); unset($mnetrequest);
@ -372,7 +372,7 @@ class auth_plugin_mnet extends auth_plugin_base {
if (!$bool) { if (!$bool) {
// TODO: Jonathan to clean up mess // TODO: Jonathan to clean up mess
// Actually, this should never happen (modulo race conditions) - ML // 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 // set up the session

View File

@ -17,7 +17,7 @@ require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
require_login(); require_login();
if (!is_enabled_auth('mnet')) { if (!is_enabled_auth('mnet')) {
print_error('mnet is disabled'); print_error('mnetdisable');
} }
// grab the GET params - wantsurl could be anything - take it // grab the GET params - wantsurl could be anything - take it

View File

@ -20,7 +20,7 @@ if (!$site = get_site()) {
} }
if (!is_enabled_auth('mnet')) { if (!is_enabled_auth('mnet')) {
print_error('mnet is disabled'); print_error('mnetdisable');
} }
// grab the GET params // grab the GET params
$token = required_param('token', PARAM_BASE64); $token = required_param('token', PARAM_BASE64);

View File

@ -21,7 +21,7 @@ httpsrequired();
/// Define variables used in page /// Define variables used in page
if (!$site = get_site()) { if (!$site = get_site()) {
print_error("No site found!"); print_error("siteisnotdefined", 'debug');
} }
if (empty($CFG->langmenu)) { if (empty($CFG->langmenu)) {

View 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['cannotupdatelevel'] = 'Could not update the indent level on that course module';
$string['cannotupdaterole'] = 'Cannot update role!'; $string['cannotupdaterole'] = 'Cannot update role!';
$string['cannotupdatemod'] = 'Could not update the $a'; $string['cannotupdatemod'] = 'Could not update the $a';
$string['cannotupdateuser'] = 'updating user failed';
$stirng['cannotupdaterss'] = 'Cannot update rss'; $stirng['cannotupdaterss'] = 'Cannot update rss';
$string['cannotupdatesummary'] = 'Could not update the summary!'; $string['cannotupdatesummary'] = 'Could not update the summary!';
$string['cannotupdatesubcate'] = 'Could not update a child category!'; $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['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['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['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['moduledoesnotexist'] = 'This module does not exist';
$string['moduleinstancedoesnotexist'] = 'The instance of 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'; $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['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['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['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['scheduledbackupsdisabled'] = 'Scheduled backups have been disabled by the server admin';
$string['sectionnotexist'] = 'This section does not exist'; $string['sectionnotexist'] = 'This section does not exist';
$string['sendmessage'] = 'Send Message'; $string['sendmessage'] = 'Send Message';