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