forum_read not showing posts after tracking status change

forum_read not showing posts after tracking status change

by Joanna Beaver -
Number of replies: 1
Picture of Plugin developers

Hello,

I have a forum and I have changed tracking to be Forced tracking after some people have already posted.

If I click on these old posts to read them, they do not make an entry in the forum_read table. Any new posts added to the forum (now the status is Forced tracking) DO appear in the forum_read table.

I cannot see anywhere in forum_discussions or forum_posts where tracking is set at discussion or post level, so I cannot change it in DB. 

I need the new status to apply to these old posts (because I interrogate forum_read to see if the post has been read).

Does anyone know how / where I can make the old posts pick up the new status?

Using Moodle 3.9.

Best wishes

Jo

Average of ratings: -
In reply to Joanna Beaver

Re: forum_read not showing posts after tracking status change

by Joanna Beaver -
Picture of Plugin developers
Hello,
bumping this. Does anyone have any insight?

For context, I have some code that is displaying unread forum posts to users. It cross-checks forum_post against forum_read. Once read, they are no longer presented to user. All of this is working fine since I forced tracking on the forum, except for any old posts that were posted on that forum previously. These are not being marked as read in the forum_read table even if I access / read them now with the new setting. I cannot find in the DB where these posts are marked (or not marked) as tracked. If I knew that I could potentially update them in DB to now be tracked (if my force tracking is not being applied retrospectively).

I do not understand what is stopping those posts from being marked as read if there is no tracking being stored against discussion or post, since the forum containing the discussions is now set to be tracked.

Hope that makes sense. Any help is welcome!

Best wishes

Jo