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
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.");
}
}
/// 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.");
}
}
I''ll check into it. The forum functions check the $CFG variable, and other rules.
mike
mike
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
mike
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!
Thanks!