mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
MDL-13306 option to skip logging of blocked emails in forum cron; merged from MOODLE_19_STABLE
This commit is contained in:
parent
5170a7a440
commit
f4528bdcfe
@ -26,6 +26,7 @@ $string['configcleanreadtime'] = 'The hour of the day to clean old posts from th
|
||||
$string['configdisplaymode'] = 'The default display mode for discussions if one isn\'t set.';
|
||||
$string['configenablerssfeeds'] = 'This switch will enable the possibility of RSS feeds for all forums. You will still need to turn feeds on manually in the settings for each forum.';
|
||||
$string['configenabletimedposts'] = 'Set to \'yes\' if you want to allow setting of display periods when posting a new forum discussion (Experimental as not yet fully tested)';
|
||||
$string['configlogblocked'] = 'Forum cron may log blocked attemts to send emails to users with disabled email.';
|
||||
$string['configlongpost'] = 'Any post over this length (in characters not including HTML) is considered long. Posts displayed on the site front page, social format course pages, or user profiles are shortened to a natural break somewhere between the forum_shortpost and forum_longpost values.';
|
||||
$string['configmanydiscussions'] = 'Maximum number of discussions shown in a forum per page';
|
||||
$string['configmaxbytes'] = 'Default maximum size for all forum attachments on the site (subject to course limits and other local settings)';
|
||||
@ -115,6 +116,7 @@ $string['introsocial'] = 'An open forum for chatting about anything you want to'
|
||||
$string['introteacher'] = 'A forum for teacher-only notes and discussion';
|
||||
$string['lastpost'] = 'Last post';
|
||||
$string['learningforums'] = 'Learning forums';
|
||||
$string['logblocked'] = 'Log blocked emails';
|
||||
$string['longpost'] = 'Long post';
|
||||
$string['mailnow'] = 'Mail now';
|
||||
$string['manydiscussions'] = 'Discussions per page';
|
||||
|
@ -292,7 +292,9 @@ function forum_cron() {
|
||||
foreach ($subusers as $postuser) {
|
||||
// do not try to mail users with stopped email
|
||||
if ($postuser->emailstop) {
|
||||
add_to_log(SITEID, 'forum', 'mail blocked', '', '', 0, $postuser->id);
|
||||
if (!empty($CFG->forum_logblocked)) {
|
||||
add_to_log(SITEID, 'forum', 'mail blocked', '', '', 0, $postuser->id);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// this user is subscribed to this forum
|
||||
@ -500,7 +502,9 @@ function forum_cron() {
|
||||
}
|
||||
$postuser = $users[$digestpost->userid];
|
||||
if ($postuser->emailstop) {
|
||||
add_to_log(SITEID, 'forum', 'mail blocked', '', '', 0, $postuser->id);
|
||||
if (!empty($CFG->forum_logblocked)) {
|
||||
add_to_log(SITEID, 'forum', 'mail blocked', '', '', 0, $postuser->id);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -60,4 +60,7 @@ $settings->add(new admin_setting_configselect('forum_enablerssfeeds', get_string
|
||||
$settings->add(new admin_setting_configcheckbox('forum_enabletimedposts', get_string('timedposts', 'forum'),
|
||||
get_string('configenabletimedposts', 'forum'), 0));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('forum_logblocked', get_string('logblocked', 'forum'),
|
||||
get_string('configlogblocked', 'forum'), 1));
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user