mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
Merge branch 'MDL-59460_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
95d8e61161
@ -106,6 +106,7 @@ $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['configsubscriptiontype'] = 'Default setting for subscription mode.';
|
||||
$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.';
|
||||
|
@ -6807,6 +6807,21 @@ function forum_get_view_actions() {
|
||||
return array('view discussion', 'search', 'forum', 'forums', 'subscribers', 'view forum');
|
||||
}
|
||||
|
||||
/**
|
||||
* List the options for forum subscription modes.
|
||||
* This is used by the settings page and by the mod_form page.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function forum_get_subscriptionmode_options() {
|
||||
$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');
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* List the actions that correspond to a post of this module.
|
||||
* This is used by the participation report.
|
||||
|
@ -90,13 +90,15 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
// 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');
|
||||
$options = forum_get_subscriptionmode_options();
|
||||
$mform->addElement('select', 'forcesubscribe', get_string('subscriptionmode', 'forum'), $options);
|
||||
$mform->addHelpButton('forcesubscribe', 'subscriptionmode', 'forum');
|
||||
if (isset($CFG->forum_subscription)) {
|
||||
$defaultforumsubscription = $CFG->forum_subscription;
|
||||
} else {
|
||||
$defaultforumsubscription = FORUM_CHOOSESUBSCRIBE;
|
||||
}
|
||||
$mform->setDefault('forcesubscribe', $defaultforumsubscription);
|
||||
|
||||
$options = array();
|
||||
$options[FORUM_TRACKING_OPTIONAL] = get_string('trackingoptional', 'forum');
|
||||
|
@ -54,6 +54,11 @@ if ($ADMIN->fulltree) {
|
||||
$settings->add(new admin_setting_configtext('forum_maxattachments', get_string('maxattachments', 'forum'),
|
||||
get_string('configmaxattachments', 'forum'), 9, PARAM_INT));
|
||||
|
||||
// Default Subscription mode setting.
|
||||
$options = forum_get_subscriptionmode_options();
|
||||
$settings->add(new admin_setting_configselect('forum_subscription', get_string('subscriptionmode', 'forum'),
|
||||
get_string('configsubscriptiontype', 'forum'), FORUM_CHOOSESUBSCRIBE, $options));
|
||||
|
||||
// Default Read Tracking setting.
|
||||
$options = array();
|
||||
$options[FORUM_TRACKING_OPTIONAL] = get_string('trackingoptional', 'forum');
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2017071400.00; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
$version = 2017071400.01; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user