Merge branch 'MDL-38597-master-int' of git://github.com/FMCorz/moodle
This commit is contained in:
@@ -42,6 +42,7 @@ $string['attachment'] = 'Attachment';
|
||||
$string['attachment_help'] = 'You can optionally attach one or more files to a forum post. If you attach an image, it will be displayed after the message.';
|
||||
$string['attachmentnopost'] = 'You cannot export attachments without a post id';
|
||||
$string['attachments'] = 'Attachments';
|
||||
$string['attachmentswordcount'] = 'Attachments and word count';
|
||||
$string['blockafter'] = 'Post threshold for blocking';
|
||||
$string['blockafter_help'] = 'This setting specifies the maximum number of posts which a user can post in the given time period. Users with the capability mod/forum:postwithoutthrottling are exempt from post limits.';
|
||||
$string['blockperiod'] = 'Time period for blocking';
|
||||
@@ -387,6 +388,7 @@ $string['subscribestart'] = 'Send me email copies of posts to this forum';
|
||||
$string['subscribestop'] = 'I don\'t want email copies of posts to this forum';
|
||||
$string['subscription'] = 'Subscription';
|
||||
$string['subscription_help'] = 'If you are subscribed to a forum it means you will receive email copies of forum posts. Usually you can choose whether you wish to be subscribed, though sometimes subscription is forced so that everyone receives email copies of forum posts.';
|
||||
$string['subscriptionandtracking'] = 'Subscription and tracking';
|
||||
$string['subscriptionmode'] = 'Subscription mode';
|
||||
$string['subscriptionmode_help'] = 'When a participant is subscribed to a forum it means they will receive email copies of forum posts.
|
||||
|
||||
|
||||
+25
-22
@@ -39,36 +39,23 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
|
||||
$mform->addElement('text', 'name', get_string('forumname', 'forum'), array('size'=>'64'));
|
||||
if (!empty($CFG->formatstringstriptags)) {
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
} else {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
|
||||
$forum_types = forum_get_forum_types();
|
||||
$this->add_intro_editor(true, get_string('forumintro', 'forum'));
|
||||
|
||||
asort($forum_types);
|
||||
$mform->addElement('select', 'type', get_string('forumtype', 'forum'), $forum_types);
|
||||
$forumtypes = forum_get_forumtypes();
|
||||
collatorlib::asort($forumtypes, collatorlib::SORT_STRING);
|
||||
$mform->addElement('select', 'type', get_string('forumtype', 'forum'), $forumtypes);
|
||||
$mform->addHelpButton('type', 'forumtype', 'forum');
|
||||
$mform->setDefault('type', 'general');
|
||||
|
||||
$this->add_intro_editor(true, get_string('forumintro', 'forum'));
|
||||
|
||||
$options = array();
|
||||
$options[FORUM_CHOOSESUBSCRIBE] = get_string('subscriptionoptional', 'forum');
|
||||
$options[FORUM_FORCESUBSCRIBE] = get_string('subscriptionforced', 'forum');
|
||||
$options[FORUM_INITIALSUBSCRIBE] = get_string('subscriptionauto', 'forum');
|
||||
$options[FORUM_DISALLOWSUBSCRIBE] = get_string('subscriptiondisabled','forum');
|
||||
$mform->addElement('select', 'forcesubscribe', get_string('subscriptionmode', 'forum'), $options);
|
||||
$mform->addHelpButton('forcesubscribe', 'subscriptionmode', 'forum');
|
||||
|
||||
$options = array();
|
||||
$options[FORUM_TRACKING_OPTIONAL] = get_string('trackingoptional', 'forum');
|
||||
$options[FORUM_TRACKING_OFF] = get_string('trackingoff', 'forum');
|
||||
$options[FORUM_TRACKING_ON] = get_string('trackingon', 'forum');
|
||||
$mform->addElement('select', 'trackingtype', get_string('trackingtype', 'forum'), $options);
|
||||
$mform->addHelpButton('trackingtype', 'trackingtype', 'forum');
|
||||
// Attachments and word count.
|
||||
$mform->addElement('header', 'attachmentswordcounthdr', get_string('attachmentswordcount', 'forum'));
|
||||
|
||||
$choices = get_max_upload_sizes($CFG->maxbytes, $COURSE->maxbytes);
|
||||
$choices[1] = get_string('uploadnotallowed');
|
||||
@@ -84,7 +71,24 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
$mform->addElement('selectyesno', 'displaywordcount', get_string('displaywordcount', 'forum'));
|
||||
$mform->addHelpButton('displaywordcount', 'displaywordcount', 'forum');
|
||||
$mform->setDefault('displaywordcount', 0);
|
||||
$mform->setAdvanced('displaywordcount');
|
||||
|
||||
// Subscription and tracking.
|
||||
$mform->addElement('header', 'subscriptionandtrackinghdr', get_string('subscriptionandtracking', 'forum'));
|
||||
|
||||
$options = array();
|
||||
$options[FORUM_CHOOSESUBSCRIBE] = get_string('subscriptionoptional', 'forum');
|
||||
$options[FORUM_FORCESUBSCRIBE] = get_string('subscriptionforced', 'forum');
|
||||
$options[FORUM_INITIALSUBSCRIBE] = get_string('subscriptionauto', 'forum');
|
||||
$options[FORUM_DISALLOWSUBSCRIBE] = get_string('subscriptiondisabled','forum');
|
||||
$mform->addElement('select', 'forcesubscribe', get_string('subscriptionmode', 'forum'), $options);
|
||||
$mform->addHelpButton('forcesubscribe', 'subscriptionmode', 'forum');
|
||||
|
||||
$options = array();
|
||||
$options[FORUM_TRACKING_OPTIONAL] = get_string('trackingoptional', 'forum');
|
||||
$options[FORUM_TRACKING_OFF] = get_string('trackingoff', 'forum');
|
||||
$options[FORUM_TRACKING_ON] = get_string('trackingon', 'forum');
|
||||
$mform->addElement('select', 'trackingtype', get_string('trackingtype', 'forum'), $options);
|
||||
$mform->addHelpButton('trackingtype', 'trackingtype', 'forum');
|
||||
|
||||
if ($CFG->enablerssfeeds && isset($CFG->forum_enablerssfeeds) && $CFG->forum_enablerssfeeds) {
|
||||
//-------------------------------------------------------------------------------
|
||||
@@ -136,7 +140,6 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
$mform->addHelpButton('blockafter', 'blockafter', 'forum');
|
||||
$mform->disabledIf('blockafter', 'blockperiod', 'eq', 0);
|
||||
|
||||
|
||||
$mform->addElement('text', 'warnafter', get_string('warnafter', 'forum'));
|
||||
$mform->setType('warnafter', PARAM_INT);
|
||||
$mform->setDefault('warnafter', '0');
|
||||
|
||||
Reference in New Issue
Block a user