Now all the modules global config pages are valid XML. Related to MDL-7861

This commit is contained in:
stronk7
2007-01-13 20:13:58 +00:00
parent 84e2c6c724
commit 73be66c7a8
9 changed files with 43 additions and 88 deletions
+3 -3
View File
@@ -2,8 +2,8 @@
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
<table cellpadding="9" cellspacing="0" >
<tr valign=top>
<td align=right><p>assignment_maxbytes:</td>
<tr valign="top">
<td align="right">assignment_maxbytes:</td>
<td><?php
$choices = get_max_upload_sizes($CFG->maxbytes);
choose_from_menu ($choices, "assignment_maxbytes", $CFG->assignment_maxbytes, "");
@@ -15,7 +15,7 @@
</tr>
<tr valign="top">
<td align="right"><p>assignment_itemstocount:</td>
<td align="right">assignment_itemstocount:</td>
<td><?php
unset($options);
$options[ASSIGNMENT_COUNT_WORDS] = trim(get_string('numwords', ''));
+1 -1
View File
@@ -1,5 +1,5 @@
<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<table cellpadding="9" cellspacing="0" >
+1 -1
View File
@@ -1,5 +1,5 @@
<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<table cellpadding="9" cellspacing="0" >
+21 -21
View File
@@ -3,7 +3,7 @@
$no = get_string("no");
?>
<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
@@ -31,8 +31,8 @@
$nselected = " selected=\"selected\" ";
}
?>
<option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
<option value="0" <?php p($nselected) ?>><?php p($no)?></option>
<option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
<option value="0" <?php echo $nselected ?>><?php p($no)?></option>
</select>
</td>
<td>
@@ -52,8 +52,8 @@
$nselected = " selected=\"selected\" ";
}
?>
<option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
<option value="0" <?php p($nselected) ?>><?php p($no)?></option>
<option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
<option value="0" <?php echo $nselected ?>><?php p($no)?></option>
</select>
</td>
<td>
@@ -73,8 +73,8 @@
$nselected = " selected=\"selected\" ";
}
?>
<option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
<option value="0" <?php p($nselected) ?>><?php p($no)?></option>
<option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
<option value="0" <?php echo $nselected ?>><?php p($no)?></option>
</select>
</td>
<td>
@@ -94,8 +94,8 @@
$nselected = " selected=\"selected\" ";
}
?>
<option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
<option value="0" <?php p($nselected) ?>><?php p($no)?></option>
<option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
<option value="0" <?php echo $nselected ?>><?php p($no)?></option>
</select>
</td>
<td>
@@ -141,14 +141,14 @@
<?php
$yselected = "";
$nselected = "";
if ($CFG->glossary_linkentries) {
if (isset($CFG->glossary_linkentries) && $CFG->glossary_linkentries) {
$yselected = " selected=\"selected\" ";
} else {
$nselected = " selected=\"selected\" ";
}
?>
<option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
<option value="0" <?php p($nselected) ?>><?php p($no)?></option>
<option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
<option value="0" <?php echo $nselected ?>><?php p($no)?></option>
</select>
</td>
<td>
@@ -162,14 +162,14 @@
<?php
$yselected = "";
$nselected = "";
if ($CFG->glossary_casesensitive) {
if (isset($CFG->glossary_casesensitive) && $CFG->glossary_casesensitive) {
$yselected = " selected=\"selected\" ";
} else {
$nselected = " selected=\"selected\" ";
}
?>
<option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
<option value="0" <?php p($nselected) ?>><?php p($no)?></option>
<option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
<option value="0" <?php echo $nselected ?>><?php p($no)?></option>
</select>
</td>
<td>
@@ -183,14 +183,14 @@
<?php
$yselected = "";
$nselected = "";
if ($CFG->glossary_fullmatch) {
if (isset($CFG->glossary_fullmatch) && $CFG->glossary_fullmatch) {
$yselected = " selected=\"selected\" ";
} else {
$nselected = " selected=\"selected\" ";
}
?>
<option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
<option value="0" <?php p($nselected) ?>><?php p($no)?></option>
<option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
<option value="0" <?php echo $nselected ?>><?php p($no)?></option>
</select>
</td>
<td>
@@ -198,7 +198,7 @@
</td>
</tr>
<tr valign="top">
<td colspan ="3" align="center"><a name="formats"><strong><?php print_string("displayformatssetup","glossary") ?></strong></td>
<td colspan ="3" align="center"><a name="formats"><strong><?php print_string("displayformatssetup","glossary") ?></strong></a></td>
</tr>
<tr>
<td colspan="3" align="center">
@@ -220,7 +220,7 @@
$recformat = get_record('glossary_formats','id',$formatid);
echo '<tr>';
echo '<td>' . $formatname . '</td>';
$eicon = "<a title=\"" . get_string("edit") . "\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&mode=edit\"><img class=\"iconsmall\" src=\"../pix/t/edit.gif\" alt=\"".get_string("edit")."\" /></a>";
$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>";
if ( $recformat->visible ) {
$vtitle = get_string("hide");
$vicon = "hide.gif";
@@ -228,7 +228,7 @@
$vtitle = get_string("show");
$vicon = "show.gif";
}
$vicon = "<a title=\"" . $vtitle . "\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&mode=visible\"><img class=\"iconsmall\" src=\"../pix/t/" . $vicon . "\" alt=\"$vtitle\" /></a>";
$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>";
echo '<td align="center" nowrap="nowrap">' . $eicon . '&nbsp;&nbsp;' . $vicon . '</td>';
echo '</tr>';
+7 -10
View File
@@ -54,14 +54,12 @@
print_header("$strmodulename: $strconfiguration", $site->fullname,
"<a href=\"../../$CFG->admin/index.php\">$stradmin</a> -> ".
"<a href=\"../../$CFG->admin/configure.php\">$strconfiguration</a> -> ".
"<a href=\"../../$CFG->admin/modules.php\">$strmanagemodules</a> -> <a href=\"../../$CFG->admin/module.php?module=glossary&sesskey=$USER->sesskey\">$strmodulename</a> -> $strdisplayformats");
"<a href=\"../../$CFG->admin/modules.php\">$strmanagemodules</a> -> <a href=\"../../$CFG->admin/module.php?module=glossary&amp;sesskey=$USER->sesskey\">$strmodulename</a> -> $strdisplayformats");
print_heading($strmodulename . ': ' . get_string("displayformats","glossary"));
echo '<table cellspacing="0" align="center" class="glossaryformatheader">';
echo '<tr><td align="center">';
echo get_string('configwarning','admin');
echo '</td></tr></table>';
print_simple_box("<center>".get_string("configwarning", 'admin')."</center>", "center", "60%");
echo "<br />";
$yes = get_string("yes");
$no = get_string("no");
@@ -234,7 +232,7 @@
</td>
</tr>
<tr valign="top">
<td align="right" width="20%"><p>Include Group Breaks:</td>
<td align="right" width="20%">Include Group Breaks:</td>
<td>
<select size="1" name="showgroup">
<?php
@@ -246,8 +244,8 @@
$nselected = " selected=\"selected\" ";
}
?>
<option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
<option value="0" <?php p($nselected) ?>><?php p($no)?></option>
<option value="1" <?php echo $yselected ?>><?php p($yes)?></option>
<option value="0" <?php echo $nselected ?>><?php p($no)?></option>
</select>
</td>
<td width="60%">
@@ -262,8 +260,7 @@
<input type="hidden" name="mode" value="edit" />
<?php
print_simple_box_end();
echo '</form>';
echo '</table></form>';
print_footer();
?>
+3 -3
View File
@@ -1,9 +1,9 @@
<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?PHP print isset($USER->sesskey) ? $USER->sesskey : '' ?>">
<input type="hidden" name="sesskey" value="<?PHP print isset($USER->sesskey) ? $USER->sesskey : '' ?>" />
<table cellpadding="9" cellspacing="0">
<tr valign="top">
<td align="right"><p>hotpot_showtimes:</td>
<td align="right">hotpot_showtimes:</td>
<td><?PHP
unset($choices);
$choices["0"] = get_string("no");
@@ -13,7 +13,7 @@
<td><?PHP print_string("configshowtimes", "hotpot") ?></td>
</tr>
<tr valign="top">
<td align="right"><p>hotpot_excelencodings:</p></td>
<td align="right">hotpot_excelencodings:</td>
<td><input name="hotpot_excelencodings" type="text" size="30" value="<?PHP p($CFG->hotpot_excelencodings) ?>" /></td>
<td><?PHP print_string("configexcelencodings", "hotpot") ?></td>
</tr>
+3 -3
View File
@@ -4,21 +4,21 @@
<table cellpadding="9" cellspacing="0">
<tr valign="top">
<td align="right">server_url:</td>
<td> <input name="lams_serverurl" type="text" size="50" value="<?php p($CFG->lams_serverurl) ?>"></td>
<td> <input name="lams_serverurl" type="text" size="50" value="<?php if (isset($CFG->lams_serverurl)) p($CFG->lams_serverurl) ?>" /></td>
<td>
<?php print_string('serverurl', 'lams') ?>
</td>
</tr>
<tr valign="top">
<td align="right">server_id:</td>
<td> <input name="lams_serverid" type="text" size="50" value="<?php p($CFG->lams_serverid) ?>"> </td>
<td> <input name="lams_serverid" type="text" size="50" value="<?php if (isset($CFG->lams_serverid)) p($CFG->lams_serverid) ?>" /> </td>
<td>
<?php print_string('serverid', 'lams') ?>
</td>
</tr>
<tr valign="top">
<td align="right">server_key:</td>
<td> <input name="lams_serverkey" type="text" size="50" value="<?php p($CFG->lams_serverkey) ?>"> </td>
<td> <input name="lams_serverkey" type="text" size="50" value="<?php if (isset($CFG->lams_serverkey)) p($CFG->lams_serverkey) ?>" /> </td>
<td>
<?php print_string('serverkey', 'lams') ?>
</td>
+3 -45
View File
@@ -1,6 +1,7 @@
<form method="post" action="module.php" id="form">
<fieldset class="invisiblefieldset">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
</fieldset>
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
@@ -53,20 +54,6 @@
<?php print_string("configallowlocalfiles", "resource") ?>
</td>
</tr>
<tr valign="top">
<td align="right">resource_filterexternalpages:</td>
<td>
<?php
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
choose_from_menu ($choices, "resource_filterexternalpages", $CFG->resource_filterexternalpages, "");
?>
</td>
<td>
<?php print_string("configfilterexternalpages", "resource") ?>
</td>
</tr>
<tr valign="top">
<td align="right">resource_popup:</td>
<td>
@@ -87,7 +74,7 @@
echo "<td align=\"right\">$defaultvalue:</td>";
echo "<td>";
if ($optionname == "height" or $optionname == "width") {
echo "<input name=$defaultvalue type=\"text\" size=\"5\" value=\"".$CFG->$defaultvalue."\" />";
echo "<input name=\"$defaultvalue\" type=\"text\" size=\"5\" value=\"".$CFG->$defaultvalue."\" />";
} else {
choose_from_menu ($choices, $defaultvalue, $CFG->$defaultvalue, "");
}
@@ -98,34 +85,6 @@
echo "</tr>";
}
?>
<tr valign="top">
<td align="right">resource_windowsettings:</td>
<td>
<?php
unset($choices);
$choices["0"] = get_string("hidesettings");
$choices["1"] = get_string("showsettings");
choose_from_menu ($choices, "resource_windowsettings", $CFG->resource_windowsettings, "");
?>
</td>
<td>
<?php print_string("configwindowsettings", "resource") ?>
</td>
</tr>
<tr valign="top">
<td align="right">resource_parametersettings:</td>
<td>
<?php
unset($choices);
$choices["0"] = get_string("hidesettings");
$choices["1"] = get_string("showsettings");
choose_from_menu ($choices, "resource_parametersettings", $CFG->resource_parametersettings, "");
?>
</td>
<td>
<?php print_string("configparametersettings", "resource") ?>
</td>
</tr>
<tr valign="top">
<td align="right">resource_autofilerename:</td>
<td>
@@ -160,5 +119,4 @@
</tr>
</table>
</fieldset>
</form>
+1 -1
View File
@@ -8,7 +8,7 @@
?>
<form method="post" action="module.php" id="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<table cellpadding="9" cellspacing="0" >
<tr valign="top">