Changes for XHTML and accessibility compliance
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
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";
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
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";
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
/// 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;
|
||||
|
||||
+6
-5
@@ -208,14 +208,15 @@ class quiz_default_questiontype {
|
||||
|
||||
/// 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);
|
||||
@@ -1172,7 +1173,7 @@ function quiz_category_select_menu($courseid,$published=false,$only_editable=fal
|
||||
$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";
|
||||
|
||||
+18
-18
@@ -63,15 +63,15 @@
|
||||
<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);
|
||||
@@ -83,7 +83,7 @@
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
</font>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
@@ -92,7 +92,7 @@
|
||||
</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") {
|
||||
@@ -105,7 +105,7 @@
|
||||
</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") {
|
||||
@@ -119,7 +119,7 @@
|
||||
</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"));
|
||||
@@ -129,7 +129,7 @@
|
||||
</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();
|
||||
@@ -141,7 +141,7 @@
|
||||
</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();
|
||||
@@ -153,7 +153,7 @@
|
||||
</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();
|
||||
@@ -168,7 +168,7 @@
|
||||
</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();
|
||||
@@ -183,7 +183,7 @@
|
||||
</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();
|
||||
@@ -197,7 +197,7 @@
|
||||
</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();
|
||||
@@ -209,7 +209,7 @@
|
||||
</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();
|
||||
@@ -221,7 +221,7 @@
|
||||
</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();
|
||||
@@ -233,7 +233,7 @@
|
||||
</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--) {
|
||||
@@ -247,14 +247,14 @@
|
||||
</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"); ?>
|
||||
|
||||
@@ -4,24 +4,24 @@
|
||||
<?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);
|
||||
@@ -29,7 +29,7 @@
|
||||
helpbutton("text", get_string("helptext"), "moodle", true, true);
|
||||
}
|
||||
?>
|
||||
</font></p>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (isset($err["questiontext"])) {
|
||||
@@ -42,7 +42,7 @@
|
||||
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)) {
|
||||
@@ -56,7 +56,7 @@
|
||||
</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");
|
||||
@@ -68,27 +68,27 @@
|
||||
</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',
|
||||
@@ -99,23 +99,24 @@
|
||||
</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
|
||||
@@ -125,14 +126,16 @@ for ($i=1; $i<count($units); $i++) {
|
||||
<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
|
||||
@@ -142,10 +145,10 @@ for ($i=1; $i<count($units); $i++) {
|
||||
|
||||
<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.
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
}
|
||||
|
||||
$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) {
|
||||
@@ -175,7 +175,7 @@
|
||||
. ($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
|
||||
@@ -244,7 +244,7 @@
|
||||
if ($strquestionheader) {
|
||||
$table->head[] = $strquestionheader;
|
||||
$addtable->head[] = $strquestionheader;
|
||||
$table->align[] = "CENTER";
|
||||
$table->align[] = "center";
|
||||
$addline[] = $qtypeobj->comment_on_datasetitems($question, $data, $maxnumber + 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
<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"]); ?>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<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 />
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<br />
|
||||
|
||||
<p><font size="1">
|
||||
<font size="1">
|
||||
|
||||
<?php
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
?>
|
||||
|
||||
</font></p>
|
||||
</font>
|
||||
|
||||
</td>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
<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"]); ?>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<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 />
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<br />
|
||||
|
||||
<p><font size="1">
|
||||
<font size="1">
|
||||
|
||||
<?php
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
?>
|
||||
|
||||
</font></p>
|
||||
</font>
|
||||
|
||||
</td>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -134,9 +134,9 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
<?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>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
<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"]); ?>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
<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"]); ?>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<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 />
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<br />
|
||||
|
||||
<p><font size="1">
|
||||
<font size="1">
|
||||
|
||||
<?php
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
?>
|
||||
|
||||
</font></p>
|
||||
</font>
|
||||
|
||||
</td>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -156,9 +156,9 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -184,11 +184,11 @@
|
||||
|
||||
<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");
|
||||
|
||||
@@ -204,11 +204,11 @@
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -210,10 +210,14 @@ class quiz_multichoice_qtype extends quiz_default_questiontype {
|
||||
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\"> ";
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
<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);
|
||||
@@ -27,7 +27,7 @@
|
||||
helpbutton("text", get_string("helptext"), "moodle", true, true);
|
||||
}
|
||||
?>
|
||||
</font></p>
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (isset($err["questiontext"])) {
|
||||
@@ -54,7 +54,7 @@
|
||||
</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");
|
||||
@@ -66,7 +66,7 @@
|
||||
</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.
|
||||
@@ -78,38 +78,38 @@
|
||||
}
|
||||
?>
|
||||
<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
|
||||
@@ -119,14 +119,15 @@ for ($i=1; $i<count($units); $i++) {
|
||||
<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
|
||||
@@ -136,10 +137,10 @@ for ($i=1; $i<count($units); $i++) {
|
||||
|
||||
<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.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
} ?>
|
||||
|
||||
<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"]); ?>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
<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"]); ?>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<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 />
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<br />
|
||||
|
||||
<p><font size="1">
|
||||
<font size="1">
|
||||
|
||||
<?php
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
?>
|
||||
|
||||
</font></p>
|
||||
</font>
|
||||
|
||||
</td>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -154,16 +154,16 @@
|
||||
|
||||
<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
|
||||
@@ -176,11 +176,11 @@
|
||||
|
||||
<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");
|
||||
|
||||
@@ -196,11 +196,11 @@
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
<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"]); ?>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<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 />
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<br />
|
||||
|
||||
<p><font size="1">
|
||||
<font size="1">
|
||||
|
||||
<?php
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
?>
|
||||
|
||||
</font></p>
|
||||
</font>
|
||||
|
||||
</td>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -164,11 +164,11 @@
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class quiz_report extends quiz_default_report {
|
||||
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
|
||||
@@ -659,7 +659,7 @@ class quiz_report extends quiz_default_report {
|
||||
//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
|
||||
@@ -698,15 +698,15 @@ class quiz_report extends quiz_default_report {
|
||||
}
|
||||
}
|
||||
|
||||
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>");
|
||||
@@ -760,7 +760,7 @@ class quiz_report extends quiz_default_report {
|
||||
|
||||
//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;
|
||||
@@ -905,7 +905,7 @@ function qr_print_headers($data_tally,$nm,$gd){
|
||||
} else {
|
||||
$colcount = 1;
|
||||
}
|
||||
print("<th colspan=$colcount>Q-$qcount</th>");
|
||||
print("<th colspan=\"$colcount\">Q-$qcount</th>");
|
||||
}
|
||||
print("</tr>\n");
|
||||
}
|
||||
@@ -982,7 +982,7 @@ function qr_answer_lookup($qid,$thisanswer){
|
||||
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']++;
|
||||
|
||||
@@ -107,7 +107,7 @@ class quiz_report extends quiz_default_report {
|
||||
}
|
||||
|
||||
//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";
|
||||
@@ -123,8 +123,8 @@ class quiz_report extends quiz_default_report {
|
||||
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;
|
||||
@@ -145,7 +145,7 @@ class quiz_report extends quiz_default_report {
|
||||
} 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)";
|
||||
|
||||
+3
-2
@@ -66,7 +66,7 @@
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,7 @@
|
||||
}
|
||||
$strconfirmstartattempt = addslashes(get_string("confirmstartattempt","quiz"));
|
||||
echo "<br />";
|
||||
echo "</p>";
|
||||
echo "<div align=\"center\">";
|
||||
if ($quiz->timelimit) {
|
||||
include("view_js.php");
|
||||
@@ -168,7 +169,7 @@
|
||||
print_single_button("attempt.php", $options, get_string("attemptquiznow","quiz"));
|
||||
}
|
||||
echo "</div>\n";
|
||||
echo "</p>";
|
||||
//echo "</p>";
|
||||
}
|
||||
} else {
|
||||
print_heading(get_string("nomoreattempts", "quiz"));
|
||||
|
||||
Reference in New Issue
Block a user