moodle/mod/journal/mod.html
2003-04-09 13:41:11 +00:00

65 lines
2.1 KiB
HTML

<?PHP
if (!isset($form->name)) {
$form->name = "";
}
if (!isset($form->intro)) {
$form->intro = "";
}
if (!isset($form->days)) {
$form->days = "14";
}
?>
<form name="form" method="post" action="<?=$ME ?>">
<table cellpadding=5>
<tr valign=top>
<td align=right><P><B><? print_string("journalname", "journal") ?>:</B></P></TD>
<td>
<input type="text" name="name" size=30 value="<? p($form->name) ?>">
</td>
</tr>
<tr valign=top>
<td align=right><P><B><? print_string("journalquestion", "journal") ?>:</B></P>
<font SIZE="1">
<? helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br \>
<? helpbutton("questions", get_string("helpquestions"), "moodle", true, true) ?><br \>
</font>
</TD>
<td>
<textarea name="intro" rows=15 cols=30 wrap="virtual"><? p($form->intro) ?></textarea>
</td>
</tr>
<tr valign=top>
<TD align=right><P><B><? print_string("daysavailable", "journal") ?>:</B></P></TD>
<TD>
<?
$options = array();
$options[0] = get_string("alwaysopen", "journal");
for ($i=1;$i<=13;$i++) {
$options[$i] = get_string("numdays", "", $i);
}
for ($i=2;$i<=16;$i++) {
$days = $i * 7;
$options[$days] = get_string("numweeks", "", $i);
}
$options[365] = get_string("numweeks", "", 52);
choose_from_menu($options, "days", "$form->days");
?>
</TD>
</tr>
</table>
<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") ?>">
</FORM>
</CENTER>