diff --git a/admin/auth.php b/admin/auth.php index 2dba551f1ce..d1e16c0e3c0 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -72,7 +72,7 @@ switch ($params->action) { case 'enable': // check auth plugin is valid first if (!exists_auth_plugin($params->auth)) { - error("Authentication plugin '{$params->auth}' is not installed.", $url); + error(get_string('pluginnotinstalled', 'auth', $params->auth), $url); } // add to enabled list if (!array_search($params->auth, $authsenabled)) { @@ -86,7 +86,7 @@ switch ($params->action) { $key = array_search($params->auth, $authsenabled); // check auth plugin is valid if ($key === false) { - error("Authentication plugin '{$params->auth}' is not enabled.", $url); + error(get_string('pluginnotenabled', 'auth', $params->auth), $url); } // move down the list if ($key < (count($authsenabled) - 1)) { @@ -101,7 +101,7 @@ switch ($params->action) { $key = array_search($params->auth, $authsenabled); // check auth is valid if ($key === false) { - error("Authentication plugin '{$params->auth}' is not enabled.", $url); + error(get_string('pluginnotenabled', 'auth', $params->auth), $url); } // move up the list if ($key >= 1) { diff --git a/admin/mnet/access_control.php b/admin/mnet/access_control.php index 046159ff3c5..2d86273d8f1 100644 --- a/admin/mnet/access_control.php +++ b/admin/mnet/access_control.php @@ -39,20 +39,20 @@ if (!empty($action) and confirm_sesskey()) { // boot if insufficient permission if (!has_capability('moodle/user:delete', $sitecontext)) { - error('You are not permitted to modify the MNET access control list.'); + error(get_string('nomodifyacl','mnet')); } // fetch the record in question $id = required_param('id', PARAM_INT); if (!$idrec = get_record('mnet_sso_access_control', 'id', $id)) { - error('Record does not exist.', '/admin/mnet/access_control.php'); + error(get_string('recordnoexists','mnet'), '/admin/mnet/access_control.php'); } switch ($action) { case "delete": delete_records('mnet_sso_access_control', 'id', $id); - notify("SSO ACL: delete record for user '{$idrec->username}' from {$mnethosts[$idrec->mnet_host_id]}."); + notify(get_string('deleteuserrecord', 'mnet', array($idrec->username, $mnethosts[$idrec->mnet_host_id]))); break; case "acl": @@ -60,16 +60,16 @@ if (!empty($action) and confirm_sesskey()) { // require the access parameter, and it must be 'allow' or 'deny' $access = trim(strtolower(required_param('access', PARAM_ALPHA))); if ($access != 'allow' and $access != 'deny') { - error('Invalid access parameter.', '/admin/mnet/access_control.php'); + error(get_string('invalidaccessparam', 'mnet') , '/admin/mnet/access_control.php'); } if (mnet_update_sso_access_control($idrec->username, $idrec->mnet_host_id, $access)) { - notify("SSO ACL: $access user '{$idrec->username}' from {$mnethosts[$idrec->mnet_host_id]}"); + notify(get_string('ssoacl', 'mnet', array($access, $idrec->username, $mnethosts[$idrec->mnet_host_id]))); } break; default: - error('Invalid action parameter.', '/admin/mnet/access_control.php'); + error(get_string('invalidactionparam', 'mnet'), '/admin/mnet/access_control.php'); } redirect('access_control.php', get_string('changessaved')); } @@ -81,16 +81,16 @@ if ($form = data_submitted() and confirm_sesskey()) { // check permissions and verify form input if (!has_capability('moodle/user:delete', $sitecontext)) { - error('You are not permitted to modify the MNET access control list.', '/admin/mnet/access_control.php'); + error(get_string('nomodifyacl','mnet'), '/admin/mnet/access_control.php'); } if (empty($form->username)) { - $formerror['username'] = 'Please enter a username, or a list of usernames separated by commas.'; + $formerror['username'] = get_string('enterausername','mnet'); } if (empty($form->mnet_host_id)) { - $formerror['mnet_host_id'] = 'Please select a remote Moodle host.'; + $formerror['mnet_host_id'] = get_string('selectahost','mnet'); } if (empty($form->access)) { - $formerror['access'] = 'Please select an access level from the list.'; + $formerror['access'] = get_string('selectaccesslevel','mnet'); ; } // process if there are no errors @@ -136,7 +136,7 @@ $acl = get_records('mnet_sso_access_control', '', '', "$sort $dir", '*'); //, $p $aclcount = count_records('mnet_sso_access_control'); if (!$acl) { - print_heading('No entries in the SSO access control list'); + print_heading(get_string('noaclentries','mnet')); $table = NULL; } else { $table->head = $headings; diff --git a/admin/mnet/delete.html b/admin/mnet/delete.html index acc1ada05be..d42352b296b 100644 --- a/admin/mnet/delete.html +++ b/admin/mnet/delete.html @@ -11,13 +11,13 @@ print_heading(get_string('mnetsettings', 'mnet'));
| Deleting a Server | +Deleting a Server | |||||||
| The following warnings were received: + | : '; ?> |
|||||||
| Are you sure you want to delete the server: "name; ?>"? | +: "name; ?>"? | |||||||
| diff --git a/admin/mnet/delete.php b/admin/mnet/delete.php index 14c517b5e22..0904c70fefd 100644 --- a/admin/mnet/delete.php +++ b/admin/mnet/delete.php @@ -10,16 +10,12 @@ $strmnetedithost = get_string('reviewhostdetails', 'mnet'); require_login(); - if (!isadmin()) { - error('Only administrators can use this page!'); - } - $context = get_context_instance(CONTEXT_SYSTEM, SITEID); require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions"); if (!$site = get_site()) { - error('Site isn\'t defined!'); + error(get_string('nosite','mnet')); } /// Initialize variables. @@ -32,7 +28,7 @@ $warn = array(); if ($_SERVER['REQUEST_METHOD'] != 'POST') { - redirect('index.php', "The delete function requires a POST request.",7); + redirect('index.php', get_string('postrequired','mnet') ,7); } if ('verify' == $step) { @@ -47,6 +43,6 @@ $mnet_peer = new mnet_peer(); $mnet_peer->set_id($hostid); $mnet_peer->delete(); - redirect('peers.php', 'Ok - host deleted', 5); + redirect('peers.php', get_string('hostdeleted', 'mnet'), 5); } ?> diff --git a/admin/mnet/index.php b/admin/mnet/index.php index 735f87e9809..53aa1f56818 100644 --- a/admin/mnet/index.php +++ b/admin/mnet/index.php @@ -15,11 +15,11 @@ require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions"); if (!$site = get_site()) { - error('Site isn\'t defined!'); + error(get_string('nosite','mnet')); } if (!function_exists('curl_init') ) { - error('PHP Curl library is not installed'); + error(get_string('nocurl','mnet')); } if (!extension_loaded('openssl')) { @@ -93,11 +93,11 @@ | ||||||||
| Public Key: | +: | public_key; ?> |
||||||
| Networking: | +: |
mnet_dispatcher_mode)? 'checked="true"' : '' ?> /> mnet_dispatcher_mode)? 'checked="true"' : '' ?> /> diff --git a/admin/mnet/mnet_log.php b/admin/mnet/mnet_log.php deleted file mode 100644 index f80b880ce99..00000000000 --- a/admin/mnet/mnet_log.php +++ /dev/null @@ -1,63 +0,0 @@ -dirroot.'/mnet/lib.php'); - - require_login(); - - if (!isadmin()) { - error('Only administrators can use this page!'); - } - - if (!$site = get_site()) { - error('Site isn\'t defined!'); - } - $hostid = optional_param('hostid', NULL, PARAM_INT); - $stradministration = get_string('administration'); - $strconfiguration = get_string('configuration'); - $strmnetsettings = get_string('mnetsettings', 'mnet'); - $strmnetservices = get_string('mnetservices', 'mnet'); - $strmnetlog = get_string('mnetlog', 'mnet'); - $strmnetedithost = get_string('reviewhostdetails', 'mnet'); - $strmneteditservices = get_string('reviewhostservices', 'mnet'); - -print_header("$site->shortname: $strmnetsettings", "$site->fullname", - ''.$stradministration.' -> '. - ''.get_string('mnetsettings', 'mnet').' -> '.get_string('hostsettings', 'mnet')); - -print_heading(get_string('mnetsettings', 'mnet')); -$tabs[] = new tabobject('mnetdetails', 'index.php?step=update&hostid='.$hostid, $strmnetedithost, $strmnetedithost, false); -$tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&hostid='.$hostid, $strmnetservices, $strmnetservices, false); -$tabs[] = new tabobject('mnetlog', 'mnet_log.php?step=list&hostid='.$hostid, $strmnetlog, $strmnetlog, false); -print_tabs(array($tabs), 'mnetlog'); -print_simple_box_start("center", ""); - -?> - -
| ||||||