moodle/mod/forum/post.html
moodler 4909e17632 These changes implement some better controls for controlling uploads.
1) There is a new site-wide configuration variable called maxbytes,
   which provides an upper filesize limit for all (student) uploads.

2) There is a new course-level variable called maxbytes, which further
   limits uploads within a course.

3) There is a new maxbytes field for forums, which further restricts
   the size allowed in a particular forum.  There is also a new config
   variable in the module configuration to specify a default size
   to use when defining a new forum.

4) Assignments already had a limit, but this is now aware of the other
   limits, and like forums there is now a settable default value.

5) Finally, the sizes of files (Gb, Mb, Kb, bytes) is now translatable
   in the language packs.
2003-10-06 18:02:35 +00:00

122 lines
3.8 KiB
HTML

<form name="theform" method="post" action="post.php" <?php echo $onsubmit ?> enctype="multipart/form-data">
<table border="0" cellpadding="5">
<tr valign="top">
<td align=right><p><b><?php print_string("subject", "forum"); ?>:</b></p></td>
<td>
<input type="text" name="subject" size=60 value="<?php p($post->subject) ?>">
</td>
</tr>
<tr valign="top">
<td align=right><p><b>
<?php print_string("message", "forum"); ?>:
</b></p></td>
<td align=left rowspan=2>
<?php print_textarea($usehtmleditor, 15, 50, 630, 400, "message", $post->message); ?>
</td>
</tr>
<tr valign="top">
<td align="right" valign="center" nowrap>
<font SIZE="1">
<?php
helpbutton("reading", get_string("helpreading"), "moodle", true, true);
echo "<br />";
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br />";
helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
echo "<br />";
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
} else {
emoticonhelpbutton("theform", "message");
}
?>
<br />
</font>
</td>
</tr>
<tr valign=top>
<td align=right><p><b><?php print_string("formattexttype"); ?>:</b></p></td>
<td>
<?php
choose_from_menu(format_text_menu(), "format", $post->format, "");
?>
<font SIZE="1">
<?php
helpbutton("textformat", get_string("helpformatting"));
?>
</font>
</td>
</tr>
<tr valign=top>
<td align=right><p><b><?php print_string("subscription", "forum") ?>:</b></p></td>
<td>
<?php
if ($forum->forcesubscribe) {
print_string("everyoneissubscribed", "forum");
} else {
unset($options);
if (forum_is_subscribed($USER->id, $post->forum)) {
$options[0] = get_string("subscribestart", "forum");
$options[1] = get_string("subscribestop", "forum");
choose_from_menu($options, "unsubscribe", 0, "");
} else {
$default = 0;
if (!empty($USER->autosubscribe)) {
$default = 1;
}
$options[0] = get_string("subscribestop", "forum");
$options[1] = get_string("subscribestart", "forum");
choose_from_menu($options, "subscribe", $default, "");
}
}
helpbutton("subscription", get_string("subscription", "forum"), "forum");
?>
</td>
</tr>
<tr valign=top>
<td align=right><p><b><?php print_string("attachment", "forum") ?>:<br \>(<?php print_string("optional") ?>)&nbsp;</b></p></td>
<td>
<?php $maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes, $forum->maxbytes); ?>
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $maxbytes ?>">
<input type="file" name="attachment" size=40>
<?php
helpbutton("attachment", get_string("attachment", "forum"), "forum");
print_string("maxsize", "", display_size($maxbytes));
?>
</td>
</tr>
<tr>
<td align=center colspan=2>
<input type="hidden" name=course value="<?php p($post->course) ?>">
<input type="hidden" name=forum value="<?php p($post->forum) ?>">
<input type="hidden" name=discussion value="<?php p($post->discussion) ?>">
<input type="hidden" name=parent value="<?php p($post->parent) ?>">
<input type="hidden" name=userid value="<?php p($post->userid) ?>">
<input type="hidden" name=edit value="<?php p($post->edit) ?>">
<input type="submit" value="<?php print_string("savechanges"); ?>">
</td>
</tr>
</table>
</form>
<?php
if ($usehtmleditor) {
print_richedit_javascript("theform", "message", "no");
}
?>