mirror of
https://github.com/moodle/moodle.git
synced 2025-01-22 16:18:24 +01:00
106 lines
3.3 KiB
HTML
106 lines
3.3 KiB
HTML
<?
|
|
if ($usehtmleditor = can_use_richtext_editor()) {
|
|
$defaultformat = FORMAT_HTML;
|
|
$onsubmit = "onsubmit=\"copyrichtext(document.form.description);\"";
|
|
} else {
|
|
$defaultformat = FORMAT_MOODLE;
|
|
$onsubmit = "";
|
|
}
|
|
?>
|
|
|
|
<form name="form" method="post" <?=$onsubmit ?> action="<?=$ME ?>">
|
|
<table cellpadding=5>
|
|
<tr valign=top>
|
|
<td align=right><P><B><? print_string("assignmentname", "assignment") ?>:</B></P></TD>
|
|
<td>
|
|
<input type="text" name="name" size=60 value="<? p($form->name) ?>">
|
|
</td>
|
|
</tr>
|
|
<tr valign=top>
|
|
<td align=right><P><B><? print_string("description", "assignment") ?>:</B></P></TD>
|
|
<td>
|
|
<?
|
|
print_textarea($usehtmleditor, 20, 60, 595, 400, "description", $form->description);
|
|
|
|
if ($usehtmleditor) {
|
|
helpbutton("richtext", get_string("helprichtext"));
|
|
} else {
|
|
helpbutton("text", get_string("helptext"));
|
|
}
|
|
echo "<P>";
|
|
print_string("formattexttype");
|
|
echo ": ";
|
|
if (!$form->format) {
|
|
$form->format = $defaultformat;
|
|
}
|
|
choose_from_menu(format_text_menu(), "format", $form->format, "");
|
|
echo "</P>";
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr valign=top>
|
|
<td align=right><P><B><? print_string("assignmenttype", "assignment") ?>:</B></P></TD>
|
|
<td>
|
|
<input type="hidden" name=type value="<? p($form->type) ?>">
|
|
<? print_string("typeuploadsingle", "assignment") ?>
|
|
</td>
|
|
</tr>
|
|
<tr valign=top>
|
|
<td align=right><P><B><? print_string("maximumgrade") ?>:</B></P></TD>
|
|
<td>
|
|
<?
|
|
for ($i=100; $i>=0; $i--) {
|
|
$grades[$i] = $i;
|
|
}
|
|
choose_from_menu($grades, "grade", "$form->grade");
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr valign=top>
|
|
<td align=right><P><B><? print_string("maximumsize", "assignment") ?>:</B></P></TD>
|
|
<td>
|
|
<?
|
|
$filesize[10000] = "10kb";
|
|
$filesize[50000] = "50kb";
|
|
$filesize[100000] = "100kb";
|
|
$filesize[500000] = "500kb";
|
|
$filesize[1000000] = "1000Kb (1Mb)";
|
|
$filesize[2000000] = "2000Kb (2Mb)";
|
|
if (!$form->maxbytes) {
|
|
$form->maxbytes = 500000;
|
|
}
|
|
choose_from_menu($filesize, "maxbytes", "$form->maxbytes");
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr valign=top>
|
|
<td align=right><P><B><? print_string("duedate", "assignment") ?>:</B></td>
|
|
<td><?
|
|
print_date_selector("dueday", "duemonth", "dueyear", $form->timedue);
|
|
echo " - ";
|
|
print_time_selector("duehour", "dueminute", $form->timedue);
|
|
formerr($err["duedate"]);
|
|
?></td>
|
|
</tr>
|
|
</table>
|
|
<BR>
|
|
<CENTER>
|
|
<input type="hidden" name=course value="<? p($form->course) ?>">
|
|
<input type="hidden" name=coursemodule value="<? p($form->coursemodule) ?>">
|
|
<input type="hidden" name=section value="<? p($form->section) ?>">
|
|
<input type="hidden" name=module value="<? p($form->module) ?>">
|
|
<input type="hidden" name=modulename value="<? p($form->modulename) ?>">
|
|
<input type="hidden" name=instance value="<? p($form->instance) ?>">
|
|
<input type="hidden" name=mode value="<? p($form->mode) ?>">
|
|
<input type="submit" value="<? print_string("savechanges") ?>">
|
|
<input type="submit" name=cancel value="<? print_string("cancel") ?>">
|
|
</CENTER>
|
|
</FORM>
|
|
|
|
<?
|
|
if ($usehtmleditor) {
|
|
print_richedit_javascript("form", "description", "no");
|
|
}
|
|
?>
|
|
|