mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00

of questions. These use 2 or more short answer questions at random to construct a questions where you have to match answers to questions. Only lightly tested so far. Quiz questions can now be edited with Richtext editor. Sundry little fixes along the way.
78 lines
2.7 KiB
HTML
78 lines
2.7 KiB
HTML
<FORM name="theform" method="post" <?=$onsubmit ?> action="question.php">
|
|
<CENTER>
|
|
<TABLE cellpadding=5>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("category", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<? choose_from_menu($categories, "category", "$question->category", ""); ?>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("questionname", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<INPUT type="text" name="name" size=50 value="<? p($question->name) ?>">
|
|
<? if (isset($err["name"])) formerr($err["name"]); ?>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("question", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<? if (isset($err["questiontext"])) {
|
|
formerr($err["questiontext"]);
|
|
echo "<BR \>";
|
|
}
|
|
print_textarea($usehtmleditor, 15, 60, 595, 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><? print_string("imagedisplay", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<? 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><? print_string("correctanswer", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<? $menu[0] = get_string("false", "quiz");
|
|
$menu[1] = get_string("true", "quiz");
|
|
choose_from_menu($menu, "answer", "$question->answer", ""); ?>
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("feedback", "quiz") ?> (<? print_string("true", "quiz") ?>):</B></P></TD>
|
|
<TD>
|
|
<textarea name="feedbacktrue" rows=2 cols=50 wrap="virtual"><? p($true->feedback) ?></textarea>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("feedback", "quiz") ?> (<? print_string("false", "quiz") ?>):</B></P></TD>
|
|
<TD>
|
|
<textarea name="feedbackfalse" rows=2 cols=50 wrap="virtual"><? p($false->feedback) ?></textarea>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<INPUT type="hidden" name=id value="<? p($question->id) ?>">
|
|
<INPUT type="hidden" name=qtype value="<? p($question->qtype) ?>">
|
|
<INPUT type="submit" value="<? print_string("savechanges") ?>">
|
|
|
|
</CENTER>
|
|
</FORM>
|
|
<?
|
|
if ($usehtmleditor) {
|
|
print_richedit_javascript("theform", "questiontext", "no");
|
|
}
|
|
?>
|