moodle/mod/quiz/multichoice.html
2004-01-25 20:34:54 +00:00

102 lines
3.3 KiB
HTML

<FORM name="theform" method="post" <?php echo $onsubmit ?> action="question.php">
<CENTER>
<TABLE cellpadding=5>
<TR valign=top>
<TD align=right><P><B><?php print_string("category", "quiz") ?>:</B></P></TD>
<TD>
<?php choose_from_menu($categories, "category", "$question->category", ""); ?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php print_string("questionname", "quiz") ?>:</B></P></TD>
<TD>
<INPUT type="text" name="name" size=40 value="<?php p($question->name) ?>">
<?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>
<TD>
<?php if (isset($err["questiontext"])) {
formerr($err["questiontext"]);
echo "<BR />";
}
print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext);
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle");
} else {
helpbutton("text", get_string("helptext"), "moodle");
}
?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php print_string("imagedisplay", "quiz") ?>:</B></P></TD>
<TD>
<?php if (empty($images)) {
print_string("noimagesyet");
} else {
choose_from_menu($images, "image", "$question->image", get_string("none"),"","");
}
?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php print_string("answerhowmany", "quiz") ?>:</B></P></TD>
<TD>
<?php
$menu[0] = get_string("answersingleno", "quiz");
$menu[1] = get_string("answersingleyes", "quiz");
choose_from_menu($menu, "single", "$options->single", "");
unset($menu);
?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php print_string("choices", "quiz") ?></B>:</P></TD>
<TD><P><?php print_string("fillouttwochoices", "quiz") ?></P>
</TD>
</TR>
<?PHP
for ($i=1; $i<=QUIZ_MAX_NUMBER_ANSWERS; $i++) {
?>
<TR valign=top>
<TD align=right><P><B><?php echo get_string("choice", "quiz")." $i"; ?>:</B></P></TD>
<TD>
<INPUT type="text" name="answer[]" size=50 maxlength=255 value="<?php p($answers[$i-1]->answer) ?>">&nbsp;&nbsp;
<?php print_string("grade");
echo ":&nbsp;";
choose_from_menu($gradeoptionsfull, "fraction[]", $answers[$i-1]->fraction, ""); ?>
<BR>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php print_string("feedback", "quiz") ?>:</B></P></TD>
<TD>
<textarea name="feedback[]" rows=2 cols=50 wrap="virtual"><?php p($answers[$i-1]->feedback) ?></textarea>
</TD>
</TR>
<TR valign=top>
<TD colspan=2>&nbsp;</TD>
</TR>
<?php
} /// End of loop, printing answers
?>
</TABLE>
<INPUT type="hidden" name=id value="<?php p($question->id) ?>">
<INPUT type="hidden" name=qtype value="<?php p($question->qtype) ?>">
<INPUT type="submit" value="<?php print_string("savechanges") ?>">
</CENTER>
</FORM>
<?php
if ($usehtmleditor) {
print_richedit_javascript("theform", "questiontext", "no");
}
?>