Enrol/LDAP -- adds support for searching subcontexts -- Discussed in http://moodle.org/mod/forum/discuss.php?d=23696

This commit is contained in:
martinlanghoff 2005-05-17 03:49:20 +00:00
parent 0bf73dd33a
commit bdf09a84fe
2 changed files with 17 additions and 0 deletions

View File

@ -5,6 +5,7 @@ optional_variable($frm->enrol_ldap_host_url, '');
optional_variable($frm->enrol_ldap_version, '');
optional_variable($frm->enrol_ldap_bind_dn, '');
optional_variable($frm->enrol_ldap_bind_pw, '');
optional_variable($frm->enrol_ldap_search_sub, '0');
// student & teacher enrol
optional_variable($frm->enrol_ldap_student_contexts, '');
optional_variable($frm->enrol_ldap_student_memberattribute, '');
@ -83,6 +84,21 @@ optional_variable($frm->enrol_ldap_template, '');
</td>
</tr>
<tr valign="top">
<td align="right">ldap_search_sub:</td>
<td>
<?php
$choices = array();;
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
choose_from_menu ($choices, "enrol_ldap_search_sub", $form->enrol_ldap_search_sub, "");
?>
<?php if (isset($err["enrol_ldap_search_sub"])) formerr($err["enrol_ldap_search_sub"]); ?>
</td><td>
<?php print_string("enrol_ldap_search_sub","enrol_ldap") ?>
</td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string("enrol_ldap_student_settings", "enrol_ldap") ?> </h4>

View File

@ -29,6 +29,7 @@ $string['enrol_ldap_bind_dn'] = 'If you want to use bind-user to search users,
specify it here. Someting like
\'cn=ldapuser,ou=public,o=org\'';
$string['enrol_ldap_bind_pw'] = 'Password for bind-user.';
$string['enrol_ldap_search_sub'] = 'Search group memberships from subcontexts.';
$string['enrol_ldap_student_settings'] = 'Student enrolment settings';
$string['enrol_ldap_teacher_settings'] = 'Teacher enrolment settings';
$string['enrol_ldap_course_settings'] = 'Course enrolment settings';