Emailed Subscriptions and Read Tracking

Emailed Subscriptions and Read Tracking

by Mike Churchward -
Number of replies: 4
Picture of Core developers Picture of Plugin developers Picture of Testers
Martin -

Did you change the way read tracking works with subscriptions? I'm noticing that posts aren't getting marked 'read' after they are emailed.

mike
Average of ratings: -
In reply to Mike Churchward

Re: Emailed Subscriptions and Read Tracking

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
No, not me.  The code looks OK in forum_cron at a glance, except it probably shouldn't be running at all if $CFG->forum_trackposts is off.  but you're right, they aren't being marked read ..

                    /// Mark post as read if forum_usermarksread is set off
                        if (!$CFG->forum_usermarksread && forum_tp_can_track_forums($forum, $userto) &&
                            forum_tp_is_tracked($forum, $userto->id)) {
                            if (!forum_tp_mark_post_read($userto->id, $post, $forum->id)) {
                                mtrace("Error: mod/forum/cron.php: Could not mark post $post->id read for user $userto->id".
                                     " while sending email.");
                            }
                        }



In reply to Martin Dougiamas

Re: Emailed Subscriptions and Read Tracking

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
I''ll check into it. The forum functions check the $CFG variable, and other rules.

mike
In reply to Mike Churchward

Re: Emailed Subscriptions and Read Tracking

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Fixed in CVS. The new 'trackforums' field wasn't being loaded into the $users objects in the cron task. That field was needed to check whether the post should be marked read or not.

mike
In reply to Mike Churchward

Re: Emailed Subscriptions and Read Tracking

by Sean McKay -
Mike, I know I'm reopening a very old discussion, but I need some clarification. After your fix, does cron mark messages as read when it emails them out?

Thanks!