Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-19020

Forum post 'Mail now' checkbox confusing

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 1.9.4, 2.4, 2.4.7, 2.6.4, 2.8.9, 3.0.2, 3.2.4, 3.3.2
    • Documentation, Forum
    • Any
    • MOODLE_19_STABLE, MOODLE_24_STABLE, MOODLE_26_STABLE, MOODLE_28_STABLE, MOODLE_30_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
    • MDL-19020-master
    • Hide
      1. Create a course with a forum in it
      2. Enrol five users in the course
      3. Subscribe all users to the forum
      4. Change the digest settings for user 2 to 'Digest complete' in user preferences
      5. Change the digest settings for user 3 to 'Digest complete' in per-forum preferences
      6. Change the digest settings for user 4 to 'Digest basic' in user preferences
      7. Change the digest settings for user 5 to 'Digest basic' in per-forum preferences
      8. Modify mod/forum/lib.php

        diff --git a/mod/forum/lib.php b/mod/forum/lib.php
        index 29f4f6d..5c83469 100644
        --- a/mod/forum/lib.php
        +++ b/mod/forum/lib.php
        @@ -902,6 +902,8 @@ function forum_cron() {
             $weekago = $timenow - (7 * 24 * 3600);
             $DB->delete_records_select('forum_queue', "timemodified < ?", array($weekago));
             mtrace ('Cleaned old digest records');
        +    $digesttime = $timenow - 1;
        +    $CFG->digestmailtimelast = $weekago - 1;
         
             if ($CFG->digestmailtimelast < $digesttime and $timenow > $digesttime) {
        

      9. Run cron:

        php admin/tool/task/cli/schedule_task.php --execute="\mod_forum\task\cron_task"
        

      10. Clear any emails etc. (this is just to start from a known state of nothing to send)
      11. Open the forum as editing teacher and post a new message. Do not select 'Mail now'
      12. Run cron:

        php admin/tool/task/cli/schedule_task.php --execute="\mod_forum\task\cron_task"
        

        1. Confirm that user 1 received a single mail
        2. Confirm that users 2, and 3 received a complete digest
        3. Confirm that users 4, and 5 received a basic digest
      13. Open the forum as editing teacher and post a new message. Ensure that you select 'Mail now'
      14. Run cron:

        php admin/tool/task/cli/schedule_task.php --execute="\mod_forum\task\cron_task"
        

        1. Confirm that all users received a single mail
        2. Confirm that the mails received by users 2, 3, 4, and 5 included a note to say that their digest preference was not respected
      Show
      Create a course with a forum in it Enrol five users in the course Subscribe all users to the forum Change the digest settings for user 2 to 'Digest complete' in user preferences Change the digest settings for user 3 to 'Digest complete' in per-forum preferences Change the digest settings for user 4 to 'Digest basic' in user preferences Change the digest settings for user 5 to 'Digest basic' in per-forum preferences Modify mod/forum/lib.php diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 29f4f6d..5c83469 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -902,6 +902,8 @@ function forum_cron() { $weekago = $timenow - (7 * 24 * 3600); $DB->delete_records_select('forum_queue', "timemodified < ?", array($weekago)); mtrace ('Cleaned old digest records'); + $digesttime = $timenow - 1; + $CFG->digestmailtimelast = $weekago - 1;   if ($CFG->digestmailtimelast < $digesttime and $timenow > $digesttime) { Run cron: php admin/tool/task/cli/schedule_task.php --execute="\mod_forum\task\cron_task" Clear any emails etc. (this is just to start from a known state of nothing to send) Open the forum as editing teacher and post a new message. Do not select 'Mail now' Run cron: php admin/tool/task/cli/schedule_task.php --execute="\mod_forum\task\cron_task" Confirm that user 1 received a single mail Confirm that users 2, and 3 received a complete digest Confirm that users 4, and 5 received a basic digest Open the forum as editing teacher and post a new message. Ensure that you select 'Mail now' Run cron: php admin/tool/task/cli/schedule_task.php --execute="\mod_forum\task\cron_task" Confirm that all users received a single mail Confirm that the mails received by users 2, 3, 4, and 5 included a note to say that their digest preference was not respected

      We have a good number of professors that are confused as to why "Mail now" doesn't send out any mail. They don't realise that mail is only sent to forum subscribers. I think the language string for this should be changed to something like "Mail now (only works for forum subscribers)".

      Also, it would be nice if the button could be removed if there were no forum subscribers.

      edit: The checkbox is no longer called "Mail now", the language string was corrected to say "Send forum post notifications with no editing-time delay" . Based on the comments the issue was changed to an improvement to allow teachers to send mail immediately ignoring digest preferences.

            Votes:
            19 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.