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 = "";
<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);
</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") ?>
</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") ?>
</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") ?>
</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'];
</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
</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
</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");
</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");
<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");
<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");
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>";
}
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>";
}