mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-69510 admin: make ldap configuration warnings clear
This commit is contained in:
parent
38abfb6a01
commit
0d6e5f2bc2
@ -27,7 +27,9 @@ defined('MOODLE_INTERNAL') || die;
|
||||
if ($ADMIN->fulltree) {
|
||||
|
||||
if (!function_exists('ldap_connect')) {
|
||||
$settings->add(new admin_setting_heading('auth_casnotinstalled', '', get_string('auth_casnotinstalled', 'auth_cas')));
|
||||
$notify = new \core\output\notification(get_string('auth_casnotinstalled', 'auth_cas'),
|
||||
\core\output\notification::NOTIFY_WARNING);
|
||||
$settings->add(new admin_setting_heading('auth_casnotinstalled', '', $OUTPUT->render($notify)));
|
||||
} else {
|
||||
// We use a couple of custom admin settings since we need to massage the data before it is inserted into the DB.
|
||||
require_once($CFG->dirroot.'/auth/ldap/classes/admin_setting_special_lowercase_configtext.php');
|
||||
|
@ -62,7 +62,7 @@ $string['auth_ldap_memberattribute_isdn_key'] = 'Member attribute uses dn';
|
||||
$string['auth_ldap_memberattribute_key'] = 'Member attribute';
|
||||
$string['auth_ldap_noconnect'] = 'LDAP-module cannot connect to server: {$a}';
|
||||
$string['auth_ldap_noconnect_all'] = 'LDAP-module cannot connect to any servers: {$a}';
|
||||
$string['auth_ldap_noextension'] = '<em>The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled if you want to use this authentication plugin.</em>';
|
||||
$string['auth_ldap_noextension'] = 'The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled if you want to use this authentication plugin.';
|
||||
$string['auth_ldap_no_mbstring'] = 'You need the mbstring extension to create users in Active Directory.';
|
||||
$string['auth_ldapnotinstalled'] = 'Cannot use LDAP authentication. The PHP LDAP module is not installed.';
|
||||
$string['auth_ldap_objectclass'] = 'Optional: Overrides objectClass used to name/search users on ldap_user_type. Usually you don\'t need to change this.';
|
||||
|
@ -27,7 +27,9 @@ defined('MOODLE_INTERNAL') || die;
|
||||
if ($ADMIN->fulltree) {
|
||||
|
||||
if (!function_exists('ldap_connect')) {
|
||||
$settings->add(new admin_setting_heading('auth_ldap_noextension', '', get_string('auth_ldap_noextension', 'auth_ldap')));
|
||||
$notify = new \core\output\notification(get_string('auth_ldap_noextension', 'auth_ldap'),
|
||||
\core\output\notification::NOTIFY_WARNING);
|
||||
$settings->add(new admin_setting_heading('auth_ldap_noextension', '', $OUTPUT->render($notify)));
|
||||
} else {
|
||||
|
||||
// We use a couple of custom admin settings since we need to massage the data before it is inserted into the DB.
|
||||
|
@ -99,7 +99,7 @@ $string['objectclass_key'] = 'Object class';
|
||||
$string['ok'] = "OK!\n";
|
||||
$string['opt_deref'] = 'If the group membership contains distinguished names, specify how aliases are handled during a search. Select one of the following values: \'No\' (LDAP_DEREF_NEVER) or \'Yes\' (LDAP_DEREF_ALWAYS).';
|
||||
$string['opt_deref_key'] = 'Dereference aliases';
|
||||
$string['phpldap_noextension'] = '<em>The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled if you want to use this enrolment plugin.</em>';
|
||||
$string['phpldap_noextension'] = 'The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled if you want to use this enrolment plugin.';
|
||||
$string['pluginname'] = 'LDAP enrolments';
|
||||
$string['pluginname_desc'] = '<p>You can use an LDAP server to control your enrolments. It is assumed your LDAP tree contains groups that map to the courses, and that each of those groups/courses will have membership entries to map to students.</p><p>It is assumed that courses are defined as groups in LDAP, with each group having multiple membership fields (<em>member</em> or <em>memberUid</em>) that contain a uniqueidentification of the user.</p><p>To use LDAP enrolment, your users <strong>must</strong> to have a valid idnumber field. The LDAP groups must have that idnumber in the member fields for a user to be enrolled in the course. This will usually work well if you are already using LDAP Authentication.</p><p>Enrolments will be updated when the user logs in. You can also run a script to keep enrolments in synch. Look in <em>enrol/ldap/cli/sync.php</em>.</p><p>This plugin can also be set to automatically create new courses when new groups appear in LDAP.</p>';
|
||||
$string['pluginnotenabled'] = 'Plugin not enabled!';
|
||||
|
@ -27,12 +27,15 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
if ($ADMIN->fulltree) {
|
||||
|
||||
//--- heading ---
|
||||
$settings->add(new admin_setting_heading('enrol_ldap_settings', '', get_string('pluginname_desc', 'enrol_ldap')));
|
||||
|
||||
if (!function_exists('ldap_connect')) {
|
||||
$settings->add(new admin_setting_heading('enrol_phpldap_noextension', '', get_string('phpldap_noextension', 'enrol_ldap')));
|
||||
$notify = new \core\output\notification(get_string('phpldap_noextension', 'enrol_ldap'),
|
||||
\core\output\notification::NOTIFY_WARNING);
|
||||
$settings->add(new admin_setting_heading('enrol_phpldap_noextension', '', $OUTPUT->render($notify)));
|
||||
$settings->add(new admin_setting_heading('enrol_ldap_settings', '', get_string('pluginname_desc', 'enrol_ldap')));
|
||||
} else {
|
||||
|
||||
$settings->add(new admin_setting_heading('enrol_ldap_settings', '', get_string('pluginname_desc', 'enrol_ldap')));
|
||||
|
||||
require_once($CFG->dirroot.'/enrol/ldap/settingslib.php');
|
||||
require_once($CFG->libdir.'/ldaplib.php');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user