moodle/enrol/ldap/settingslib.php

207 lines
8.6 KiB
PHP
Raw Normal View History

enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* LDAP enrolment plugin admin setting classes
*
* @package enrol_ldap
2010-07-31 20:33:43 +00:00
* @author Iñaki Arenaza
* @copyright 2010 Iñaki Arenaza <iarenaza@eps.mondragon.edu>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
*/
2010-07-31 20:30:29 +00:00
defined('MOODLE_INTERNAL') || die();
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
class admin_setting_configtext_trim_lower extends admin_setting_configtext {
/* @var boolean whether to lowercase the value or not before writing in to the db */
private $lowercase;
/**
* Constructor: uses parent::__construct
*
* @param string $name unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting' for ones in config_plugins.
* @param string $visiblename localised
* @param string $description long localised info
* @param string $defaultsetting default value for the setting
* @param boolean $lowercase if true, lowercase the value before writing it to the db.
* @param boolean $enabled if true, the input field is enabled, otherwise it's disabled.
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
*/
public function __construct($name, $visiblename, $description, $defaultsetting, $lowercase=false, $enabled=true) {
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
$this->lowercase = $lowercase;
$this->enabled = $enabled;
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
parent::__construct($name, $visiblename, $description, $defaultsetting);
}
/**
* Saves the setting(s) provided in $data
*
* @param array $data An array of data, if not array returns empty str
* @return mixed empty string on useless data or success, error string if failed
*/
public function write_setting($data) {
if ($this->paramtype === PARAM_INT and $data === '') {
// do not complain if '' used instead of 0
$data = 0;
}
// $data is a string
$validated = $this->validate($data);
if ($validated !== true) {
return $validated;
}
if ($this->lowercase) {
$data = core_text::strtolower($data);
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
}
if (!$this->enabled) {
return '';
}
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
return ($this->config_write($this->name, trim($data)) ? '' : get_string('errorsetting', 'admin'));
}
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
}
class admin_setting_ldap_rolemapping extends admin_setting {
/**
* Constructor: uses parent::__construct
*
* @param string $name unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting' for ones in config_plugins.
* @param string $visiblename localised
* @param string $description long localised info
* @param string $defaultsetting default value for the setting (actually unused)
*/
public function __construct($name, $visiblename, $description, $defaultsetting) {
parent::__construct($name, $visiblename, $description, $defaultsetting);
}
/**
* Returns the current setting if it is set
*
* @return mixed null if null, else an array
*/
public function get_setting() {
$roles = role_fix_names(get_all_roles());
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
$result = array();
foreach ($roles as $role) {
$contexts = $this->config_read('contexts_role'.$role->id);
$memberattribute = $this->config_read('memberattribute_role'.$role->id);
$result[] = array('id' => $role->id,
'name' => $role->localname,
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
'contexts' => $contexts,
'memberattribute' => $memberattribute);
}
return $result;
}
/**
* Saves the setting(s) provided in $data
*
* @param array $data An array of data, if not array returns empty str
* @return mixed empty string on useless data or success, error string if failed
*/
public function write_setting($data) {
if(!is_array($data)) {
return ''; // ignore it
}
$result = '';
foreach ($data as $roleid => $data) {
if (!$this->config_write('contexts_role'.$roleid, trim($data['contexts']))) {
$return = get_string('errorsetting', 'admin');
}
if (!$this->config_write('memberattribute_role'.$roleid, core_text::strtolower(trim($data['memberattribute'])))) {
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
$return = get_string('errorsetting', 'admin');
}
}
return $result;
}
/**
* Returns XHTML field(s) as required by choices
*
* Relies on data being an array should data ever be another valid vartype with
* acceptable value this may cause a warning/error
* if (!is_array($data)) would fix the problem
*
* @todo Add vartype handling to ensure $data is an array
*
* @param array $data An array of checked values
* @param string $query
* @return string XHTML field
*/
public function output_html($data, $query='') {
$return = html_writer::start_tag('div', array('style' =>'float:left; width:auto; margin-right: 0.5em;'));
$return .= html_writer::tag('div', get_string('roles', 'role'), array('style' => 'height: 2em;'));
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
foreach ($data as $role) {
$return .= html_writer::tag('div', s($role['name']), array('style' => 'height: 2em;'));
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
}
$return .= html_writer::end_tag('div');
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
$return .= html_writer::start_tag('div', array('style' => 'float:left; width:auto; margin-right: 0.5em;'));
$return .= html_writer::tag('div', get_string('contexts', 'enrol_ldap'), array('style' => 'height: 2em;'));
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
foreach ($data as $role) {
$contextid = $this->get_id().'['.$role['id'].'][contexts]';
$contextname = $this->get_full_name().'['.$role['id'].'][contexts]';
$return .= html_writer::start_tag('div', array('style' => 'height: 2em;'));
$return .= html_writer::label(get_string('role_mapping_context', 'enrol_ldap', $role['name']), $contextid, false, array('class' => 'accesshide'));
$attrs = array('type' => 'text', 'size' => '40', 'id' => $contextid, 'name' => $contextname,
'value' => s($role['contexts']), 'class' => 'text-ltr');
$return .= html_writer::empty_tag('input', $attrs);
$return .= html_writer::end_tag('div');
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
}
$return .= html_writer::end_tag('div');
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
$return .= html_writer::start_tag('div', array('style' => 'float:left; width:auto; margin-right: 0.5em;'));
$return .= html_writer::tag('div', get_string('memberattribute', 'enrol_ldap'), array('style' => 'height: 2em;'));
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
foreach ($data as $role) {
$memberattrid = $this->get_id().'['.$role['id'].'][memberattribute]';
$memberattrname = $this->get_full_name().'['.$role['id'].'][memberattribute]';
$return .= html_writer::start_tag('div', array('style' => 'height: 2em;'));
$return .= html_writer::label(get_string('role_mapping_attribute', 'enrol_ldap', $role['name']), $memberattrid, false, array('class' => 'accesshide'));
$attrs = array('type' => 'text', 'size' => '15', 'id' => $memberattrid, 'name' => $memberattrname,
'value' => s($role['memberattribute']), 'class' => 'text-ltr');
$return .= html_writer::empty_tag('input', $attrs);
$return .= html_writer::end_tag('div');
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
}
$return .= html_writer::end_tag('div');
$return .= html_writer::tag('div', '', array('style' => 'clear:both;'));
enrol/ldap: MDL-22784 Conversion of the LDAP enrolment plugin to the new enrolment infrastructure. We've moved some of the LDAP auth plugin "knowledge" of different LDAP servers to a common library, and we've added support for nested groups enrolments for selected LDAP servers. Lots of changes in the language pack, as all the plugin messages have been internationali[sz]ed (it also includes renaming of quite a few string identifiers). During plugin settings migration, we rename 'version' setting to 'ldap_version', as we store the plugin version itself as a setting in the plugin config table and the two collided. Performance is not great for larga data sets but this can be improved later (20000 users, 4000 courses and 100 users/course take around 1h25m on a somewhat tuned postgresql-8.4 on a 2.66GHz Core2 Duo w/ 4 GB of RAM). AMOS BEGIN MOV [description,enrol_ldap],[pluginname_desc,enrol_ldap] MOV [enrol_ldap_autocreate,enrol_ldap],[autocreate,enrol_ldap] MOV [enrol_ldap_autocreate_key,enrol_ldap],[autocreate_key,enrol_ldap] MOV [enrol_ldap_autocreation_settings,enrol_ldap],[autocreation_settings,enrol_ldap] MOV [enrol_ldap_bind_dn,enrol_ldap],[bind_dn,enrol_ldap] MOV [enrol_ldap_bind_dn_key,enrol_ldap],[bind_dn_key,enrol_ldap] MOV [enrol_ldap_bind_pw,enrol_ldap],[bind_pw,enrol_ldap] MOV [enrol_ldap_bind_pw_key,enrol_ldap],[bind_pw_key,enrol_ldap] MOV [enrol_ldap_bind_settings,enrol_ldap],[bind_settings,enrol_ldap] MOV [enrol_ldap_category,enrol_ldap],[category,enrol_ldap] MOV [enrol_ldap_category_key,enrol_ldap],[category_key,enrol_ldap] MOV [enrol_ldap_contexts,enrol_ldap],[contexts,enrol_ldap] MOV [enrol_ldap_course_fullname,enrol_ldap],[course_fullname,enrol_ldap] MOV [enrol_ldap_course_fullname_key,enrol_ldap],[course_fullname_key,enrol_ldap] MOV [enrol_ldap_course_idnumber,enrol_ldap],[course_idnumber,enrol_ldap] MOV [enrol_ldap_course_idnumber_key,enrol_ldap],[course_idnumber_key,enrol_ldap] MOV [enrol_ldap_course_search_sub,enrol_ldap],[course_search_sub,enrol_ldap] MOV [enrol_ldap_course_settings,enrol_ldap],[course_settings,enrol_ldap] MOV [enrol_ldap_course_shortname,enrol_ldap],[course_shortname,enrol_ldap] MOV [enrol_ldap_course_shortname_key,enrol_ldap],[course_shortname_key,enrol_ldap] MOV [enrol_ldap_course_summary,enrol_ldap],[course_summary,enrol_ldap] MOV [enrol_ldap_course_summary_key,enrol_ldap],[course_summary_key,enrol_ldap] MOV [enrol_ldap_editlock,enrol_ldap],[editlock,enrol_ldap] MOV [enrol_ldap_ldap_encoding,enrol_ldap],[ldap_encoding,enrol_ldap] MOV [enrol_ldap_ldap_encoding_key,enrol_ldap],[ldap_encoding_key,enrol_ldap] MOV [enrol_ldap_general_options,enrol_ldap],[general_options,enrol_ldap] MOV [enrol_ldap_group_memberofattribute,enrol_ldap],[group_memberofattribute,enrol_ldap] MOV [enrol_ldap_group_memberofattribute_key,enrol_ldap],[group_memberofattribute_key,enrol_ldap] MOV [enrol_ldap_host_url,enrol_ldap],[host_url,enrol_ldap] MOV [enrol_ldap_host_url_key,enrol_ldap],[host_url_key,enrol_ldap] MOV [enrol_ldap_idnumber_attribute,enrol_ldap],[idnumber_attribute,enrol_ldap] MOV [enrol_ldap_idnumber_attribute_key,enrol_ldap],[idnumber_attribute_key,enrol_ldap] MOV [enrol_ldap_memberattribute,enrol_ldap],[memberattribute,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn,enrol_ldap],[memberattribute_isdn,enrol_ldap] MOV [enrol_ldap_memberattribute_isdn_key,enrol_ldap],[memberattribute_isdn_key,enrol_ldap] MOV [enrol_ldap_nested_groups,enrol_ldap],[nested_groups,enrol_ldap] MOV [enrol_ldap_nested_groups_key,enrol_ldap],[nested_groups_key,enrol_ldap] MOV [enrol_ldap_nested_groups_settings,enrol_ldap],[nested_groups_settings,enrol_ldap] MOV [enrol_ldap_objectclass,enrol_ldap],[objectclass,enrol_ldap] MOV [enrol_ldap_objectclass_key,enrol_ldap],[objectclass_key,enrol_ldap] MOV [enrol_ldap_opt_deref,enrol_ldap],[opt_deref,enrol_ldap] MOV [enrol_ldap_opt_deref_key,enrol_ldap],[opt_deref_key,enrol_ldap] MOV [enrol_ldap_roles,enrol_ldap],[roles,enrol_ldap] MOV [enrol_ldap_search_sub_key,enrol_ldap],[search_sub_key,enrol_ldap] MOV [enrol_ldap_server_settings,enrol_ldap],[server_settings,enrol_ldap] MOV [enrol_ldap_template,enrol_ldap],[template,enrol_ldap] MOV [enrol_ldap_template_key,enrol_ldap],[template_key,enrol_ldap] MOV [enrol_ldap_updatelocal,enrol_ldap],[updatelocal,enrol_ldap] MOV [enrol_ldap_user_attribute,enrol_ldap],[user_attribute,enrol_ldap] MOV [enrol_ldap_user_attribute_key,enrol_ldap],[user_attribute_key,enrol_ldap] MOV [enrol_ldap_user_contexts,enrol_ldap],[user_contexts,enrol_ldap] MOV [enrol_ldap_user_contexts_key,enrol_ldap],[user_contexts_key,enrol_ldap] MOV [enrol_ldap_user_search_sub,enrol_ldap],[user_search_sub,enrol_ldap] MOV [enrol_ldap_user_settings,enrol_ldap],[user_settings,enrol_ldap] MOV [enrol_ldap_user_type,enrol_ldap],[user_type,enrol_ldap] MOV [enrol_ldap_user_type_key,enrol_ldap],[user_type_key,enrol_ldap] MOV [enrol_ldap_version,enrol_ldap],[version,enrol_ldap] MOV [enrol_ldap_version_key,enrol_ldap],[version_key,enrol_ldap] MOV [search_sub_key,enrol_ldap],[course_search_sub_key,enrol_ldap] AMOS END
2010-07-19 21:52:52 +00:00
return format_admin_setting($this, $this->visiblename, $return,
$this->description, true, '', '', $query);
}
}
/**
* Class implements new specialized setting for course categories that are loaded
* only when required
* @author Darko Miletic
*
*/
class enrol_ldap_admin_setting_category extends admin_setting_configselect {
public function __construct($name, $visiblename, $description) {
parent::__construct($name, $visiblename, $description, 1, null);
}
public function load_choices() {
if (is_array($this->choices)) {
return true;
}
$this->choices = make_categories_options();
return true;
}
}