MDL-11517 reserved word MOD used in table alias in questions backup code
[moodle-pu.git] / mod / glossary / config.html
blob5180488fb2e0480760f96b5f613817c4cc29460f
1 <?php
2 $yes = get_string("yes");
3 $no = get_string("no");
4 ?>
5 <form method="post" action="module.php" id="form">
6 <div>
7 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
9 <table cellpadding="9" cellspacing="0" >
10 <tr valign="top">
11 <td colspan="3" align="center"><strong><?php print_string("glossaryleveldefaultsettings","glossary") ?></strong></td>
12 </tr>
13 <tr valign="top">
14 <td align="right">glossary_entbypage:</td>
15 <td>
16 <input name="glossary_entbypage" type="text" size="3" value="<?php p(isset($CFG->glossary_entbypage) ? $CFG->glossary_entbypage : 10) ?>" />
17 </td>
18 <td>
19 <?php print_string("entbypage", "glossary") ?>
20 </td>
21 </tr>
22 <tr valign="top">
23 <td align="right">glossary_dupentries:</td>
24 <td>
25 <select size="1" name="glossary_dupentries">
26 <?php
27 $yselected = "";
28 $nselected = "";
29 if ($CFG->glossary_dupentries) {
30 $yselected = " selected=\"selected\" ";
31 } else {
32 $nselected = " selected=\"selected\" ";
35 <option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
36 <option value="0" <?php echo $nselected ?>><?php p($no)?></option>
37 </select>
38 </td>
39 <td>
40 <?php print_string("cnfallowdupentries", "glossary") ?>
41 </td>
42 </tr>
43 <tr valign="top">
44 <td align="right">glossary_allowcomments:</td>
45 <td>
46 <select size="1" name="glossary_allowcomments">
47 <?php
48 $yselected = "";
49 $nselected = "";
50 if ($CFG->glossary_allowcomments) {
51 $yselected = " selected=\"selected\" ";
52 } else {
53 $nselected = " selected=\"selected\" ";
56 <option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
57 <option value="0" <?php echo $nselected ?>><?php p($no)?></option>
58 </select>
59 </td>
60 <td>
61 <?php print_string("cnfallowcomments", "glossary") ?>
62 </td>
63 </tr>
64 <tr valign="top">
65 <td align="right">glossary_linkbydefault:</td>
66 <td>
67 <select size="1" name="glossary_linkbydefault">
68 <?php
69 $yselected = "";
70 $nselected = "";
71 if ($CFG->glossary_linkbydefault) {
72 $yselected = " selected=\"selected\" ";
73 } else {
74 $nselected = " selected=\"selected\" ";
77 <option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
78 <option value="0" <?php echo $nselected ?>><?php p($no)?></option>
79 </select>
80 </td>
81 <td>
82 <?php print_string("cnflinkglossaries", "glossary") ?>
83 </td>
84 </tr>
85 <tr valign="top">
86 <td align="right">glossary_defaultapproval:</td>
87 <td>
88 <select size="1" name="glossary_defaultapproval">
89 <?php
90 $yselected = "";
91 $nselected = "";
92 if ($CFG->glossary_defaultapproval) {
93 $yselected = " selected=\"selected\" ";
94 } else {
95 $nselected = " selected=\"selected\" ";
98 <option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
99 <option value="0" <?php echo $nselected ?>><?php p($no)?></option>
100 </select>
101 </td>
102 <td>
103 <?php print_string("cnfapprovalstatus", "glossary") ?>
104 </td>
105 </tr>
106 <tr valign="top">
107 <td align="right">glossary_enablerssfeeds:</td>
108 <td>
109 <?php
110 if (!isset($CFG->enablerssfeeds) || $CFG->enablerssfeeds == 0) {
111 print_string("no");
112 } else {
113 unset($options);
114 $options[0] = get_string("no");
115 $options[1] = get_string("yes");
117 $glossary_enablerssfeeds = false;
118 if (isset($CFG->glossary_enablerssfeeds) && $CFG->glossary_enablerssfeeds == 1) {
119 $glossary_enablerssfeeds = true;
122 choose_from_menu ($options, "glossary_enablerssfeeds", $glossary_enablerssfeeds, "", "", "");
125 </td>
126 <td>
127 <?php
128 print_string("configenablerssfeeds","glossary");
129 if (!isset($CFG->enablerssfeeds) || $CFG->enablerssfeeds == 0) {
130 print_string("configenablerssfeedsdisabled");
133 </td>
134 </tr>
135 <tr valign="top">
136 <td colspan ="3" align="center"><strong><?php print_string("entryleveldefaultsettings","glossary") ?></strong></td>
137 </tr>
138 <tr valign="top">
139 <td align="right">glossary_linkentries:</td>
140 <td>
141 <select size="1" name="glossary_linkentries">
142 <?php
143 $yselected = "";
144 $nselected = "";
145 if (isset($CFG->glossary_linkentries) && $CFG->glossary_linkentries) {
146 $yselected = " selected=\"selected\" ";
147 } else {
148 $nselected = " selected=\"selected\" ";
151 <option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
152 <option value="0" <?php echo $nselected ?>><?php p($no)?></option>
153 </select>
154 </td>
155 <td>
156 <?php print_string("cnflinkentry", "glossary") ?>
157 </td>
158 </tr>
159 <tr valign="top">
160 <td align="right">glossary_casesensitive:</td>
161 <td>
162 <select size="1" name="glossary_casesensitive">
163 <?php
164 $yselected = "";
165 $nselected = "";
166 if (isset($CFG->glossary_casesensitive) && $CFG->glossary_casesensitive) {
167 $yselected = " selected=\"selected\" ";
168 } else {
169 $nselected = " selected=\"selected\" ";
172 <option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
173 <option value="0" <?php echo $nselected ?>><?php p($no)?></option>
174 </select>
175 </td>
176 <td>
177 <?php print_string("cnfcasesensitive", "glossary") ?>
178 </td>
179 </tr>
180 <tr valign="top">
181 <td align="right">glossary_fullmatch:</td>
182 <td>
183 <select size="1" name="glossary_fullmatch">
184 <?php
185 $yselected = "";
186 $nselected = "";
187 if (isset($CFG->glossary_fullmatch) && $CFG->glossary_fullmatch) {
188 $yselected = " selected=\"selected\" ";
189 } else {
190 $nselected = " selected=\"selected\" ";
193 <option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
194 <option value="0" <?php echo $nselected ?>><?php p($no)?></option>
195 </select>
196 </td>
197 <td>
198 <?php print_string("cnffullmatch", "glossary") ?>
199 </td>
200 </tr>
201 <tr valign="top">
202 <td colspan ="3" align="center"><a name="formats"><strong><?php print_string("displayformatssetup","glossary") ?></strong></a></td>
203 </tr>
204 <tr>
205 <td colspan="3" align="center">
206 <?php
208 //Update and get available formats
209 $recformats = glossary_get_available_formats();
211 $formats = array();
213 //Take names
214 foreach ($recformats as $format) {
215 $formats[$format->id] = get_string("displayformat$format->name", "glossary");
217 asort($formats);
219 print_simple_box_start('center');
220 foreach ($formats as $formatid=>$formatname) {
221 $recformat = get_record('glossary_formats','id',$formatid);
222 echo '<tr>';
223 echo '<td>' . $formatname . '</td>';
224 $eicon = "<a title=\"" . get_string("edit") . "\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&amp;mode=edit\"><img class=\"iconsmall\" src=\"../pix/t/edit.gif\" alt=\"".get_string("edit")."\" /></a>";
225 if ( $recformat->visible ) {
226 $vtitle = get_string("hide");
227 $vicon = "hide.gif";
228 } else {
229 $vtitle = get_string("show");
230 $vicon = "show.gif";
232 $vicon = "<a title=\"" . $vtitle . "\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&amp;mode=visible\"><img class=\"iconsmall\" src=\"../pix/t/" . $vicon . "\" alt=\"$vtitle\" /></a>";
234 echo '<td align="center">' . $eicon . '&nbsp;&nbsp;' . $vicon . '</td>';
235 echo '</tr>';
237 print_simple_box_end();
241 </td>
242 </tr>
243 <tr>
244 <td colspan="3" align="center">
245 <input type="submit" value="<?php print_string("savechanges") ?>" /></td>
246 </tr>
247 </table>
248 </div>
249 </form>