adding some strings
[moodle-linuxchix.git] / enrol / database / config.html
blob2704c0ec4ac0954e796c3479c0265a371d0e8a6c
1 <?php
2 $yesno = array('0'=>get_string('no'), '1'=>get_string('yes'));
3 ?>
5 <table cellspacing="0" cellpadding="5" border="0" class="boxaligncenter">
6 <tr>
7 <th colspan="2" scope="col">
8 <?php print_string("server_settings", "enrol_database") ?>
9 </th>
10 </tr>
11 <tr>
12 <td align="right">enrol_dbtype:</td>
13 <td>
14 <?php
15 $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mssql_n", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp");
16 foreach ($dbtypes as $dbtype) {
17 $dboptions[$dbtype] = $dbtype;
19 if (!isset($frm->enrol_dbtype)) {
20 $frm->enrol_dbtype = 'mysql';
22 choose_from_menu($dboptions, "enrol_dbtype", $frm->enrol_dbtype, '', '', '');
25 </td>
26 <td>
27 <?php print_string("dbtype","enrol_database") ?>
28 </td>
29 </tr>
31 <tr>
32 <td align="right">enrol_dbhost:</td>
33 <td>
34 <?php
35 if (!isset($frm->enrol_dbhost)) {
36 $frm->enrol_dbhost = '';
39 <input size="15" type="text" name="enrol_dbhost" value="<?php p($frm->enrol_dbhost) ?>" />
40 </td>
41 <td>
42 <?php print_string("dbhost","enrol_database") ?>
43 </td>
44 </tr>
46 <tr>
47 <td align="right">enrol_dbuser:</td>
48 <td>
49 <input size="15" type="text" name="enrol_dbuser" value="<?php echo $frm->enrol_dbuser ?>" />
50 </td>
51 <td>
52 <?php print_string("dbuser","enrol_database") ?>
53 </td>
54 </tr>
56 <tr>
57 <td align="right">enrol_dbpass:</td>
58 <td>
59 <input size="15" type="text" name="enrol_dbpass" value="<?php echo $frm->enrol_dbpass ?>" />
60 </td>
61 <td>
62 <?php print_string("dbpass","enrol_database") ?>
63 </td>
64 </tr>
66 <tr>
67 <td align="right">enrol_dbname:</td>
68 <td>
69 <input size="15" type="text" name="enrol_dbname" value="<?php echo $frm->enrol_dbname ?>" />
70 </td>
71 <td>
72 <?php print_string("dbname","enrol_database") ?>
73 </td>
74 </tr>
76 <tr>
77 <td align="right">enrol_dbtable:</td>
78 <td>
79 <input size="15" type="text" name="enrol_dbtable" value="<?php echo $frm->enrol_dbtable ?>" />
80 </td>
81 <td>
82 <?php print_string("dbtable","enrol_database") ?>
83 </td>
84 </tr>
85 <tr>
86 <th colspan="2" scope="col">
87 <?php print_string("remote_fields_mapping", "enrol_database") ?>
88 </th>
89 </tr>
90 <tr>
91 <td align="right">enrol_localcoursefield:</td>
92 <td>
93 <input size="15" type="text" name="enrol_localcoursefield" value="<?php echo $frm->enrol_localcoursefield ?>" />
94 </td>
95 <td>
96 <?php print_string("localcoursefield","enrol_database") ?>
97 </td>
98 </tr>
100 <tr>
101 <td align="right">enrol_localuserfield:</td>
102 <td>
103 <input size="15" type="text" name="enrol_localuserfield" value="<?php echo $frm->enrol_localuserfield ?>" />
104 </td>
105 <td>
106 <?php print_string("localuserfield","enrol_database") ?>
107 </td>
108 </tr>
110 <tr>
111 <td align="right">enrol_db_localrolefield:</td>
112 <td>
113 <input size="15" type="text" name="enrol_db_localrolefield" value="<?php echo $frm->enrol_db_localrolefield ?>" />
114 </td>
115 <td>
116 <?php print_string("localrolefield","enrol_database") ?>
117 </td>
118 </tr>
120 <tr>
121 <td align="right">enrol_remotecoursefield:</td>
122 <td>
123 <input size="15" type="text" name="enrol_remotecoursefield" value="<?php echo $frm->enrol_remotecoursefield ?>" />
124 </td>
125 <td>
126 <?php print_string("remotecoursefield","enrol_database") ?>
127 </td>
128 </tr>
130 <tr>
131 <td align="right">enrol_remoteuserfield:</td>
132 <td>
133 <input size="15" type="text" name="enrol_remoteuserfield" value="<?php echo $frm->enrol_remoteuserfield ?>" />
134 </td>
135 <td>
136 <?php print_string("remoteuserfield","enrol_database") ?>
137 </td>
138 </tr>
140 <tr>
141 <td align="right">enrol_db_remoterolefield:</td>
142 <td>
143 <input size="15" type="text" name="enrol_db_remoterolefield" value="<?php echo $frm->enrol_db_remoterolefield ?>" />
144 </td>
145 <td>
146 <?php print_string("remoterolefield","enrol_database") ?>
147 </td>
148 </tr>
150 <tr>
151 <th colspan="2" scope="col">
152 <?php print_string('roles', 'role') ?>
153 </th>
154 </tr>
155 <tr>
156 <td align="right">enrol_db_defaultcourseroleid:</td>
157 <td>
158 <?php
159 $sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
160 $assignableroles = get_assignable_roles($sitecontext);
161 $assignableroles = array('' => get_string('default')) + $assignableroles;
163 choose_from_menu($assignableroles, 'enrol_db_defaultcourseroleid', $frm->enrol_db_defaultcourseroleid, '');
164 if (isset($err['enrol_db_defaultcourseroleid'])) formerr($err['enrol_db_defaultcourseroleid']);
166 </td>
167 <td>
168 <?php print_string("defaultcourseroleid","enrol_database") ?>
169 </td>
170 </tr>
172 <tr>
173 <th colspan="2" scope="col">
174 <?php print_string("enrol_database_autocreation_settings", "enrol_database") ?>
175 </th>
176 </tr>
177 <tr>
178 <td align="right">enrol_db_autocreate:</td>
179 <td>
180 <?php
181 choose_from_menu($yesno, "enrol_db_autocreate", $frm->enrol_db_autocreate, "");
182 if (isset($err["enrol_db_autocreate"])) formerr($err["enrol_db_autocreate"]);
184 </td>
185 <td>
186 <?php print_string("autocreate","enrol_database") ?>
187 </td>
188 </tr>
190 <tr>
191 <td align="right">enrol_db_category:</td>
192 <td>
193 <?php
194 $displaylist = array();
195 $parentlist = array();
196 make_categories_list($displaylist, $parentlist);
197 choose_from_menu($displaylist, "enrol_db_category", $frm->enrol_db_category, "");
200 <?php if (isset($err["enrol_db_category"])) formerr($err["enrol_db_category"]); ?>
201 </td><td>
202 <?php print_string("category","enrol_database") ?>
203 </td>
204 </tr>
206 <tr>
207 <td align="right">enrol_db_template:</td>
208 <td>
209 <input name="enrol_db_template" type="text" size="30" value="<?php echo $frm->enrol_db_template?>" />
210 <?php if (isset($err["enrol_db_template"])) formerr($err["enrol_db_template"]); ?>
211 </td><td>
212 <?php print_string("template","enrol_database") ?>
213 </td>
214 </tr>
216 <tr>
217 <th colspan="2" scope="col">
218 <?php print_string("general_options", "enrol_database") ?>
219 </th>
220 </tr>
222 <tr>
223 <td align="right">enrol_db_ignorehiddencourse:</td>
224 <td>
225 <?php
226 choose_from_menu($yesno, "enrol_db_ignorehiddencourse", $frm->enrol_db_ignorehiddencourse, "");
227 if (isset($err['enrol_db_ignorehiddencourse'])) {
228 formerr($err['enrol_db_ignorehiddencourse']);
231 </td>
232 <td>
233 <?php print_string('ignorehiddencourse', 'enrol_database' ); ?>
234 </td>
235 </tr>
237 </table>