From d991bc77fab2a1df45a0b4ea74fda96bbeecb511 Mon Sep 17 00:00:00 2001 From: Willy Lee Date: Thu, 29 Aug 2013 15:36:44 -0500 Subject: [PATCH 1/2] MDL-41497 enrol_database: Added help text for using odbc dsn names instead --- enrol/database/lang/en/enrol_database.php | 3 ++- enrol/database/settings.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/enrol/database/lang/en/enrol_database.php b/enrol/database/lang/en/enrol_database.php index 98a967dc441..e7a47f6a2ea 100644 --- a/enrol/database/lang/en/enrol_database.php +++ b/enrol/database/lang/en/enrol_database.php @@ -25,8 +25,9 @@ $string['database:unenrol'] = 'Unenrol suspended users'; $string['dbencoding'] = 'Database encoding'; $string['dbhost'] = 'Database host'; -$string['dbhost_desc'] = 'Type database server IP address or host name'; +$string['dbhost_desc'] = 'Type database server IP address or host name. Use a system DSN name if using ODBC.'; $string['dbname'] = 'Database name'; +$string['dbname_desc'] = 'Leave empty if using a DSN name in database host.'; $string['dbpass'] = 'Database password'; $string['dbsetupsql'] = 'Database setup command'; $string['dbsetupsql_desc'] = 'SQL command for special database setup, often used to setup communication encoding - example for MySQL and PostgreSQL: SET NAMES \'utf8\''; diff --git a/enrol/database/settings.php b/enrol/database/settings.php index 0a8d906c98d..39d78817303 100644 --- a/enrol/database/settings.php +++ b/enrol/database/settings.php @@ -41,7 +41,7 @@ if ($ADMIN->fulltree) { $settings->add(new admin_setting_configpasswordunmask('enrol_database/dbpass', get_string('dbpass', 'enrol_database'), '', '')); - $settings->add(new admin_setting_configtext('enrol_database/dbname', get_string('dbname', 'enrol_database'), '', '')); + $settings->add(new admin_setting_configtext('enrol_database/dbname', get_string('dbname', 'enrol_database'), get_string('dbname_desc', 'enrol_database'), '')); $settings->add(new admin_setting_configtext('enrol_database/dbencoding', get_string('dbencoding', 'enrol_database'), '', 'utf-8')); From 030e2976ec6aad8dc6e6b277553fb8c656ef396f Mon Sep 17 00:00:00 2001 From: Willy Lee Date: Fri, 30 Aug 2013 10:11:57 -0500 Subject: [PATCH 2/2] MDL-41497 auth_db: Added help text for using odbc dsn names instead --- auth/db/lang/en/auth_db.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/db/lang/en/auth_db.php b/auth/db/lang/en/auth_db.php index e2e295c4df2..b2ba645b4a3 100644 --- a/auth/db/lang/en/auth_db.php +++ b/auth/db/lang/en/auth_db.php @@ -35,13 +35,13 @@ $string['auth_dbfieldpass'] = 'Name of the field containing passwords'; $string['auth_dbfieldpass_key'] = 'Password field'; $string['auth_dbfielduser'] = 'Name of the field containing usernames'; $string['auth_dbfielduser_key'] = 'Username field'; -$string['auth_dbhost'] = 'The computer hosting the database server.'; +$string['auth_dbhost'] = 'The computer hosting the database server. Use a sysem DSN entry if using ODBC.'; $string['auth_dbhost_key'] = 'Host'; $string['auth_dbchangepasswordurl_key'] = 'Password-change URL'; $string['auth_dbinsertuser'] = 'Inserted user {$a->name} id {$a->id}'; $string['auth_dbinsertuserduplicate'] = 'Error inserting user {$a->username} - user with this username was already created through \'{$a->auth}\' plugin.'; $string['auth_dbinsertusererror'] = 'Error inserting user {$a}'; -$string['auth_dbname'] = 'Name of the database itself'; +$string['auth_dbname'] = 'Name of the database itself. Leave empty if using an ODBC DSN.'; $string['auth_dbname_key'] = 'DB name'; $string['auth_dbpass'] = 'Password matching the above username'; $string['auth_dbpass_key'] = 'Password';