diff --git a/admin/settings/users.php b/admin/settings/users.php index b54c5eeac9c..8feff1fd7e1 100644 --- a/admin/settings/users.php +++ b/admin/settings/users.php @@ -41,7 +41,7 @@ if ($hassiteconfig $authbyname = array(); foreach ($auths as $auth => $authdir) { - $strauthname = auth_get_plugin_title($auth); + $strauthname = get_string('pluginname', "auth_{$auth}"); $authbyname[$strauthname] = $auth; } ksort($authbyname); diff --git a/admin/uploaduser.php b/admin/uploaduser.php index 71b48b0b0e8..31c8bf61e03 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -1154,7 +1154,7 @@ function uu_allowed_auths() { $plugins = get_enabled_auth_plugins(); $choices = array(); foreach ($plugins as $plugin) { - $choices[$plugin] = auth_get_plugin_title ($plugin); + $choices[$plugin] = get_string('pluginname', "auth_{$plugin}"); } return $choices; diff --git a/auth/cas/lang/en/auth_cas.php b/auth/cas/lang/en/auth_cas.php index fc309550494..cc01ac8bd3c 100644 --- a/auth/cas/lang/en/auth_cas.php +++ b/auth/cas/lang/en/auth_cas.php @@ -53,7 +53,7 @@ $string['auth_cas_proxycas'] = 'Turn this to \'yes\' if you use CASin proxy-mode $string['auth_cas_proxycas_key'] = 'Proxy mode'; $string['auth_cas_server_settings'] = 'CAS server configuration'; $string['auth_cas_text'] = 'Secure connection'; -$string['auth_castitle'] = 'CAS server (SSO)'; $string['auth_cas_use_cas'] = 'Use CAS'; $string['auth_cas_version'] = 'Version of CAS'; $string['CASform'] = 'Authentication choice'; +$string['pluginname'] = 'CAS server (SSO)'; diff --git a/auth/db/lang/en/auth_db.php b/auth/db/lang/en/auth_db.php index 5773d7148b7..380e69a2910 100644 --- a/auth/db/lang/en/auth_db.php +++ b/auth/db/lang/en/auth_db.php @@ -57,7 +57,6 @@ $string['auth_dbsybasequoting'] = 'Use sybase quotes'; $string['auth_dbsybasequotinghelp'] = 'Sybase style single quote escaping - needed for Oracle, MS SQL and some other databases. Do not use for MySQL!'; $string['auth_dbtable'] = 'Name of the table in the database'; $string['auth_dbtable_key'] = 'Table'; -$string['auth_dbtitle'] = 'External database'; $string['auth_dbtype'] = 'The database type (See the ADOdb documentation for details)'; $string['auth_dbtype_key'] = 'Database'; $string['auth_dbupdatinguser'] = 'Updating user {$a->name} id {$a->id}'; @@ -66,3 +65,4 @@ $string['auth_dbuser_key'] = 'DB User'; $string['auth_dbusernotexist'] = 'Cannot update non-existent user: {$a}'; $string['auth_dbuserstoadd'] = 'User entries to add: {$a}'; $string['auth_dbuserstoremove'] = 'User entries to remove: {$a}'; +$string['pluginname'] = 'External database'; diff --git a/auth/email/lang/en/auth_email.php b/auth/email/lang/en/auth_email.php index 888f7edd3ef..7e7df487b36 100644 --- a/auth/email/lang/en/auth_email.php +++ b/auth/email/lang/en/auth_email.php @@ -32,7 +32,6 @@ $string['auth_emailnowexists'] = 'The email address you tried to assign to your $string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the signup page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://recaptcha.net/learnmore.html for more details.
PHP cURL extension is required.'; $string['auth_emailrecaptcha_key'] = 'Enable reCAPTCHA element'; $string['auth_emailsettings'] = 'Settings'; -$string['auth_emailtitle'] = 'Email-based self-registration'; $string['auth_emailupdate'] = 'Email address update'; $string['auth_emailupdatemessage'] = 'Dear {$a->fullname}, @@ -44,3 +43,4 @@ $string['auth_emailupdatetitle'] = 'Confirmation of email update at {$a->site}'; $string['auth_changingemailaddress'] = 'You have requested a change of email address, from {$a->oldemail} to {$a->newemail}. For security reasons, we are sending you an email message at the new address to confirm that it belongs to you. Your email address will be updated as soon as you open the URL sent to you in that message.'; $string['auth_invalidnewemailkey'] = 'Error: if you are trying to confirm a change of email address, you may have made a mistake in copying the URL we sent you by email. Please copy the address and try again.'; $string['auth_outofnewemailupdateattempts'] = 'You have run out of allowed attempts to update your email address. Your update request has been cancelled.'; +$string['pluginname'] = 'Email-based self-registration'; diff --git a/auth/fc/lang/en/auth_fc.php b/auth/fc/lang/en/auth_fc.php index f006b9a719d..7bc3498d816 100644 --- a/auth/fc/lang/en/auth_fc.php +++ b/auth/fc/lang/en/auth_fc.php @@ -32,8 +32,8 @@ $string['auth_fcfppport_key'] = 'Port'; $string['auth_fcchangepasswordurl'] = 'Password-change URL'; $string['auth_fcpasswd'] = 'Password for the account above.'; $string['auth_fcpasswd_key'] = 'Password'; -$string['auth_fctitle'] = 'FirstClass server'; $string['auth_fcuserid'] = 'Userid for FirstClass account with privilege \'Subadministrator\' set.'; $string['auth_fcuserid_key'] = 'User ID'; $string['auth_fchost'] = 'The FirstClass server address. Use the IP number or DNS name.'; $string['auth_fchost_key'] = 'Host'; +$string['pluginname'] = 'FirstClass server'; diff --git a/auth/imap/lang/en/auth_imap.php b/auth/imap/lang/en/auth_imap.php index 4caf9896dbc..a13b8be8b07 100644 --- a/auth/imap/lang/en/auth_imap.php +++ b/auth/imap/lang/en/auth_imap.php @@ -30,6 +30,6 @@ $string['auth_imapchangepasswordurl_key'] = 'Password-change URL'; $string['auth_imapnotinstalled'] = 'Cannot use IMAP authentication. The PHP IMAP module is not installed.'; $string['auth_imapport'] = 'IMAP server port number. Usually this is 143 or 993.'; $string['auth_imapport_key'] = 'Port'; -$string['auth_imaptitle'] = 'IMAP server'; $string['auth_imaptype'] = 'The IMAP server type. IMAP servers can have different types of authentication and negotiation.'; $string['auth_imaptype_key'] = 'Type'; +$string['pluginname'] = 'IMAP server'; diff --git a/auth/ldap/lang/en/auth_ldap.php b/auth/ldap/lang/en/auth_ldap.php index be4a4d45cd8..d1280638262 100644 --- a/auth/ldap/lang/en/auth_ldap.php +++ b/auth/ldap/lang/en/auth_ldap.php @@ -88,7 +88,6 @@ $string['auth_ldap_preventpassindb_key'] = 'Hide passwords'; $string['auth_ldap_search_sub'] = 'Search users from subcontexts.'; $string['auth_ldap_search_sub_key'] = 'Search subcontexts'; $string['auth_ldap_server_settings'] = 'LDAP server settings'; -$string['auth_ldaptitle'] = 'LDAP server'; $string['auth_ldap_unsupportedusertype'] = 'auth: ldap user_create() does not support selected usertype: {$a} (..yet)'; $string['auth_ldap_update_userinfo'] = 'Update user information (firstname, lastname, address..) from LDAP to Moodle. Specify "Data mapping" settings as you need.'; $string['auth_ldap_user_attribute'] = 'Optional: Overrides the attribute used to name/search users. Usually \'cn\'.'; @@ -111,3 +110,4 @@ $string['auth_ntlmsso_subnet_key'] = 'Subnet'; $string['ntlmsso_attempting'] = 'Attempting Single Sign On via NTLM...'; $string['ntlmsso_failed'] = 'Auto-login failed, try the normal login page...'; $string['ntlmsso_isdisabled'] = 'NTLM SSO is disabled.'; +$string['pluginname'] = 'LDAP server'; diff --git a/auth/manual/lang/en/auth_manual.php b/auth/manual/lang/en/auth_manual.php index cbc36edd532..69f6cd0e285 100644 --- a/auth/manual/lang/en/auth_manual.php +++ b/auth/manual/lang/en/auth_manual.php @@ -24,4 +24,4 @@ */ $string['auth_manualdescription'] = 'This method removes any way for users to create their own accounts. All accounts must be manually created by the admin user.'; -$string['auth_manualtitle'] = 'Manual accounts'; +$string['pluginname'] = 'Manual accounts'; diff --git a/auth/mnet/lang/en/auth_mnet.php b/auth/mnet/lang/en/auth_mnet.php index 5ca8a892710..9320160392f 100644 --- a/auth/mnet/lang/en/auth_mnet.php +++ b/auth/mnet/lang/en/auth_mnet.php @@ -28,7 +28,6 @@ $string['auth_mnetdescription'] = 'Users are authenticated according to the web $string['auth_mnet_roamin'] = 'These host\'s users can roam in to your site'; $string['auth_mnet_roamout'] = 'Your users can roam out to these hosts'; $string['auth_mnet_rpc_negotiation_timeout'] = 'The timeout in seconds for authentication over the XMLRPC transport.'; -$string['auth_mnettitle'] = 'Moodle Network authentication'; $string['auto_add_remote_users'] = 'Auto add remote users'; $string['rpc_negotiation_timeout'] = 'RPC negotiation timeout'; $string['sso_idp_description'] = 'Publish this service to allow your users to roam to the {$a} Moodle site without having to re-login there.
Subscribe to this service to allow authenticated users from {$a} to access your site without having to re-login.
'; @@ -36,3 +35,4 @@ $string['sso_idp_name'] = 'SSO (Identity Provider)'; $string['sso_mnet_login_refused'] = 'Username {$a->user} is not permitted to login from {$a->host}.'; $string['sso_sp_description'] = 'Publish this service to allow authenticated users from {$a} to access your site without having to re-login.
Subscribe to this service to allow your users to roam to the {$a} Moodle site without having to re-login there.
'; $string['sso_sp_name'] = 'SSO (Service Provider)'; +$string['pluginname'] = 'Moodle Network authentication'; diff --git a/auth/nntp/lang/en/auth_nntp.php b/auth/nntp/lang/en/auth_nntp.php index 5da5ec9deef..096f7f7889a 100644 --- a/auth/nntp/lang/en/auth_nntp.php +++ b/auth/nntp/lang/en/auth_nntp.php @@ -30,4 +30,4 @@ $string['auth_nntpchangepasswordurl_key'] = 'Password-change URL'; $string['auth_nntpnotinstalled'] = 'Cannot use NNTP authentication. The PHP IMAP module is not installed.'; $string['auth_nntpport'] = 'Server port (119 is the most common)'; $string['auth_nntpport_key'] = 'Port'; -$string['auth_nntptitle'] = 'NNTP server'; +$string['pluginname'] = 'NNTP server'; diff --git a/auth/nologin/lang/en/auth_nologin.php b/auth/nologin/lang/en/auth_nologin.php index dab2741710e..ad4ba165dfe 100644 --- a/auth/nologin/lang/en/auth_nologin.php +++ b/auth/nologin/lang/en/auth_nologin.php @@ -24,4 +24,4 @@ */ $string['auth_nologindescription'] = 'Auxiliary plugin that prevents user to login into system and also discards any mail sent to the user. Can be used to suspend user accounts.'; -$string['auth_nologintitle'] = 'No login'; +$string['pluginname'] = 'No login'; diff --git a/auth/none/lang/en/auth_none.php b/auth/none/lang/en/auth_none.php index 1ead56cf94c..d5cf02b96bf 100644 --- a/auth/none/lang/en/auth_none.php +++ b/auth/none/lang/en/auth_none.php @@ -24,4 +24,4 @@ */ $string['auth_nonedescription'] = 'Users can sign in and create valid accounts immediately, with no authentication against an external server and no confirmation via email. Be careful using this option - think of the security and administration problems this could cause.'; -$string['auth_nonetitle'] = 'No authentication'; +$string['pluginname'] = 'No authentication'; diff --git a/auth/pam/lang/en/auth_pam.php b/auth/pam/lang/en/auth_pam.php index ae1484cf041..3f9fee1c8d7 100644 --- a/auth/pam/lang/en/auth_pam.php +++ b/auth/pam/lang/en/auth_pam.php @@ -24,6 +24,6 @@ */ $string['auth_pamdescription'] = 'This method uses PAM to access the native usernames on this server. You have to install PHP4 PAM Authentication in order to use this module.'; -$string['auth_pamtitle'] = 'PAM (Pluggable Authentication Modules)'; $string['auth_passwordisexpired'] = 'Your password is expired. Do you want change your password now?'; $string['auth_passwordwillexpire'] = 'Your password will expire in {$a} days. Do you want change your password now?'; +$string['pluginname'] = 'PAM (Pluggable Authentication Modules)'; diff --git a/auth/pop3/lang/en/auth_pop3.php b/auth/pop3/lang/en/auth_pop3.php index 770a43bab5e..87a05dc7a2b 100644 --- a/auth/pop3/lang/en/auth_pop3.php +++ b/auth/pop3/lang/en/auth_pop3.php @@ -32,6 +32,6 @@ $string['auth_pop3mailbox_key'] = 'Mailbox'; $string['auth_pop3notinstalled'] = 'Cannot use POP3 authentication. The PHP IMAP module is not installed.'; $string['auth_pop3port'] = 'Server port (110 is the most common, 995 is common for SSL)'; $string['auth_pop3port_key'] = 'Port'; -$string['auth_pop3title'] = 'POP3 server'; $string['auth_pop3type'] = 'Server type. If your server uses certificate security, choose pop3cert.'; $string['auth_pop3type_key'] = 'Type'; +$string['pluginname'] = 'POP3 server'; diff --git a/auth/radius/lang/en/auth_radius.php b/auth/radius/lang/en/auth_radius.php index cc4d2aaf7a3..fb98f3d1658 100644 --- a/auth/radius/lang/en/auth_radius.php +++ b/auth/radius/lang/en/auth_radius.php @@ -31,10 +31,10 @@ $string['auth_radiusnasport'] = 'Port to use to connect'; $string['auth_radiusnasport_key'] = 'Port'; $string['auth_radiussecret'] = 'Shared secret'; $string['auth_radiussecret_key'] = 'Secret'; -$string['auth_radiustitle'] = 'RADIUS server'; $string['auth_radiustype'] = 'Choose an authentication scheme to use with the RADIUS server.'; $string['auth_radiustypechapmd5'] = 'CHAP MD5'; $string['auth_radiustype_key'] = 'Authentication'; $string['auth_radiustypemschapv1'] = 'Microsoft CHAP version 1'; $string['auth_radiustypemschapv2'] = 'Microsoft CHAP version 2'; $string['auth_radiustypepap'] = 'PAP'; +$string['pluginname'] = 'RADIUS server'; diff --git a/auth/shibboleth/lang/en/auth_shibboleth.php b/auth/shibboleth/lang/en/auth_shibboleth.php index 415d0e2f490..00a4f7f5264 100644 --- a/auth/shibboleth/lang/en/auth_shibboleth.php +++ b/auth/shibboleth/lang/en/auth_shibboleth.php @@ -33,7 +33,6 @@ $string['auth_shibboleth_login_long'] = 'Login to Moodle via Shibboleth'; $string['auth_shibboleth_manual_login'] = 'Manual Login'; $string['auth_shibboleth_select_member'] = 'I\'m a member of ...'; $string['auth_shibboleth_select_organization'] = 'For authentication via Shibboleth, please select your organization from the drop down list:'; -$string['auth_shibbolethtitle'] = 'Shibboleth'; $string['auth_shib_convert_data'] = 'Data modification API'; $string['auth_shib_convert_data_description'] = 'You can use this API to further modify the data provided by Shibboleth. Read the README for further instructions.'; $string['auth_shib_convert_data_warning'] = 'The file does not exist or is not readable by the webserver process!'; @@ -55,3 +54,4 @@ $string['auth_shib_username_description'] = 'Name of the webserver Shibboleth en $string['shib_no_attributes_error'] = 'You seem to be Shibboleth authenticated but Moodle didn\'t receive any user attributes. Please check that your Identity Provider releases the necessary attributes ({$a}) to the Service Provider Moodle is running on or inform the webmaster of this server.'; $string['shib_not_all_attributes_error'] = 'Moodle needs certain Shibboleth attributes which are not present in your case. The attributes are: {$a}
Please contact the webmaster of this server or your Identity Provider.'; $string['shib_not_set_up_error'] = 'Shibboleth authentication doesn\'t seem to be set up correctly because no Shibboleth environment variables are present for this page. Please consult the README for further instructions on how to set up Shibboleth authentication or contact the webmaster of this Moodle installation.'; +$string['pluginname'] = 'Shibboleth'; diff --git a/auth/webservice/lang/en/auth_webservice.php b/auth/webservice/lang/en/auth_webservice.php index 1c01930f567..a2fb8547353 100644 --- a/auth/webservice/lang/en/auth_webservice.php +++ b/auth/webservice/lang/en/auth_webservice.php @@ -24,4 +24,4 @@ */ $string['auth_webservicedescription'] = 'This authentication method should be used for accounts that are exclusively for use by web service clients.'; -$string['auth_webservicetitle'] = 'Web services authentication'; +$string['pluginname'] = 'Web services authentication'; diff --git a/lib/authlib.php b/lib/authlib.php index 78a4f0d8813..7cc8dba5636 100644 --- a/lib/authlib.php +++ b/lib/authlib.php @@ -414,7 +414,7 @@ class auth_plugin_base { * @todo Document this function */ function get_title() { - return auth_get_plugin_title($this->authtype); + return get_string('pluginname', "auth_{$this->authtype}"); } /** diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index b6d07169ae3..fd159826836 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -28,6 +28,18 @@ * @deprecated */ +/** + * Return the authentication plugin title + * + * @param string $authtype plugin type + * @return string + */ +function auth_get_plugin_title($authtype) { + debugging('Function auth_get_plugin_title() is deprecated, please use standard get_string("pluginname", "auth_'.$authtype.'")!'); + return get_string('pluginname', "auth_{$authtype}"); +} + + /** * @deprecated */ diff --git a/lib/weblib.php b/lib/weblib.php index fa4dcdac82b..a52f7084a84 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3432,16 +3432,6 @@ class html_list_progress_trace extends progress_trace { } } -/** - * Return the authentication plugin title - * - * @param string $authtype plugin type - * @return string - */ -function auth_get_plugin_title($authtype) { - return get_string("auth_{$authtype}title", "auth_{$authtype}"); -} - /** * Returns a localized sentence in the current language summarizing the current password policy * diff --git a/user/editadvanced_form.php b/user/editadvanced_form.php index 47009ae94eb..b82e7396a6e 100644 --- a/user/editadvanced_form.php +++ b/user/editadvanced_form.php @@ -36,7 +36,7 @@ class user_editadvanced_form extends moodleform { $auths = get_plugin_list('auth'); $auth_options = array(); foreach ($auths as $auth => $unused) { - $auth_options[$auth] = auth_get_plugin_title($auth); + $auth_options[$auth] = get_string('pluginname', "auth_{$auth}"); } $mform->addElement('select', 'auth', get_string('chooseauthmethod','auth'), $auth_options); $mform->setHelpButton('auth', array('authchange', get_string('chooseauthmethod','auth'))); diff --git a/user/filters/lib.php b/user/filters/lib.php index 9be889bd3e1..1efc1406509 100644 --- a/user/filters/lib.php +++ b/user/filters/lib.php @@ -119,7 +119,7 @@ class user_filtering { $plugins = get_plugin_list('auth'); $choices = array(); foreach ($plugins as $auth => $unused) { - $choices[$auth] = auth_get_plugin_title ($auth); + $choices[$auth] = get_string('pluginname', "auth_{$auth}"); } return new user_filter_simpleselect('auth', get_string('authentication'), $advanced, 'auth', $choices);