Merged parameter fixes from STABLE
[moodle.git] / enrol / ldap / config.html
CommitLineData
64031bbb 1<?php // initialize variables
2
64031bbb 3// general
4optional_variable($frm->enrol_ldap_host_url, '');
5optional_variable($frm->enrol_ldap_version, '');
6optional_variable($frm->enrol_ldap_bind_dn, '');
210eddc7 7optional_variable($frm->enrol_ldap_bind_pw, '');
bdf09a84 8optional_variable($frm->enrol_ldap_search_sub, '0');
64031bbb 9// student & teacher enrol
10optional_variable($frm->enrol_ldap_student_contexts, '');
11optional_variable($frm->enrol_ldap_student_memberattribute, '');
12optional_variable($frm->enrol_ldap_teacher_contexts, '');
13optional_variable($frm->enrol_ldap_teacher_memberattribute, '');
14optional_variable($frm->enrol_ldap_objectclass, '');
15optional_variable($frm->enrol_ldap_course_idnumber_updatelocal, '');
16// fields
17optional_variable($frm->enrol_ldap_course_idnumber, '');
18optional_variable($frm->enrol_ldap_course_idnumber_updatelocal, false);
19optional_variable($frm->enrol_ldap_course_idnumber_editlock, false);
20optional_variable($frm->enrol_ldap_course_fullname, '');
21optional_variable($frm->enrol_ldap_course_fullname_updatelocal, false);
22optional_variable($frm->enrol_ldap_course_fullname_editlock, false);
23optional_variable($frm->enrol_ldap_course_shortname, '');
24optional_variable($frm->enrol_ldap_course_shortname_updatelocal, false);
25optional_variable($frm->enrol_ldap_course_shortname_editlock, false);
26optional_variable($frm->enrol_ldap_course_summary, '');
27optional_variable($frm->enrol_ldap_course_summary_updatelocal, false);
28optional_variable($frm->enrol_ldap_course_summary_editlock, false);
29// autocreate
30optional_variable($frm->enrol_ldap_autocreate, false);
31optional_variable($frm->enrol_ldap_category, 1);
32optional_variable($frm->enrol_ldap_template, '');
33
f7d18493 34// general options
35optional_variable($frm->enrol_allowinternal, false);
36
64031bbb 37?>
38
39<table cellspacing="0" cellpadding="5" border="0" align="center">
40<tr>
41 <td colspan="2">
42 <h4><?php print_string("enrol_ldap_server_settings", "enrol_ldap") ?> </h4>
43 </td>
44</tr>
210eddc7 45<tr valign="top">
894ff63f 46 <td align="right">enrol_ldap_host_url:</td>
47 <td>
64031bbb 48 <input name="enrol_ldap_host_url" TYPE="text" SIZE="30" value="<?php echo $frm->enrol_ldap_host_url?>">
894ff63f 49 <?php if (isset($err["enrol_ldap_host_url"])) formerr($err["enrol_ldap_host_url"]); ?>
50 </td>
64031bbb 51 <td>
52 <?php print_string("enrol_ldap_host_url","enrol_ldap") ?>
53 </td>
54</tr>
210eddc7 55<tr valign="top">
894ff63f 56 <td align="right">enrol_ldap_version:</td>
57 <td>
64031bbb 58 <?php
59 $versions[2] = "2";
60 $versions[3] = "3";
61 choose_from_menu($versions, "enrol_ldap_version", $frm->enrol_ldap_version, "");
894ff63f 62 if (isset($err["enrol_ldap_version"])) formerr($err["enrol_ldap_version"]);
64031bbb 63 ?>
894ff63f 64 </td>
64031bbb 65 <td>
66 <?php print_string("enrol_ldap_version","enrol_ldap") ?>
67 </td>
68</tr>
69
210eddc7 70<tr valign="top">
71 <td align="right">enrol_ldap_bind_dn:</td>
64031bbb 72 <td>
73 <input name="enrol_ldap_bind_dn" type="text" size="30" value="<?php echo $frm->enrol_ldap_bind_dn?>">
74 <?php if (isset($err["enrol_ldap_bind_dn"])) formerr($err["ldap_bind_dn"]); ?>
75 </td><td>
76 <?php print_string("enrol_ldap_bind_dn","enrol_ldap") ?>
77 </td>
78</tr>
79
210eddc7 80<tr valign="top">
81 <td align="right">ldap_bind_pw:</td>
64031bbb 82 <td>
83 <input name="enrol_ldap_bind_pw" type="text" size="30" value="<?php echo $frm->enrol_ldap_bind_pw?>">
84 <?php if (isset($err["enrol_ldap_bind_pw"])) formerr($err["enrol_ldap_bind_pw"]); ?>
85 </td><td>
86 <?php print_string("enrol_ldap_bind_pw","enrol_ldap") ?>
87 </td>
88</tr>
89
bdf09a84 90<tr valign="top">
91 <td align="right">ldap_search_sub:</td>
92 <td>
93<?php
1007a3f1 94 $choices = array();
bdf09a84 95 $choices["0"] = get_string("no");
96 $choices["1"] = get_string("yes");
1007a3f1 97 choose_from_menu ($choices, "enrol_ldap_search_sub", $frm->enrol_ldap_search_sub, "");
bdf09a84 98?>
99 <?php if (isset($err["enrol_ldap_search_sub"])) formerr($err["enrol_ldap_search_sub"]); ?>
100 </td><td>
101 <?php print_string("enrol_ldap_search_sub","enrol_ldap") ?>
102 </td>
103</tr>
104
64031bbb 105<tr>
106 <td colspan="2">
107 <h4><?php print_string("enrol_ldap_student_settings", "enrol_ldap") ?> </h4>
108 </td>
109</tr>
210eddc7 110<tr valign="top">
894ff63f 111 <td align="right">enrol_ldap_student_contexts:</td>
112 <td>
64031bbb 113 <input name="enrol_ldap_student_contexts" TYPE="text" SIZE="30 "value="<?php echo $frm->enrol_ldap_student_contexts?>">
114 <?php if (isset($err["enrol_ldap_student_contexts"])) formerr($err["enrol_ldap_student_contexts"]); ?>
115 </td>
116 <td>
117 <?php print_string("enrol_ldap_student_contexts","enrol_ldap") ?>
118 </td>
119</tr>
210eddc7 120<tr valign="top">
121 <td align="right">enrol_ldap_student_memberattribute:</td>
64031bbb 122 <td>
123 <input name="enrol_ldap_student_memberattribute" type="text" size="30" value="<?php echo $frm->enrol_ldap_student_memberattribute?>">
124 <?php if (isset($err["enrol_ldap_student_memberattribute"])) formerr($err["enrol_ldap_student_memberattribute"]); ?>
125 </td><td>
126 <?php print_string("enrol_ldap_student_memberattribute","enrol_ldap") ?>
127 </td>
128</tr>
129
130<tr>
131 <td colspan="2">
132 <h4><?php print_string("enrol_ldap_teacher_settings", "enrol_ldap") ?> </h4>
133 </td>
134</tr>
210eddc7 135<tr valign="top">
894ff63f 136 <td align="right">enrol_ldap_teacher_contexts:</td>
137 <td>
64031bbb 138 <input name="enrol_ldap_teacher_contexts" TYPE="text" SIZE="30 "value="<?php echo $frm->enrol_ldap_teacher_contexts?>">
139 <?php if (isset($err["enrol_ldap_teacher_contexts"])) formerr($err["enrol_ldap_teacher_contexts"]); ?>
140 </td>
141 <td>
142 <?php print_string("enrol_ldap_teacher_contexts","enrol_ldap") ?>
143 </td>
144</tr>
210eddc7 145<tr valign="top">
146 <td align="right">enrol_ldap_teacher_memberattribute:</td>
64031bbb 147 <td>
148 <input name="enrol_ldap_teacher_memberattribute" type="text" size="30" value="<?php echo $frm->enrol_ldap_teacher_memberattribute?>">
149 <?php if (isset($err["enrol_ldap_teacher_memberattribute"])) formerr($err["enrol_ldap_teacher_memberattribute"]); ?>
150 </td><td>
151 <?php print_string("enrol_ldap_teacher_memberattribute","enrol_ldap") ?>
152 </td>
153</tr>
154
155<tr>
156 <td colspan="2">
157 <h4><?php print_string("enrol_ldap_course_settings", "enrol_ldap") ?> </h4>
158 </td>
159</tr>
210eddc7 160<tr valign="top">
161 <td align="right">enrol_ldap_objectclass:</td>
64031bbb 162 <td>
163 <input name=enrol_ldap_objectclass type="text" size="30" value="<?php echo $frm->enrol_ldap_objectclass?>">
164 <?php if (isset($err["enrol_ldap_objectclass"])) formerr($err["enrol_ldap_objectclass"]); ?>
165 </td>
166 <td>
167 <?php print_string("enrol_ldap_objectclass","enrol_ldap") ?>
168 </td>
169</tr>
210eddc7 170<tr valign="top">
171 <td align="right">enrol_ldap_course_idnumber:</td>
64031bbb 172 <td>
173 <input name="enrol_ldap_course_idnumber" type="text" size="30" value="<?php echo $frm->enrol_ldap_course_idnumber?>">
174 <?php if (isset($err["enrol_ldap_course_idnumber"])) formerr($err["enrol_ldap_course_idnumber"]); ?>
175 <div align="right">
176 <?php print_string("enrol_ldap_updatelocal", "enrol_ldap") ?>
177 <select name="enrol_ldap_course_idnumber_updatelocal">
178 <option value="0" <?php echo ($frm->enrol_ldap_course_idnumber_updatelocal ? '' : 'selected="yes"') ?> >
179 <?php print_string("no") ?></option>
180 <option value="1" <?php echo ($frm->enrol_ldap_course_idnumber_updatelocal ? 'selected="yes"' : '') ?> >
181 <?php print_string("yes") ?></option>
182 </select><BR>
183 <?php print_string("enrol_ldap_editlock", "enrol_ldap") ?>
184 <select name="enrol_ldap_course_idnumber_editlock">
185 <option value="0" <?php echo ($frm->enrol_ldap_course_idnumber_editlock ? '' : 'selected="yes"') ?> >
186 <?php print_string("no") ?></option>
187 <option value="1" <?php echo ($frm->enrol_ldap_course_idnumber_editlock ? 'selected="yes"' : '') ?> >
188 <?php print_string("yes") ?></option>
189 </select></div>
190 </td><td>
191 <?php print_string("enrol_ldap_course_idnumber","enrol_ldap") ?>
192 </td>
193</tr>
210eddc7 194<tr valign="top">
195 <td align="right">enrol_ldap_course_shortname:</td>
64031bbb 196 <td>
197 <input name="enrol_ldap_course_shortname" type="text" size="30" value="<?php echo $frm->enrol_ldap_course_shortname?>">
198 <?php if (isset($err["enrol_ldap_course_shortname"])) formerr($err["enrol_ldap_course_shortname"]); ?>
199 <div align="right">
200 <?php print_string("enrol_ldap_updatelocal", "enrol_ldap") ?>
201 <select name="enrol_ldap_course_shortname_updatelocal">
202 <option value="0" <?php echo ($frm->enrol_ldap_course_shortname_updatelocal ? '' : 'selected="yes"') ?> >
203 <?php print_string("no") ?></option>
204 <option value="1" <?php echo ($frm->enrol_ldap_course_shortname_updatelocal ? 'selected="yes"' : '') ?> >
205 <?php print_string("yes") ?></option>
206 </select><BR>
207 <?php print_string("enrol_ldap_editlock", "enrol_ldap") ?>
208 <select name="enrol_ldap_course_shortname_editlock">
209 <option value="0" <?php echo ($frm->enrol_ldap_course_shortname_editlock ? '' : 'selected="yes"') ?> >
210 <?php print_string("no") ?></option>
211 <option value="1" <?php echo ($frm->enrol_ldap_course_shortname_editlock ? 'selected="yes"' : '') ?> >
212 <?php print_string("yes") ?></option>
213 </select></div>
214 </td><td>
215 <?php print_string("enrol_ldap_course_shortname","enrol_ldap") ?>
216 </td>
217</tr>
218
210eddc7 219<tr valign="top">
220 <td align="right">enrol_ldap_course_fullname:</td>
64031bbb 221 <td>
222 <input name="enrol_ldap_course_fullname" type="text" size="30" value="<?php echo $frm->enrol_ldap_course_fullname ?>">
223 <?php if (isset($err["enrol_ldap_course_fullname"])) formerr($err["enrol_ldap_course_fullname"]); ?>
224 <div align="right">
225 <?php print_string("enrol_ldap_updatelocal", "enrol_ldap") ?>
226 <select name="enrol_ldap_course_fullname_updatelocal">
227 <option value="0" <?php echo ($frm->enrol_ldap_course_fullname_updatelocal ? '' : 'selected="yes"') ?> >
228 <?php print_string("no") ?></option>
229 <option value="1" <?php echo ($frm->enrol_ldap_course_fullname_updatelocal ? 'selected="yes"' : '') ?> >
230 <?php print_string("yes") ?></option>
231 </select><BR>
232 <?php print_string("enrol_ldap_editlock", "enrol_ldap") ?>
233 <select name="enrol_ldap_course_idnumber_editlock">
234 <option value="0" <?php echo ($frm->enrol_ldap_course_fullname_editlock ? '' : 'selected="yes"') ?> >
235 <?php print_string("no") ?></option>
236 <option value="1" <?php echo ($frm->enrol_ldap_course_fullname_editlock ? 'selected="yes"' : '') ?> >
237 <?php print_string("yes") ?></option>
238 </select></div>
239 </td><td>
240 <?php print_string("enrol_ldap_course_fullname","enrol_ldap") ?>
241 </td>
242</tr>
243
210eddc7 244<tr valign="top">
245 <td align="right">enrol_ldap_course_summary:</td>
64031bbb 246 <td>
247 <input name="enrol_ldap_course_summary" type="text" size="30" value="<?php echo $frm->enrol_ldap_course_summary?>">
248 <?php if (isset($err["enrol_ldap_course_summary"])) formerr($err["enrol_ldap_course_summary"]); ?>
249 <div align="right">
250 <?php print_string("enrol_ldap_updatelocal", "enrol_ldap") ?>
251 <select name="enrol_ldap_course_summary_updatelocal">
252 <option value="0" <?php echo ($frm->enrol_ldap_course_summary_updatelocal ? '' : 'selected="yes"') ?> >
253 <?php print_string("no") ?></option>
254 <option value="1" <?php echo ($frm->enrol_ldap_course_summary_updatelocal ? 'selected="yes"' : '') ?> >
255 <?php print_string("yes") ?></option>
256 </select><BR>
257 <?php print_string("enrol_ldap_editlock", "enrol_ldap") ?>
258 <select name="enrol_ldap_course_summary_editlock">
259 <option value="0" <?php echo ($frm->enrol_ldap_course_summary_editlock ? '' : 'selected="yes"') ?> >
260 <?php print_string("no") ?></option>
261 <option value="1" <?php echo ($frm->enrol_ldap_course_summary_editlock ? 'selected="yes"' : '') ?> >
262 <?php print_string("yes") ?></option>
263 </select></div>
264 </td><td>
265 <?php print_string("enrol_ldap_course_summary","enrol_ldap") ?>
266 </td>
267</tr>
268
269<tr>
270 <td colspan="2">
271 <h4><?php print_string("enrol_ldap_autocreation_settings", "enrol_ldap") ?> </h4>
272 </td>
273</tr>
210eddc7 274<tr valign="top">
894ff63f 275 <td align="right">enrol_ldap_autocreate:</td>
276 <td>
64031bbb 277 <?php
278 choose_from_menu(array('0'=>'no','1'=>'yes'), "enrol_ldap_autocreate", $frm->enrol_ldap_autocreate, "");
894ff63f 279 if (isset($err["enrol_ldap_autocreate"])) formerr($err["enrol_ldap_autocreate"]);
64031bbb 280 ?>
894ff63f 281 </td>
64031bbb 282 <td>
283 <?php print_string("enrol_ldap_autocreate","enrol_ldap") ?>
284 </td>
285</tr>
210eddc7 286<tr valign="top">
287 <td align="right">enrol_ldap_category:</td>
64031bbb 288 <td>
289 <?php
290 $displaylist = array();
291 $parentlist = array();
292 make_categories_list($displaylist, $parentlist);
293 choose_from_menu($displaylist, "enrol_ldap_category", $frm->enrol_ldap_category, "");
294
295 ?>
296 <?php if (isset($err["enrol_ldap_category"])) formerr($err["enrol_ldap_category"]); ?>
297 </td><td>
298 <?php print_string("enrol_ldap_category","enrol_ldap") ?>
299 </td>
300</tr>
301
210eddc7 302<tr valign="top">
303 <td align="right">enrol_ldap_template:</td>
64031bbb 304 <td>
305 <input name=enrol_ldap_template type="text" size="30" value="<?php echo $frm->enrol_ldap_template?>">
306 <?php if (isset($err["enrol_ldap_template"])) formerr($err["enrol_ldap_template"]); ?>
307 </td><td>
308 <?php print_string("enrol_ldap_template","enrol_ldap") ?>
309 </td>
310</tr>
311
f7d18493 312<tr>
313 <td colspan="2">
314 <h4><?php print_string("enrol_ldap_general_options", "enrol_ldap") ?> </h4>
315 </td>
316</tr>
317
318<tr valign="top">
319 <td align="right">enrol_allowinternal:</td>
320 <td>
321 <input type="checkbox" name="enrol_allowinternal" <?php if ($frm->enrol_allowinternal) echo "checked=\"true\"" ?> />
322 </td>
323 <td>
324 <?php print_string('allowinternal') ?>
325 </td>
326</tr>
327
64031bbb 328</table>