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

@ -23,6 +23,10 @@ $settings->add(new admin_setting_configtext('forum_manydiscussions', get_string(
$settings->add(new admin_setting_configselect('forum_maxbytes', get_string('maxattachmentsize', 'forum'),
get_string('configmaxbytes', 'forum'), 512000, get_max_upload_sizes($CFG->maxbytes)));
// Default number of attachments allowed per post in all forums
$settings->add(new admin_setting_configtext('forum_maxattachments', get_string('maxattachments', 'forum'),
get_string('configmaxattachments', 'forum'), 1, PARAM_INT));
// Default whether user needs to mark a post as read
$settings->add(new admin_setting_configcheckbox('forum_trackreadposts', get_string('trackforum', 'forum'),
get_string('configtrackreadposts', 'forum'), 1));