mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
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:
parent
757f30a20c
commit
30a9aff589
10 changed files with 111 additions and 28 deletions
|
@ -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'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue