moodle/mod/assignment/mod.html
moodler b7b4287462 Added new type of assignment - offline.
This type of assignment doesn't require anything of the student online,
it just tells them about an assignment and the teacher can provide
feedback and grades.  Useful for offline activities, and also for the
teacher to add manual columns to the grades page
2002-11-06 08:12:06 +00:00

111 lines
3.6 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 align=right>";
print_string("formattexttype");
echo ":&nbsp;";
if (!$form->format) {
$form->format = $defaultformat;
}
choose_from_menu(format_text_menu(), "format", $form->format, "");
helpbutton("textformat", get_string("formattexttype"));
echo "</P>";
?>
</td>
</tr>
<tr valign=top>
<td align=right><P><B><? print_string("assignmenttype", "assignment") ?>:</B></P></TD>
<td>
<?PHP
require("$CFG->dirroot/mod/assignment/lib.php");
asort($ASSIGNMENT_TYPE);
choose_from_menu($ASSIGNMENT_TYPE, "type", $form->type, "");
helpbutton("assignmenttype", get_string("assignmenttype", "assignment"), "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 "&nbsp;-&nbsp;";
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");
}
?>