enrol_ldap_host_url)) {
$frm->enrol_ldap_host_url = '';
}
if (!isset ($frm->enrol_ldap_version )) {
$frm->enrol_ldap_version = '';
}
if (!isset ($frm->enrol_ldap_bind_dn)) {
$frm->enrol_ldap_bind_dn = '';
}
if (!isset ($frm->enrol_ldap_bind_pw)) {
$frm->enrol_ldap_bind_pw = '';
}
if (!isset ($frm->enrol_ldap_search_sub)) {
$frm->enrol_ldap_search_sub = '0';
}
if (!isset ($frm->enrol_ldap_objectclass)) {
$frm->enrol_ldap_objectclass = '';
}
if (!isset ($frm->enrol_ldap_course_idnumber_updatelocal)) {
$frm->enrol_ldap_course_idnumber_updatelocal = '';
}
// fields
if (!isset ($frm->enrol_ldap_course_idnumber)) {
$frm->enrol_ldap_course_idnumber = '';
}
if (!isset ($frm->enrol_ldap_course_idnumber_updatelocal)) {
$frm->enrol_ldap_course_idnumber_updatelocal = false;
}
if (!isset ($frm->enrol_ldap_course_idnumber_editlock)) {
$frm->enrol_ldap_course_idnumber_editlock = false;
}
if (!isset ($frm->enrol_ldap_course_fullname)) {
$frm->enrol_ldap_course_fullname = '';
}
if (!isset ($frm->enrol_ldap_course_fullname_updatelocal)) {
$frm->enrol_ldap_course_fullname_updatelocal = false;
}
if (!isset ($frm->enrol_ldap_course_fullname_editlock)) {
$frm->enrol_ldap_course_fullname_editlock = false;
}
if (!isset ($frm->enrol_ldap_course_shortname)) {
$frm->enrol_ldap_course_shortname = '';
}
if (!isset ($frm->enrol_ldap_course_shortname_updatelocal)) {
$frm->enrol_ldap_course_shortname_updatelocal = false;
}
if (!isset ($frm->enrol_ldap_course_shortname_editlock)) {
$frm->enrol_ldap_course_shortname_editlock = false;
}
if (!isset ($frm->enrol_ldap_course_summary)) {
$frm->enrol_ldap_course_summary = '';
}
if (!isset ($frm->enrol_ldap_course_summary_updatelocal)) {
$frm->enrol_ldap_course_summary_updatelocal = false;
}
if (!isset ($frm->enrol_ldap_course_summary_editlock)) {
$frm->enrol_ldap_course_summary_editlock = false;
}
// Roles
$roles = get_records('role');
foreach($roles as $role) {
if (!isset($frm->{'enrol_ldap_contexts_role'.$role->id})) {
$frm->{'enrol_ldap_contexts_role'.$role->id} = '';
}
if (!isset($frm->{'enrol_ldap_memberattribute_role'.$role->id})) {
$frm->{'enrol_ldap_memberattribute_role'.$role->id} = '';
}
}
// autocreate
if (!isset($frm->enrol_ldap_autocreate)) {
$frm->enrol_ldap_autocreate = false;
}
if (!isset($frm->enrol_ldap_category)) {
$frm->enrol_ldap_category = 1;
}
if (!isset($frm->enrol_ldap_template)) {
$frm->enrol_ldap_template = '';
}
?>