print_heading($quiz->name);
print_heading(get_string("attempt", "quiz", $attemptnumber));
if (trim(strip_tags($quiz->intro))) {
- print_simple_box(format_text($quiz->intro), "CENTER");
+ print_simple_box(format_text($quiz->intro), "center");
}
echo "<br />\n";
echo "<div align=\"center\">\n";
print_string("requirepasswordmessage", "quiz");
echo "<br /><br />\n";
- echo " <input name=\"quizpassword\" type=\"password\" value=\"\" />";
+ echo " <input name=\"quizpassword\" type=\"password\" value=\"\" alt=\"password\" />";
echo " <input type=\"submit\" value=\"".get_string("ok")."\" />\n";
echo "</div>\n";
print_heading(get_string("attempt", "quiz", $attemptnumber));
if (trim(strip_tags($quiz->intro))) {
- print_simple_box(format_text($quiz->intro), "CENTER");
+ print_simple_box(format_text($quiz->intro), "center");
}
/// Print the table of all categories
$table->head = array ($strcategory, $strcategoryinfo, $strpublish, $strquestions, $straction);
- $table->align = array ("LEFT", "LEFT", "CENTER", "CENTER", "CENTER");
+ $table->align = array ("left", "left", "center", "center", "center");
$table->size = array ("80", "80", "40", "40", "50");
$table->width = 200;
$table->nowrap = true;
/// Print question number and grade:
- echo '<p align="center"><b>' . $number . '</b></p>';
+ echo '<center><b>' . $number . '</b></center>';
if (false !== $grade) {
$strmarks = get_string("marks", "quiz");
- echo '<p align="center"><font size="1">';
+ //echo '<p align="center"><font size="1">';
+ echo '<br /><center><font size="1">';
if (false !== $actualgrade) {
- echo "$strmarks: $actualgrade/$grade</font></p>";
+ echo "$strmarks: $actualgrade/$grade</font></center>";
} else {
- echo "$grade $strmarks</font></p>";
+ echo "$grade $strmarks</font></center>";
}
}
print_spacer(1,100);
$cname = quiz_get_category_coursename( $category );
$seltxt = "";
if ($cid==$selected) {
- $seltxt = "selected=\"true\"";
+ $seltxt = "selected=\"selected\"";
}
if ((!$only_editable) || isteacheredit($category->course)) {
echo " <option value=\"$cid\" $seltxt>$cname</option>\n";
<center>
<table cellpadding="5">
<tr valign="top">
- <td align="right"><p><b><?php print_string("name") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("name") ?>:</b></td>
<td>
<input type="text" name="name" size="40" value="<?php p($form->name) ?>" />
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("introduction", "quiz") ?>:</b></p>
+ <td align="right"><b><?php print_string("introduction", "quiz") ?>:</b>
<br />
- <font size="1">
+ <span class="editorhelptext">
<?php
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
}
?>
<br />
- </font>
+ </span>
</td>
<td>
<?php
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("quizopen", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("quizopen", "quiz") ?>:</b></td>
<td>
<?php
if (!$form->timeopen and $course->format == "weeks") {
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("quizclose", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("quizclose", "quiz") ?>:</b></td>
<td>
<?php
if (!$form->timeclose and $course->format == "weeks") {
</tr>
<!-- BEGIN EDIT -->
<tr valign="top">
- <td align="right"><p><b><?php print_string("timelimit", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("timelimit", "quiz") ?>:</b></td>
<td>
<?php
print_timer_selector($form->timelimit, get_string("minutes","quiz"));
</tr>
<!-- END EDIT -->
<tr valign="top">
- <td align="right"><p><b><?php print_string("shufflequestions", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("shufflequestions", "quiz") ?>:</b></td>
<td>
<?php
$options = array();
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("shuffleanswers", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("shuffleanswers", "quiz") ?>:</b></td>
<td>
<?php
$options = array();
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("attemptsallowed", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("attemptsallowed", "quiz") ?>:</b></td>
<td>
<?php
$options = array();
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("eachattemptbuildsonthelast", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("eachattemptbuildsonthelast", "quiz") ?>:</b></td>
<td>
<?php
$options = array();
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("grademethod", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("grademethod", "quiz") ?>:</b></td>
<td>
<?php
$options = array();
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("showfeedback", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("showfeedback", "quiz") ?>:</b></td>
<td>
<?php
$options = array();
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("showcorrectanswer", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("showcorrectanswer", "quiz") ?>:</b></td>
<td>
<?php
$options = array();
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("allowreview", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("allowreview", "quiz") ?>:</b></td>
<td>
<?php
$options = array();
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("maximumgrade") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("maximumgrade") ?>:</b></td>
<td>
<?php
for ($i=100; $i>=1; $i--) {
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("requirepassword", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("requirepassword", "quiz") ?>:</b></td>
<td>
<input type="text" name="password" size="40" value="<?php p($form->password) ?>" />
<?php helpbutton("requirepassword", get_string("requirepassword", "quiz"), "quiz"); ?>
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("requiresubnet", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("requiresubnet", "quiz") ?>:</b></td>
<td>
<input type="text" name="subnet" size="40" value="<?php p($form->subnet) ?>" />
<?php helpbutton("requiresubnet", get_string("requiresubnet", "quiz"), "quiz"); ?>
<?php foreach ($calculatedmessages as $message) {formerr("$message<br/>");} ?>
<table cellpadding="5">
<tr valign="top">
- <td align="right"><p><b><?php print_string("category", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
<td>
<?php quiz_category_select_menu($course->id, true, true, $question->category); ?>
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("questionname", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
<td>
- <input type="text" name="name" size="50" value="<?php p($question->name) ?>" />
+ <input type="text" name="name" size="50" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>" />
<?php if (isset($err["name"])) formerr($err["name"]); ?>
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("question", "quiz") ?>:</b></p>
+ <td align="right"><b><?php print_string("question", "quiz") ?>:</b>
<br />
<br />
<br />
- <p><font size="1">
+ <span class="editorhelptext">
<?php
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
helpbutton("text", get_string("helptext"), "moodle", true, true);
}
?>
- </font></p>
+ </span>
</td>
<td>
<?php if (isset($err["questiontext"])) {
if ($usehtmleditor) { /// Trying this out for a while
echo '<input type="hidden" name="questiontextformat" value="'.FORMAT_HTML.'" />';
} else {
- echo "<div align=\"right\">";
+ echo '<div align="right">';
print_string("formattexttype");
echo ": ";
if (!isset($question->questiontextformat)) {
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("imagedisplay", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("imagedisplay", "quiz") ?>:</b></td>
<td>
<?php if (empty($images)) {
print_string("noimagesyet");
</tr>
<tr valign="top">
-<td align="right"><p><b><?php print_string("correctanswerformula", "quiz") ?>:</b></p></td>
+<td align="right"><b><?php print_string("correctanswerformula", "quiz") ?>:</b></td>
<td>
- <input align="LEFT" type="text" id="formula0" name="answer[]" size="20" value="<?php p($answers[0]->answer) ?>" />
+ <input align="left" type="text" id="formula0" name="answer[]" size="20" value="<?php p($answers[0]->answer) ?>" alt="<?php print_string("correctanswerformula", "quiz") ?>" />
<input type="hidden" name="fraction[]" value="1.0" />
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("tolerance", "quiz"); ?>:</b></p></td>
+ <td align="right"><b><?php print_string("tolerance", "quiz"); ?>:</b></td>
<td>
- <input align="LEFT" type="text" id="tolerance0" name="tolerance[]" size="15" value="<?php p($answers[0]->tolerance) ?>" />±
+ <input align="left" type="text" id="tolerance0" name="tolerance[]" size="15" value="<?php p($answers[0]->tolerance) ?>" alt="<?php print_string("tolerance", "quiz"); ?>" />±
</td>
</tr>
<tr valign="top">
-<td align="right"><p><b><?php print_string("tolerancetype", "quiz"); ?>:</b></p></td>
+<td align="right"><b><?php print_string("tolerancetype", "quiz"); ?>:</b></td>
<td>
<?php choose_from_menu($qtypeobj->tolerance_types(),
'tolerancetype[]', $answers[0]->tolerancetype, false); ?>
</td>
</tr>
<tr valign="top">
-<td align="right"><p><b><?php print_string("correctanswerlength", "quiz"); ?>:</b></p></td>
+<td align="right"><b><?php print_string("correctanswerlength", "quiz"); ?>:</b></td>
<td>
<?php choose_from_menu(array('1' => '1', '2' => '2', '3' => '3',
'4' => '4', '5' => '5', '6' => '6',
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("feedback", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("feedback", "quiz") ?>:</b></td>
<td>
- <textarea name="feedback[]" rows="2" cols="50" wrap="virtual"><?php p($answers[0]->feedback) ?></textarea>
+ <textarea name="feedback[]" rows="2" cols="50"><?php p($answers[0]->feedback) ?></textarea>
</td>
</tr>
<tr valign="top">
-<td align="right"><p><b><?php print_string("unit", "quiz") ?>:</b></p></td>
+<td align="right"><b><?php print_string("unit", "quiz") ?>:</b></td>
<td>
- <p><input type="HIDDEN" name="multiplier[]" value="1.0" />
- <input align="LEFT" type="text" id="defaultunit" name="unit[]"
- size="5" value="<?php p($units[0]->unit) ?>" />
- <b>(<?php print_string("optional", "quiz") ?>)</b></p>
+ <input type="hidden" name="multiplier[]" value="1.0" />
+ <input align="left" type="text" id="defaultunit" name="unit[]"
+ size="5" value="<?php p($units[0]->unit) ?>"
+ alt="<?php print_string("unit", "quiz") ?>" />
+ <b>(<?php print_string("optional", "quiz") ?>)</b>
</td>
</tr>
<tr valign="top">
<td></td>
-<td align="left"><p><b><?php print_string("alternativeunits", "quiz") ?>:</b></p></td>
+<td align="left"><b><?php print_string("alternativeunits", "quiz") ?>:</b></td>
<td></td>
</tr>
<?php
<tr valign="top">
<td></td>
<td align="left">
- <p><b><?php print_string("multiplier", "quiz") ?>:</b>
+ <b><?php print_string("multiplier", "quiz") ?>:</b>
<input type="text" id="<?php p("multiplier$i") ?>" size="10"
- align="RIGHT" name="multiplier[]"
- value="<?php p($unit->multiplier) ?>" />
+ align="right" name="multiplier[]"
+ value="<?php p($unit->multiplier) ?>"
+ alt="<?php print_string("multiplier", "quiz") ?>" />
<b> <?php print_string("unit", "quiz") ?>:</b>
- <input align="LEFT" type="text" id="<?php p("unit$i") ?>"
+ <input align="left" type="text" id="<?php p("unit$i") ?>"
name="unit[]"
- size="5" value="<?php p($unit->unit) ?>" /></p>
+ size="5" value="<?php p($unit->unit) ?>"
+ alt="<?php print_string("unit", "quiz") ?>" />
</td>
</tr>
<?php
<input type="hidden" name="id" value="<?php p($question->id) ?>" />
<input type="hidden" name="qtype" value="<?php p($question->qtype) ?>" />
-<input type="submit" onClick="return determineMinAndMax();" value="<?php print_string("savechanges") ?>" />
+<input type="submit" onclick="return determineMinAndMax();" value="<?php print_string("savechanges") ?>" />
</center>
</form>
-<script language="javascript">
+<script language="javascript" type="text/javascript">
function determineMinAndMax() {
// This client-side script will determine the values for min and max
// based on the input for answer and acceptederror.
}
$table->head = array($straction, $strdatasetnumber);
- $table->align = array("CENTER", "CENTER");
+ $table->align = array("center", "center");
$addtable->head = $table->head;
if ($qtypeobj->supports_dataset_item_generation()) {
if (isset($form->forceregeneration) && $form->forceregeneration) {
. ($qtypeobj->supports_dataset_item_generation()
? '<br/>' . $qtypeobj->custom_generator_tools($datasetdef)
: '');
- $table->align[] = "CENTER";
+ $table->align[] = "center";
// THE if-statement IS FOR BUT ONE THING
// - to determine an item value for the input field
if ($strquestionheader) {
$table->head[] = $strquestionheader;
$addtable->head[] = $strquestionheader;
- $table->align[] = "CENTER";
+ $table->align[] = "center";
$addline[] = $qtypeobj->comment_on_datasetitems($question, $data, $maxnumber + 1);
}
<tr valign="top">
- <td align="right"><p><b><?php print_string("category", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("questionname", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
<td>
- <input type="text" name="name" size="40" value="<?php p($question->name) ?>" />
+ <input type="text" name="name" size="40" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>" />
<?php if (isset($err["name"])) formerr($err["name"]); ?>
<tr valign="top">
- <td align="right"><p><b><?php print_string("question", "quiz") ?>:</b></p>
+ <td align="right"><b><?php print_string("question", "quiz") ?>:</b>
<br />
<br />
- <p><font size="1">
+ <font size="1">
<?php
?>
- </font></p>
+ </font>
</td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("imagedisplay", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("imagedisplay", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("category", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("questionname", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
<td>
- <input type="text" name="name" size="40" value="<?php p($question->name) ?>" />
+ <input type="text" name="name" size="40" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>" />
<?php if (isset($err["name"])) formerr($err["name"]); ?>
<tr valign="top">
- <td align="right"><p><b><?php print_string("question", "quiz") ?>:</b></p>
+ <td align="right"><b><?php print_string("question", "quiz") ?>:</b>
<br />
<br />
- <p><font size="1">
+ <font size="1">
<?php
?>
- </font></p>
+ </font>
</td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("imagedisplay", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("imagedisplay", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("choices", "quiz") ?></b>:</p></td>
+ <td align="right"><b><?php print_string("choices", "quiz") ?></b>:</td>
- <td><p><?php print_string("filloutthreequestions", "quiz") ?></p>
+ <td><?php print_string("filloutthreequestions", "quiz") ?>
</td>
<tr valign="top">
- <td align="right"><p><b><?php echo get_string("question", "quiz")." $i"; ?> :</b></p></td>
+ <td align="right"><b><?php echo get_string("question", "quiz")." $i"; ?> :</b></td>
<td>
<?php echo get_string("matchanswer", "quiz")." $i"; ?>
- <input type="text" name="subanswers[]" size="50" value="<?php p($subanswers[$i-1]) ?>" />
+ <input type="text" name="subanswers[]" size="50" value="<?php p($subanswers[$i-1]) ?>" alt="<?php echo get_string("matchanswer", "quiz")." $i"; ?>" />
</td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("category", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("questionname", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
<td>
- <input type="text" name="name" size="40" value="<?php p($question->name) ?>" />
+ <input type="text" name="name" size="40" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>" />
<?php if (isset($err["name"])) formerr($err["name"]); ?>
<tr valign="top">
- <td align="right"><p><b><?php print_string("question", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("question", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("imagedisplay", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("imagedisplay", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("category", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("questionname", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
<td>
- <input type="text" name="name" size="40" value="<?php p($question->name) ?>" />
+ <input type="text" name="name" size="40" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>" />
<?php if (isset($err["name"])) formerr($err["name"]); ?>
<tr valign="top">
- <td align="right"><p><b><?php print_string("question", "quiz") ?>:</b></p>
+ <td align="right"><b><?php print_string("question", "quiz") ?>:</b>
<br />
<br />
- <p><font size="1">
+ <font size="1">
<?php
?>
- </font></p>
+ </font>
</td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("imagedisplay", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("imagedisplay", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("answerhowmany", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("answerhowmany", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("choices", "quiz") ?></b>:</p></td>
+ <td align="right"><b><?php print_string("choices", "quiz") ?></b>:</td>
- <td><p><?php print_string("fillouttwochoices", "quiz") ?></p>
+ <td><?php print_string("fillouttwochoices", "quiz") ?>
</td>
<tr valign="top">
- <td align="right"><p><b><?php echo get_string("choice", "quiz")." $i"; ?>:</b></p></td>
+ <td align="right"><b><?php echo get_string("choice", "quiz")." $i"; ?>:</b></td>
<td>
- <input type="text" name="answer[]" size="50" maxlength="255" value="<?php p($answers[$i-1]->answer) ?>" />
+ <input type="text" name="answer[]" size="50" maxlength="255" value="<?php p($answers[$i-1]->answer) ?>" alt="<?php echo get_string("choice", "quiz")." $i"; ?>"/>
<?php print_string("grade");
<tr valign="top">
- <td align="right"><p><b><?php print_string("feedback", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("feedback", "quiz") ?>:</b></td>
<td>
- <textarea name="feedback[]" rows="2" cols="50" wrap="virtual"><?php p($answers[$i-1]->feedback) ?></textarea>
+ <textarea name="feedback[]" rows="2" cols="50"><?php p($answers[$i-1]->feedback) ?></textarea>
</td>
echo "<input $readonly $name $checked $type value=\"$answer->id\" />";
echo "</td>";
+
+ /// remove para tags - not needed
+ $options->para = false;
+
if ($readonly and $quiz->correctanswers and !empty($correctanswers[$nameprefix.$aid])) {
- echo '<td valign="top" class="highlight">'.format_text("$qnumchar. $answer->answer").'</td>';
+ echo '<td valign="top" class="highlight">'.format_text("$qnumchar. $answer->answer", FORMAT_MOODLE , $options).'</td>';
} else {
- echo '<td valign="top">'.format_text("$qnumchar. $answer->answer").'</td>';
+ echo '<td valign="top">'.format_text("$qnumchar. $answer->answer", FORMAT_MOODLE, $options).'</td>';
}
if ($quiz->feedback) {
echo "<td valign=\"top\"> ";
<center>
<table cellpadding="5">
<tr valign="top">
- <td align="right"><p><b><?php print_string("category", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
<td>
<?php quiz_category_select_menu($course->id, true, true, $question->category); ?>
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("questionname", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
<td>
- <input type="text" name="name" size="50" value="<?php p($question->name) ?>" />
+ <input type="text" name="name" size="50" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>" />
<?php if (isset($err["name"])) formerr($err["name"]); ?>
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("question", "quiz") ?>:</b></p>
+ <td align="right"><b><?php print_string("question", "quiz") ?>:</b>
<br />
<br />
<br />
- <p><font size="1">
+ <font size="1">
<?php
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
helpbutton("text", get_string("helptext"), "moodle", true, true);
}
?>
- </font></p>
+ </font>
</td>
<td>
<?php if (isset($err["questiontext"])) {
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("imagedisplay", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("imagedisplay", "quiz") ?>:</b></td>
<td>
<?php if (empty($images)) {
print_string("noimagesyet");
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("correctanswer", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("correctanswer", "quiz") ?>:</b></td>
<?php
// Even thou the rest of the module can handle up to six numerical answers,
// this form will limit the number of numerical answers to one only.
}
?>
<td>
- <input align="LEFT" type="text" id="correct0" name="answer[]" size="20" value="<?php p($answers[0]->answer) ?>" />
+ <input align="left" type="text" id="correct0" name="answer[]" size="20" value="<?php p($answers[0]->answer) ?>" alt="<?php print_string("correctanswer", "quiz") ?>" />
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("acceptederror", "quiz"); ?>:</b></p></td>
+ <td align="right"><b><?php print_string("acceptederror", "quiz"); ?>:</b></td>
<td>
- <input align="LEFT" type="text" id="acceptederror0" name="acceptederror[]" size="15" value="<?php p($acceptederror) ?>" />±
+ <input align="left" type="text" id="acceptederror0" name="acceptederror[]" size="15" value="<?php p($acceptederror) ?>" alt="<?php print_string("acceptederror", "quiz"); ?>" />±
<!-- Values max and min will be determined when the form is submitted -->
- <input type="HIDDEN" id="min0" name="min[]" value="" />
- <input type="HIDDEN" id="max0" name="max[]" value="" />
- <input type="HIDDEN" name="fraction[]" value="1" />
+ <input type="hidden" id="min0" name="min[]" value="" />
+ <input type="hidden" id="max0" name="max[]" value="" />
+ <input type="hidden" name="fraction[]" value="1" />
<br/>
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("feedback", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("feedback", "quiz") ?>:</b></td>
<td>
- <textarea name="feedback[]" rows="2" cols="50" wrap="virtual"><?php p($answers[0]->feedback) ?></textarea>
+ <textarea name="feedback[]" rows="2" cols="50"><?php p($answers[0]->feedback) ?></textarea>
</td>
</tr>
<tr valign="top">
-<td align="right"><p><b><?php print_string("unit", "quiz") ?>:</b></p></td>
+<td align="right"><b><?php print_string("unit", "quiz") ?>:</b></td>
<td>
- <p><input type="HIDDEN" name="multiplier[]" value="1.0" />
- <input align="LEFT" type="text" id="defaultunit" name="unit[]"
- size="5" value="<?php p($units[0]->unit) ?>" />
- <b>(<?php print_string("optional", "quiz") ?>)</b></p>
+ <input type="hidden" name="multiplier[]" value="1.0" />
+ <input align="left" type="text" id="defaultunit" name="unit[]"
+ size="5" value="<?php p($units[0]->unit) ?>" alt="<?php print_string("unit", "quiz") ?>" />
+ <b>(<?php print_string("optional", "quiz") ?>)</b>
</td>
</tr>
<tr valign="top">
<td></td>
-<td align="left"><p><b><?php print_string("alternativeunits", "quiz") ?>:</b></p></td>
+<td align="left"><b><?php print_string("alternativeunits", "quiz") ?>:</b></td>
<td></td>
</tr>
<?php
<tr valign="top">
<td></td>
<td align="left">
- <p><b><?php print_string("multiplier", "quiz") ?>:</b>
+ <b><?php print_string("multiplier", "quiz") ?>:</b>
<input type="text" id="<?php p("multiplier$i") ?>" size="10"
- align="RIGHT" name="multiplier[]"
- value="<?php p($unit->multiplier) ?>" />
+ align="right" name="multiplier[]"
+ value="<?php p($unit->multiplier) ?>"
+ alt="<?php print_string("multiplier", "quiz") ?>" />
<b> <?php print_string("unit", "quiz") ?>:</b>
- <input align="LEFT" type="text" id="<?php p("unit$i") ?>"
+ <input align="left" type="text" id="<?php p("unit$i") ?>"
name="unit[]"
- size="5" value="<?php p($unit->unit) ?>" /></p>
+ size="5" value="<?php p($unit->unit) ?>" />
</td>
</tr>
<?php
<input type="hidden" name="id" value="<?php p($question->id) ?>" />
<input type="hidden" name="qtype" value="<?php p($question->qtype) ?>" />
-<input type="submit" onClick="return determineMinAndMax();" value="<?php print_string("savechanges") ?>" />
+<input type="submit" onclick="return determineMinAndMax();" value="<?php print_string("savechanges") ?>" />
</center>
</form>
-<script language="JAVASCRIPT">
+<script language="javascript" type="text/javascript">
function determineMinAndMax() {
// This client-side script will determine the values for min and max
// based on the input for answer and acceptederror.
<tr valign="top">
- <td align="right"><p><b><?php print_string("category", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("questionname", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
<td>
} ?>
- <input type="text" name="name" size="40" value="<?php p($question->name) ?>" />
+ <input type="text" name="name" size="40" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>" />
<?php if (isset($err["name"])) formerr($err["name"]); ?>
<tr valign="top">
- <td align="right"><p><b><?php print_string("category", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("questionname", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
<td>
- <input type="text" name="name" size="50" value="<?php p($question->name) ?>" />
+ <input type="text" name="name" size="50" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>" />
<?php if (isset($err["name"])) formerr($err["name"]); ?>
<tr valign="top">
- <td align="right"><p><b><?php print_string("question", "quiz") ?>:</b></p>
+ <td align="right"><b><?php print_string("question", "quiz") ?>:</b>
<br />
<br />
- <p><font size="1">
+ <font size="1">
<?php
?>
- </font></p>
+ </font>
</td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("imagedisplay", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("imagedisplay", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("casesensitive", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("casesensitive", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("correctanswers", "quiz") ?></b>:</p></td>
+ <td align="right"><b><?php print_string("correctanswers", "quiz") ?></b>:</td>
<td>
- <p><?php print_string("filloutoneanswer", "quiz") ?></p>
+ <?php print_string("filloutoneanswer", "quiz") ?>
</td>
-
+</tr>
<?php
<tr valign="top">
- <td align="right"><p><b><?php echo get_string("answer", "quiz")." $i"; ?>:</b></p></td>
+ <td align="right"><b><?php echo get_string("answer", "quiz")." $i"; ?>:</b></td>
<td>
- <input type="text" name="answer[]" size="50" value="<?php p($answers[$i-1]->answer) ?>" />
+ <input type="text" name="answer[]" size="50" value="<?php p($answers[$i-1]->answer) ?>" alt="<?php echo get_string("answer", "quiz")." $i"; ?>" />
<?php print_string("grade");
<tr valign="top">
- <td align="right"><p><b><?php print_string("feedback", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("feedback", "quiz") ?>:</b></td>
<td>
- <textarea name="feedback[]" rows="2" cols="50" wrap="virtual"><?php p($answers[$i-1]->feedback) ?></textarea>
+ <textarea name="feedback[]" rows="2" cols="50"><?php p($answers[$i-1]->feedback) ?></textarea>
</td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("category", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("questionname", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
<td>
- <input type="text" name="name" size="50" value="<?php p($question->name) ?>" />
+ <input type="text" name="name" size="50" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>"/>
<?php if (isset($err["name"])) formerr($err["name"]); ?>
<tr valign="top">
- <td align="right"><p><b><?php print_string("question", "quiz") ?>:</b></p>
+ <td align="right"><b><?php print_string("question", "quiz") ?>:</b>
<br />
<br />
- <p><font size="1">
+ <font size="1">
<?php
?>
- </font></p>
+ </font>
</td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("imagedisplay", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("imagedisplay", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("correctanswer", "quiz") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("correctanswer", "quiz") ?>:</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("feedback", "quiz") ?> (<?php print_string("true", "quiz") ?>):</b></p></td>
+ <td align="right"><b><?php print_string("feedback", "quiz") ?> (<?php print_string("true", "quiz") ?>):</b></td>
<td>
<tr valign="top">
- <td align="right"><p><b><?php print_string("feedback", "quiz") ?> (<?php print_string("false", "quiz") ?>):</b></p></td>
+ <td align="right"><b><?php print_string("feedback", "quiz") ?> (<?php print_string("false", "quiz") ?>):</b></td>
<td>
- <textarea name="feedbackfalse" rows="2" cols="50" wrap="virtual"><?php p($false->feedback) ?></textarea>
+ <textarea name="feedbackfalse" rows="2" cols="50"><?php p($false->feedback) ?></textarea>
</td>
if($quests[$qid]['qtype'] == 8){
$thismin[$qid] = get_field("quiz_numerical","min","question","$qid");
$thismax[$qid] = get_field("quiz_numerical","max","question","$qid");
- $quests[$qid]["correct"] = $thismin[$qid] ."< $choice_data->answer >" . $thismax[$qid];
+ $quests[$qid]["correct"] = $thismin[$qid] ."< $choice_data->answer <" . $thismax[$qid];
}
if($quests[$qid]['qtype'] >3) {continue;}
//only get choices here if type is SHORTANSWER,TRUEFALSE or MULTICHOICE
//Print user responses
print ("<table border=\"1\" align=\"center\" width=\"95%\" cellpadding=\"2\" cellspacing=\"0\">\n");
$totcolcount = $table_colcount+2;
- print("<tr><th colspan=$totcolcount>$strindivresp</th></tr>");
+ print("<tr><th colspan=\"$totcolcount\">$strindivresp</th></tr>");
qr_print_headers($data_tally,"$strname","$strgrade");
//now print the lines of answers
}
}
- print("</table><p>\n");
+ print("</table><br />\n");
if($debug and !$download){
print("<h3>Qtally</h3>");
print_object($qtally);
}
//print tally of how many selected each choice
- print ("<p><table width=\"95%\" border=\"1\" align=\"center\" cellpadding=\"2\" cellspacing=\"0\">\n");
- print("<tr><th colspan=$totcolcount>$stritemanal</th></tr>");
+ print ("<br /><table width=\"95%\" border=\"1\" align=\"center\" cellpadding=\"2\" cellspacing=\"0\">\n");
+ print("<tr><th colspan=\"$totcolcount\">$stritemanal</th></tr>");
qr_print_headers($data_tally,"Item"," ");
//display row with correct answers
print("<tr><th colspan=\"2\" align=\"right\">$strcorrresp:</th>");
//Now printout the questions (and M/C answers if $containsMC
- print ("<p><table width=\"95%\" border=\"1\" align=\"center\" cellpadding=\"2\" cellspacing=\"0\">\n");
+ print ("<br /><table width=\"95%\" border=\"1\" align=\"center\" cellpadding=\"2\" cellspacing=\"0\">\n");
if ($containsMCTF){$ws = " ". $strwithsummary;} else {$ws = "";}
print("<tr><th colspan=\"3\">QUIZ: $quiz->name -- $strlistitems$ws</th></tr>\n");
$qcount = 0;
} else {
$colcount = 1;
}
- print("<th colspan=$colcount>Q-$qcount</th>");
+ print("<th colspan=\"$colcount\">Q-$qcount</th>");
}
print("</tr>\n");
}
break;
case 8: //NUMERICAL
$returndata['data'] = $thisanswer;
-// $returndata['data'] = $thismin . "<" . $thisanswer . ">" . $thismax;
+// $returndata['data'] = $thismin . "<" . $thisanswer . "<" . $thismax;
$qtally[$qid]['response'][$thisanswer]++;
if ($thisanswer >= $thismin[$qid] and $thisanswer <= $thismax[$qid]){
$qtally[$qid]['correct']++;
}
//Embed script for warning
- echo "\n<script lang=\"javascript\">\n<!--\nfunction delcheck(){\n ";
+ echo "\n<script language=\"javascript\" type=\"text/javascript\">\n<!--\nfunction delcheck(){\n ";
echo "if (confirm('$strreallydel')) {\n";
echo " document.delform.del.value='all';\n return true;\n";
echo " } else {\n";
print_table($table);
//There might be a more elegant way than using the <center> tag for this
- echo "<center><input type=\"submit\" value=\"$strdeleteselected\"> ";
- echo "<input type=\"button\" value=\"$strdeleteall\" onClick=\"if(delcheck()){document.delform.submit()}\" />\n</center>\n";
+ echo "<center><input type=\"submit\" value=\"$strdeleteselected\" /> ";
+ echo "<input type=\"button\" value=\"$strdeleteall\" onclick=\"if(delcheck()){document.delform.submit()}\" />\n</center>\n";
echo "</form>\n";
return true;
} else {
$attemptlapse = "...";
}
- $button = "<input type=\"checkbox\" name=\"box$attempt->id\" value=\"$attempt->id\" />";
+ $button = "<input type=\"checkbox\" name=\"box$attempt->id\" value=\"$attempt->id\" alt=\"box$attempt->id\" />";
$revurl = "review.php?q=$quiz->id&attempt=$attempt->id";
if ($attemptgrade == $bestgrade) {
$userattempts[] = "$button <span class=\"highlight\">$attemptgrade</span> <a href=\"$revurl\">$attemptdate</a> ($attemptlapse)";
print_heading($quiz->name);
if (trim(strip_tags($quiz->intro))) {
- print_simple_box(format_text($quiz->intro), "CENTER");
+ print_simple_box(format_text($quiz->intro), "center");
}
}
$strconfirmstartattempt = addslashes(get_string("confirmstartattempt","quiz"));
echo "<br />";
+ echo "</p>";
echo "<div align=\"center\">";
if ($quiz->timelimit) {
include("view_js.php");
print_single_button("attempt.php", $options, get_string("attemptquiznow","quiz"));
}
echo "</div>\n";
- echo "</p>";
+ //echo "</p>";
}
} else {
print_heading(get_string("nomoreattempts", "quiz"));