diff --git a/auth/cas/settings.php b/auth/cas/settings.php index 50f6733f7c1..3e7fed28981 100644 --- a/auth/cas/settings.php +++ b/auth/cas/settings.php @@ -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'); diff --git a/auth/ldap/lang/en/auth_ldap.php b/auth/ldap/lang/en/auth_ldap.php index 5ed9e14da93..fa074d2cc63 100644 --- a/auth/ldap/lang/en/auth_ldap.php +++ b/auth/ldap/lang/en/auth_ldap.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'] = '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_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.'; diff --git a/auth/ldap/settings.php b/auth/ldap/settings.php index d72aed77ac1..e9921f6f7ef 100644 --- a/auth/ldap/settings.php +++ b/auth/ldap/settings.php @@ -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. diff --git a/enrol/ldap/lang/en/enrol_ldap.php b/enrol/ldap/lang/en/enrol_ldap.php index 3066945cd0d..83e88ec9496 100644 --- a/enrol/ldap/lang/en/enrol_ldap.php +++ b/enrol/ldap/lang/en/enrol_ldap.php @@ -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'] = '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['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'] = '

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.

It is assumed that courses are defined as groups in LDAP, with each group having multiple membership fields (member or memberUid) that contain a uniqueidentification of the user.

To use LDAP enrolment, your users must 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.

Enrolments will be updated when the user logs in. You can also run a script to keep enrolments in synch. Look in enrol/ldap/cli/sync.php.

This plugin can also be set to automatically create new courses when new groups appear in LDAP.

'; $string['pluginnotenabled'] = 'Plugin not enabled!'; diff --git a/enrol/ldap/settings.php b/enrol/ldap/settings.php index 2b668a5a997..c577859b7ae 100644 --- a/enrol/ldap/settings.php +++ b/enrol/ldap/settings.php @@ -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');