I'm trying to get the unread posts of each enrolled course (Since last login) and found the unread posts in the forum inside that course (new and old unread posts )
I used the following functions:
1. to get the unread posts in course:
forum_tp_get_course_unread_posts($userid, $courseid);
2. to get the unread posts for forum in that course:
forum_tp_is_post_read($userid, $post);
but after the testing I found that they are not accurate
are there better functions for this target?
what about forum_tp_count_forum_unread_posts($cm, $course); ?
I couldn't use it because I don't know how I can get $cm object :'(
Waiting for your help
Best regards,