mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
Merge branch 'MDL-49069' of git://github.com/rlorenzo/moodle
This commit is contained in:
commit
ac28aad351
@ -101,6 +101,8 @@ $string['configmaxattachments'] = 'Default maximum number of attachments allowed
|
||||
$string['configmaxbytes'] = 'Default maximum size for all forum attachments on the site (subject to course limits and other local settings)';
|
||||
$string['configoldpostdays'] = 'Number of days old any post is considered read.';
|
||||
$string['configreplytouser'] = 'When a forum post is mailed out, should it contain the user\'s email address so that recipients can reply personally rather than via the forum? Even if set to \'Yes\' users can choose in their profile to keep their email address secret.';
|
||||
$string['configrsstypedefault'] = 'If RSS feeds are enabled, sets the default activity type.';
|
||||
$string['configrssarticlesdefault'] = 'If RSS feeds are enabled, sets the default number of articles (either discussions or posts).';
|
||||
$string['configshortpost'] = 'Any post under this length (in characters not including HTML) is considered short (see below).';
|
||||
$string['configtrackingtype'] = 'Default setting for read tracking.';
|
||||
$string['configtrackreadposts'] = 'Set to \'yes\' if you want to track read/unread for each user.';
|
||||
@ -424,6 +426,7 @@ $string['rssarticles'] = 'Number of RSS recent articles';
|
||||
$string['rssarticles_help'] = 'This setting specifies the number of articles (either discussions or posts) to include in the RSS feed. Between 5 and 20 generally acceptable.';
|
||||
$string['rsstype'] = 'RSS feed for this activity';
|
||||
$string['rsstype_help'] = 'To enable the RSS feed for this activity, select either discussions or posts to be included in the feed.';
|
||||
$string['rsstypedefault'] = 'RSS feed type';
|
||||
$string['search'] = 'Search';
|
||||
$string['searchdatefrom'] = 'Posts must be newer than this';
|
||||
$string['searchdateto'] = 'Posts must be older than this';
|
||||
|
@ -121,6 +121,9 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
$choices[2] = get_string('posts', 'forum');
|
||||
$mform->addElement('select', 'rsstype', get_string('rsstype'), $choices);
|
||||
$mform->addHelpButton('rsstype', 'rsstype', 'forum');
|
||||
if (isset($CFG->forum_rsstype)) {
|
||||
$mform->setDefault('rsstype', $CFG->forum_rsstype);
|
||||
}
|
||||
|
||||
$choices = array();
|
||||
$choices[0] = '0';
|
||||
@ -139,6 +142,9 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
$mform->addElement('select', 'rssarticles', get_string('rssarticles'), $choices);
|
||||
$mform->addHelpButton('rssarticles', 'rssarticles', 'forum');
|
||||
$mform->disabledIf('rssarticles', 'rsstype', 'eq', '0');
|
||||
if (isset($CFG->forum_rssarticles)) {
|
||||
$mform->setDefault('rssarticles', $CFG->forum_rssarticles);
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
|
@ -104,6 +104,34 @@ if ($ADMIN->fulltree) {
|
||||
$settings->add(new admin_setting_configselect('forum_enablerssfeeds', get_string('enablerssfeeds', 'admin'),
|
||||
$str, 0, $options));
|
||||
|
||||
if (!empty($CFG->enablerssfeeds)) {
|
||||
$options = array(
|
||||
0 => get_string('none'),
|
||||
1 => get_string('discussions', 'forum'),
|
||||
2 => get_string('posts', 'forum')
|
||||
);
|
||||
$settings->add(new admin_setting_configselect('forum_rsstype', get_string('rsstypedefault', 'forum'),
|
||||
get_string('configrsstypedefault', 'forum'), 0, $options));
|
||||
|
||||
$options = array(
|
||||
0 => '0',
|
||||
1 => '1',
|
||||
2 => '2',
|
||||
3 => '3',
|
||||
4 => '4',
|
||||
5 => '5',
|
||||
10 => '10',
|
||||
15 => '15',
|
||||
20 => '20',
|
||||
25 => '25',
|
||||
30 => '30',
|
||||
40 => '40',
|
||||
50 => '50'
|
||||
);
|
||||
$settings->add(new admin_setting_configselect('forum_rssarticles', get_string('rssarticles', 'forum'),
|
||||
get_string('configrssarticlesdefault', 'forum'), 0, $options));
|
||||
}
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('forum_enabletimedposts', get_string('timedposts', 'forum'),
|
||||
get_string('configenabletimedposts', 'forum'), 0));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user