mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
XHTML and accessibility compliance
This commit is contained in:
parent
4bab5275b2
commit
d526e68ee7
4 changed files with 34 additions and 31 deletions
|
@ -38,13 +38,13 @@
|
|||
|
||||
if ($course->format == "weeks") {
|
||||
$table->head = array (get_string("week"), get_string("question"), get_string("answer"));
|
||||
$table->align = array ("CENTER", "LEFT", "LEFT");
|
||||
$table->align = array ("center", "left", "left");
|
||||
} else if ($course->format == "topics") {
|
||||
$table->head = array (get_string("topic"), get_string("question"), get_string("answer"));
|
||||
$table->align = array ("CENTER", "LEFT", "LEFT");
|
||||
$table->align = array ("center", "left", "left");
|
||||
} else {
|
||||
$table->head = array (get_string("question"), get_string("answer"));
|
||||
$table->align = array ("LEFT", "LEFT");
|
||||
$table->align = array ("left", "left");
|
||||
}
|
||||
|
||||
$currentsection = "";
|
||||
|
|
|
@ -54,14 +54,14 @@
|
|||
<table cellpadding="5">
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("choicename","choice") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("choicename","choice") ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="name" size="30" value="<?php p($form->name) ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("choicetext","choice") ?>:</b></p>
|
||||
<td align="right"><b><?php print_string("choicetext","choice") ?>:</b>
|
||||
<font size="1">
|
||||
<?php
|
||||
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
|
||||
|
@ -99,7 +99,7 @@
|
|||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("choice","choice","1") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("choice","choice","1") ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="answer1" size="60" value="<?php p($form->answer1) ?>" />
|
||||
<?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
|
||||
|
@ -107,7 +107,7 @@
|
|||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("choice","choice","2") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("choice","choice","2") ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="answer2" size="60" value="<?php p($form->answer2) ?>" />
|
||||
<?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
|
||||
|
@ -115,28 +115,28 @@
|
|||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("choice","choice","3") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("choice","choice","3") ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="answer3" size="60" value="<?php p($form->answer3) ?>" />
|
||||
<?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("choice","choice","4") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("choice","choice","4") ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="answer4" size="60" value="<?php p($form->answer4) ?>" />
|
||||
<?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("choice","choice","5") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("choice","choice","5") ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="answer5" size="60" value="<?php p($form->answer5) ?>" />
|
||||
<?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("choice","choice","6") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("choice","choice","6") ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="answer6" size="60" value="<?php p($form->answer6) ?>" />
|
||||
<?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
|
||||
|
@ -144,7 +144,7 @@
|
|||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("timerestrict", "choice") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("timerestrict", "choice") ?>:</b></td>
|
||||
<td>
|
||||
<script type="text/javascript">
|
||||
var timeitems = ['openday','openmonth','openyear','openhour', 'openminute', 'closeday','closemonth','closeyear','closehour','closeminute'];
|
||||
|
@ -157,12 +157,12 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><p> </p></td>
|
||||
<td> </td>
|
||||
<td>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="right"><p><b><?php print_string("choiceopen", "choice") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("choiceopen", "choice") ?>:</b></td>
|
||||
<td>
|
||||
|
||||
<?php
|
||||
|
@ -181,7 +181,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><p><b><?php print_string("choiceclose", "choice") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("choiceclose", "choice") ?>:</b></td>
|
||||
<td>
|
||||
|
||||
<?php
|
||||
|
@ -214,7 +214,7 @@
|
|||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("publish","choice") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("publish","choice") ?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
require_once("$CFG->dirroot/mod/choice/lib.php");
|
||||
|
@ -225,7 +225,7 @@
|
|||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("privacy","choice") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("privacy","choice") ?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
require_once("$CFG->dirroot/mod/choice/lib.php");
|
||||
|
@ -237,7 +237,7 @@
|
|||
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("allowupdate","choice") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("allowupdate","choice") ?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
$options[0] = get_string("no");
|
||||
|
@ -250,7 +250,7 @@
|
|||
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><p><b><?php print_string("showunanswered","choice") ?>:</b></p></td>
|
||||
<td align="right"><b><?php print_string("showunanswered","choice") ?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
$options[0] = get_string("no");
|
||||
|
|
|
@ -97,19 +97,20 @@
|
|||
|
||||
foreach ($useranswer as $key => $answer) {
|
||||
if ($key) {
|
||||
echo "<td width=\"$tablewidth%\" valign=\"top\" nowrap bgcolor=\"$THEME->cellcontent\">";
|
||||
echo "<td width=\"$tablewidth%\" valign=\"top\" nowrap=\"nowrap\" bgcolor=\"$THEME->cellcontent\">";
|
||||
} else {
|
||||
echo "<td width=\"$tablewidth%\" valign=\"top\" nowrap bgcolor=\"$THEME->body\">";
|
||||
echo "<td width=\"$tablewidth%\" valign=\"top\" nowrap=\"nowrap\" bgcolor=\"$THEME->body\">";
|
||||
}
|
||||
|
||||
echo "<table width=\"100%\">";
|
||||
foreach ($answer as $user) {
|
||||
echo "<tr><td width=\"10\" nowrap>";
|
||||
echo "<tr><td width=\"10\" nowrap=\"nowrap\">";
|
||||
print_user_picture($user->id, $course->id, $user->picture);
|
||||
echo "</td><td width=\"100%\" nowrap>";
|
||||
echo "</td><td width=\"100%\" nowrap=\"nowrap\">";
|
||||
echo "<p>".fullname($user, true)."</p>";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
echo "<tr><td colspan=\"2\"> </td></tr>"; /// need to have at least one row within table tags
|
||||
echo "</table>";
|
||||
|
||||
echo "</td>";
|
||||
|
|
|
@ -99,26 +99,28 @@
|
|||
if ( (!$current or $choice->allowupdate) and ($choice->timeclose >= time() or $choice->timeclose == 0) ) {
|
||||
// They haven't made their choice yet or updates allowed and choice is open
|
||||
|
||||
echo "<center><p><form name=\"form\" method=\"post\" action=\"view.php\">";
|
||||
echo "<table cellpadding=\"20\" cellspacing=\"20\"><tr>";
|
||||
echo "<form name=\"form\" method=\"post\" action=\"view.php\">";
|
||||
echo "<table cellpadding=\"20\" cellspacing=\"20\" align=\"center\"><tr>";
|
||||
|
||||
foreach ($choice->answer as $key => $answer) {
|
||||
if ($answer) {
|
||||
echo "<td align=\"center\">";
|
||||
echo "<input type=\"radio\" name=\"answer\" value=\"$key\" ".$answerchecked[$key]." />";
|
||||
echo "<input type=\"radio\" name=\"answer\" value=\"$key\" ".$answerchecked[$key]." alt=\"$answer\" />";
|
||||
p($answer);
|
||||
echo "</td>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</tr></table>";
|
||||
echo "<center>";
|
||||
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
|
||||
if (isstudent($course->id) or isteacher($course->id, 0, false)) {
|
||||
echo "<input type=\"submit\" value=\"".get_string("savemychoice","choice")."\" />";
|
||||
} else {
|
||||
print_string('havetologin', 'choice');
|
||||
}
|
||||
echo "</p></form></center>";
|
||||
echo "</center>";
|
||||
echo "</form>";
|
||||
|
||||
}
|
||||
|
||||
|
@ -196,18 +198,18 @@
|
|||
|
||||
foreach ($useranswer as $key => $answer) {
|
||||
if ($key) {
|
||||
echo "<td width=\"$tablewidth%\" valign=\"top\" nowrap bgcolor=\"$THEME->cellcontent\">";
|
||||
echo "<td width=\"$tablewidth%\" valign=\"top\" nowrap=\"nowrap\" bgcolor=\"$THEME->cellcontent\">";
|
||||
} else if ($choice->showunanswered) {
|
||||
echo "<td width=\"$tablewidth%\" valign=\"top\" nowrap bgcolor=\"$THEME->body\">";
|
||||
echo "<td width=\"$tablewidth%\" valign=\"top\" nowrap=\"nowrap\" bgcolor=\"$THEME->body\">";
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
echo "<table width=\"100%\">";
|
||||
foreach ($answer as $user) {
|
||||
echo "<tr><td width=\"10\" nowrap>";
|
||||
echo "<tr><td width=\"10\" nowrap=\"nowrap\">";
|
||||
print_user_picture($user->id, $course->id, $user->picture);
|
||||
echo "</td><td width=\"100%\" nowrap>";
|
||||
echo "</td><td width=\"100%\" nowrap=\"nowrap\">";
|
||||
echo "<p>".fullname($user, $isteacher)."</p>";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue