MDL-14722 Added new maxattachments setting at admin and forum level to

set the maximum number of attachments for forum posts.   Default: 1.

Works, but still needs a bit of polishing to deal with re-editing posts (to stop people going above maxattachments)

Also fixed documentation for attachments.
This commit is contained in:
moodler 2008-09-08 05:46:42 +00:00
parent 757f30a20c
commit 30a9aff589
10 changed files with 111 additions and 28 deletions

View file

@ -54,6 +54,11 @@ class mod_forum_mod_form extends moodleform_mod {
$mform->setHelpButton('maxbytes', array('maxattachmentsize', get_string('maxattachmentsize', 'forum'), 'forum'));
$mform->setDefault('maxbytes', $CFG->forum_maxbytes);
$choices = array(0,1,2,3,4,5,6,7,8,9);
$mform->addElement('select', 'maxattachments', get_string('maxattachments', 'forum'), $choices);
$mform->setHelpButton('maxattachments', array('maxattachments', get_string('maxattachments', 'forum'), 'forum'));
$mform->setDefault('maxattachments', $CFG->forum_maxattachments);
if ($CFG->enablerssfeeds && isset($CFG->forum_enablerssfeeds) && $CFG->forum_enablerssfeeds) {
//-------------------------------------------------------------------------------
$mform->addElement('header', '', get_string('rss'));