mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
176 lines
5.6 KiB
HTML
176 lines
5.6 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, 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><? 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("casesensitive", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<?
|
|
unset($menu);
|
|
$menu[0] = get_string("caseno", "quiz");
|
|
$menu[1] = get_string("caseyes", "quiz");
|
|
choose_from_menu($menu, "usecase", "$options->usecase", "");
|
|
?>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("correctanswers", "quiz") ?></B>:</P></TD>
|
|
<TD>
|
|
<P><? print_string("filloutoneanswer", "quiz") ?></P>
|
|
</TD>
|
|
|
|
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("answer", "quiz") ?> 1:</B></P></TD>
|
|
<TD>
|
|
<INPUT type="text" name="answer[]" size=50 value="<? p($answers[0]->answer) ?>">
|
|
<? print_string("grade");
|
|
echo ": ";
|
|
choose_from_menu($gradeoptions, "fraction[]", $answers[0]->fraction,""); ?>
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("feedback", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<textarea name="feedback[]" rows=2 cols=50 wrap="virtual"><? p($answers[0]->feedback) ?></textarea>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR valign=top>
|
|
<TD colspan=2> </TD>
|
|
</TR>
|
|
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("answer", "quiz") ?> 2:</B></P></TD>
|
|
<TD>
|
|
<INPUT type="text" name="answer[]" size=50 value="<? p($answers[1]->answer) ?>">
|
|
<? print_string("grade");
|
|
echo ": ";
|
|
choose_from_menu($gradeoptions, "fraction[]", $answers[1]->fraction,""); ?>
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("feedback", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<textarea name="feedback[]" rows=2 cols=50 wrap="virtual"><? p($answers[1]->feedback) ?></textarea>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR valign=top>
|
|
<TD colspan=2> </TD>
|
|
</TR>
|
|
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("answer", "quiz") ?> 3:</B></P></TD>
|
|
<TD>
|
|
<INPUT type="text" name="answer[]" size=50 value="<? p($answers[2]->answer) ?>">
|
|
<? print_string("grade");
|
|
echo ": ";
|
|
choose_from_menu($gradeoptions, "fraction[]", $answers[2]->fraction,""); ?>
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("feedback", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<textarea name="feedback[]" rows=2 cols=50 wrap="virtual"><? p($answers[2]->feedback) ?></textarea>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR valign=top>
|
|
<TD colspan=2> </TD>
|
|
</TR>
|
|
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("answer", "quiz") ?> 4:</B></P></TD>
|
|
<TD>
|
|
<INPUT type="text" name="answer[]" size=50 value="<? p($answers[3]->answer) ?>">
|
|
<? print_string("grade");
|
|
echo ": ";
|
|
choose_from_menu($gradeoptions, "fraction[]", $answers[3]->fraction,""); ?>
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("feedback", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<textarea name="feedback[]" rows=2 cols=50 wrap="virtual"><? p($answers[3]->feedback) ?></textarea>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR valign=top>
|
|
<TD colspan=2> </TD>
|
|
</TR>
|
|
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("answer", "quiz") ?> 5:</B></P></TD>
|
|
<TD>
|
|
<INPUT type="text" name="answer[]" size=50 value="<? p($answers[4]->answer) ?>">
|
|
<? print_string("grade");
|
|
echo ": ";
|
|
choose_from_menu($gradeoptions, "fraction[]", $answers[4]->fraction,""); ?>
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR valign=top>
|
|
<TD align=right><P><B><? print_string("feedback", "quiz") ?>:</B></P></TD>
|
|
<TD>
|
|
<textarea name="feedback[]" rows=2 cols=50 wrap="virtual"><? p($answers[4]->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");
|
|
}
|
|
?>
|