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

Make "Mark as read on notification" a user preference

XMLWordPrintable

    • MOODLE_22_STABLE, MOODLE_29_STABLE
    • MOODLE_32_STABLE
    • MDL-37669-master
    • Hide
      Pre-requisites:
      1. Forum tracking enabled at the site level (default)
      2. Vaguely valid SMTP configuration (e.g. mailcatcher)
      3. Two browsers with different users logged in
      4. Before you upgrade, ensure that forum read tracking is enabled for user A
      Test
      1. Create a new optionally subscribed forum
      2. As user A:
        1. subscribe to the forum
        2. Navigate to User menu => Preferences => Forum preferences
        3. Confirm that Forum read tracking is still enabled
        4. Confirm that the default setting is to mark posts as read on send (no change in behaviour)
      3. As user B, post in the forum
      4. As user A:
        1. View the forum - Confirm that the post is marked unread
      5. Run cron / mod_forum task
      6. As user A:
        1. View the forum - Confirm that the post is now marked read
        2. Modify user preference to not mark posts as read on notification send
      7. As user B, post in the forum
      8. As user A:
        1. View the forum - Confirm that the post is marked unread
      9. Run cron / mod_forum task
      10. As user A:
        1. View the forum - Confirm that the post is still marked unread
      11. Modify forum daily digest setting and repeat test. To help you you may wish to 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) {
        

      Show
      Pre-requisites: Forum tracking enabled at the site level (default) Vaguely valid SMTP configuration (e.g. mailcatcher) Two browsers with different users logged in Before you upgrade, ensure that forum read tracking is enabled for user A Test Create a new optionally subscribed forum As user A: subscribe to the forum Navigate to User menu => Preferences => Forum preferences Confirm that Forum read tracking is still enabled Confirm that the default setting is to mark posts as read on send (no change in behaviour) As user B, post in the forum As user A: View the forum - Confirm that the post is marked unread Run cron / mod_forum task As user A: View the forum - Confirm that the post is now marked read Modify user preference to not mark posts as read on notification send As user B, post in the forum As user A: View the forum - Confirm that the post is marked unread Run cron / mod_forum task As user A: View the forum - Confirm that the post is still marked unread Modify forum daily digest setting and repeat test. To help you you may wish to 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) {

      If a user turns on both forum tracking and subscription on a forum, with subscriptions set to forward all posts to email, forum posts are marked as "read" once an email is sent. This behavior is mentioned here:

      https://moodle.org/mod/forum/discuss.php?d=118172

      This is confusing to users. There is no indication in the settings that enabling "No digest" on a subscription will disable forum tracking. Furthermore, I don't think the assumption that the user will not want to do both is warranted.

            dobedobedoh Andrew Lyons
            emdalton1 Elizabeth Dalton
            cameron1729 cameron1729
            David Monllaó David Monllaó
            John Okely John Okely
            Votes:
            13 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

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