Some changes for XHTML and accessibility compliance

This commit is contained in:
moodler
2004-10-19 09:37:01 +00:00
parent 4ac2157453
commit 492dc7b9c6
+52 -52
View File
@@ -29,29 +29,29 @@ if (empty($form->id)) {
$form->notes = "";
}
?>
<FORM name="form" method="post" action="<?php echo $ME ?>">
<CENTER>
<TABLE cellpadding=5>
<form name="form" method="post" action="<?php echo $ME ?>">
<center>
<table cellpadding="5">
<!-- <?php $options[0] = get_string("no"); $options[1] = get_string("yes"); ?> -->
<!-- <TR valign=top> -->
<!-- <TD align=right><P><B><?php print_string("takeroll", "attendance") ?>:</B></P></TD> -->
<!-- <TD align=left><?php choose_from_menu($options, "roll", $form->roll, "") ?></td> -->
<!-- <tr valign=top> -->
<!-- <td align=right><b><?php print_string("takeroll", "attendance") ?>:</b></td> -->
<!-- <td align=left><?php choose_from_menu($options, "roll", $form->roll, "") ?></td> -->
<!-- </tr> -->
<tr valign=top>
<td align=right><p><b><?php print_string("name") ?>:</b></p></td>
<tr valign="top">
<td align="right"><b><?php print_string("name") ?>:</b></td>
<td colspan="3">
<input type="text" name="name" size=60 value="<?php p($form->notes)?>" />
<input type="text" name="name" size="60" value="<?php p($form->notes)?>" alt="<?php print_string("name") ?>" />
</td>
</tr>
<TR valign=top>
<TD align=right><P><B><?php print_string("dayofroll", "attendance") ?>:</B></P></TD>
<TD colspan="3"><?php print_date_selector("theday", "themonth", "theyear", $form->day) ?></TD>
</TR>
<tr valign=top>
<TD align="right"><P><B><?php print_string("dynamicsection", "attendance") ?>:</B></P></TD>
<TD align="left">
<tr valign="top">
<td align="right"><b><?php print_string("dayofroll", "attendance") ?>:</b></td>
<td colspan="3"><?php print_date_selector("theday", "themonth", "theyear", $form->day) ?></td>
</tr>
<tr valign="top">
<td align="right"><b><?php print_string("dynamicsection", "attendance") ?>:</b></td>
<td align="left">
<?php
$options = array();
$options[0] = get_string("no");
@@ -59,12 +59,12 @@ if (empty($form->id)) {
choose_from_menu($options, "dynsection", "$form->dynsection", "");
helpbutton("dynsection", get_string("dynamicsection","attendance"), "attendance");
?>
<!-- <input type="checkbox" name="dynsection" <?php echo !empty($form->dynsection) ? 'checked' : '' ?> /> -->
</TD>
<!-- <input type="checkbox" name="dynsection" <?php echo !empty($form->dynsection) ? 'checked="checked"' : '' ?> /> -->
</td>
</tr>
<tr valign=top>
<TD align="right"><P><B><?php print_string("autoattend", "attendance") ?>:</B></P></TD>
<TD align="left">
<tr valign="top">
<td align="right"><b><?php print_string("autoattend", "attendance") ?>:</b></td>
<td align="left">
<?php
$options = array();
@@ -74,20 +74,20 @@ if (empty($form->id)) {
helpbutton("autoattend", get_string("autoattend","attendance"), "attendance");
?>
<!-- <input type="checkbox" name="autoattend" <?php echo !empty($form->autoattend) ? 'checked' : '' ?> /> -->
</TD>
<!-- <input type="checkbox" name="autoattend" <?php echo !empty($form->autoattend) ? 'checked="checked"' : '' ?> /> -->
</td>
</tr>
<?php // starting with 2 to allow for the nothing value in choose_from_menu to be the default of 1
for ($i=2;$i<=24;$i++){ $opt[$i] = $i; } ?>
<TR valign=top>
<TD align=right><P><B><?php print_string("hoursinclass", "attendance") ?>:</B></P></TD>
<TD colspan="3" align="left"><?php choose_from_menu($opt, "hours", $form->hours, "1","","1") ?>
<tr valign="top">
<td align="right"><b><?php print_string("hoursinclass", "attendance") ?>:</b></td>
<td colspan="3" align="left"><?php choose_from_menu($opt, "hours", $form->hours, "1","","1") ?>
<?php helpbutton("hours", get_string("hoursinclass","attendance"), "hours"); ?>
</td>
</tr>
<tr valign=top>
<TD align="right"><P><B><?php print_string("gradevalue", "attendance") ?>:</B></P></TD>
<TD align="left">
<tr valign="top">
<td align="right"><b><?php print_string("gradevalue", "attendance") ?>:</b></td>
<td align="left">
<?php
$options = array();
$options[0] = get_string("no");
@@ -95,19 +95,19 @@ for ($i=2;$i<=24;$i++){ $opt[$i] = $i; } ?>
choose_from_menu($options, "grade", "$form->grade", "");
helpbutton("grade", get_string("gradevalue","attendance"), "attendance");
?>
<!-- <input type="checkbox" name="grade" <?php echo !empty($form->grade) ? 'checked' : '' ?> /> -->
</TD>
<!-- <input type="checkbox" name="grade" <?php echo !empty($form->grade) ? 'checked="checked"' : '' ?> /> -->
</td>
</tr>
<?php // starting with 2 to allow for the nothing value in choose_from_menu to be the default of 1
for ($i=0;$i<=100;$i++){ $opt2[$i] = $i; } ?>
<TR valign=top>
<TD align=right><P><B><?php print_string("maxgradevalue", "attendance") ?>:</B></P></TD>
<TD colspan="3" align="left"><?php choose_from_menu($opt2, "maxgrade", $form->maxgrade, "0","","0");
<tr valign="top">
<td align="right"><b><?php print_string("maxgradevalue", "attendance") ?>:</b></td>
<td colspan="3" align="left"><?php choose_from_menu($opt2, "maxgrade", $form->maxgrade, "0","","0");
helpbutton("maxgrade", get_string("maxgradevalue","attendance"), "attendance");
?></td>
</tr>
</TABLE>
</table>
<?php // if we're modifying an existing instance of attendance instead
@@ -175,9 +175,9 @@ if ($form->hours >1) {
$r1c=$r2c=$r3c=" ";
$rollstatus = (($form->edited==0)?$CFG->attendance_default_student_status:
((isset($sroll[$student->id][$j]->status)?$sroll[$student->id][$j]->status:0)));
if ($rollstatus==1) {$r2c="checked";}
elseif ($rollstatus==2) {$r3c="checked";}
else {$r1c="checked";}
if ($rollstatus==1) {$r2c="checked=\"checked\"";}
elseif ($rollstatus==2) {$r3c="checked=\"checked\"";}
else {$r1c="checked=\"checked\"";}
$radio1="<input type=\"radio\" name=\"student_".$student->id."_".$j."\" value=\"0\" ".$r1c." />";
$radio2="<input type=\"radio\" name=\"student_".$student->id."_".$j."\" value=\"1\" ".$r2c." />";
$radio3="<input type=\"radio\" name=\"student_".$student->id."_".$j."\" value=\"2\" ".$r3c." />";
@@ -186,7 +186,7 @@ if ($form->hours >1) {
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$radio3."</td>\n";
} // for loop
echo "</tr>\n";
// $radio1="<input type=\"radio\" name=\"student_".$student->id."\" value=\"0\" checked />";
// $radio1="<input type=\"radio\" name=\"student_".$student->id."\" value=\"0\" checked=\"checked\" />";
// $radio2="<input type=\"radio\" name=\"student_".$student->id."\" value=\"1\" />";
// $radio3="<input type=\"radio\" name=\"student_".$student->id."\" value=\"2\" />";
// $table->data[$i]=array($student->lastname, $student->firstname,
@@ -200,18 +200,18 @@ if ($form->hours >1) {
} // if ($form->id)
?>
<!-- These hidden variables are always the same -->
<INPUT type="hidden" name=course value="<?php p($form->course) ?>" />
<INPUT type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
<INPUT type="hidden" name=section value="<?php p($form->section) ?>" />
<INPUT type="hidden" name=module value="<?php p($form->module) ?>" />
<INPUT type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
<INPUT type="hidden" name=instance value="<?php p($form->instance) ?>" />
<INPUT type="hidden" name=mode value="<?php p($form->mode) ?>" />
<BR />
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name="section" value="<?php p($form->section) ?>" />
<input type="hidden" name="module" value="<?php p($form->module) ?>" />
<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<br />
<?php
echo "<a href=\"../mod/attendance/add.php?id=".$form->course . "&section=".$form->section ."\">" . get_string("addmultiple","attendance") . "</a><br /><br />";
echo "<a href=\"../mod/attendance/add.php?id=".$form->course . "&amp;section=".$form->section ."\">" . get_string("addmultiple","attendance") . "</a><br /><br />";
?>
<INPUT type="submit" value="<?php print_string("savechanges") ?>" />
<INPUT type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</CENTER>
</FORM>
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</center>
</form>