-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
1.8.3, 2.4.2, 3.6.4, 3.7
-
MOODLE_18_STABLE, MOODLE_24_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
-
MDL-12537-master
Forum posts get published to RSS feed before editing time elapses. This is different to how the emails work and can cause cache issues
When you put a post into a Moodle forum it leaves $CFG->maxeditingtime before it sends out the email.
It doesn't do this when it creates the rss feed, which can cause issues with, for example, google rss reader. If you go to the RSS reader, then edit the post, the go to the reader again sometimes it caches olds posts. I assumed that the reason you didn't send out the email until the editing time had elapsed was so that you go the final post rather than on which may be edited.
I have put this same methodology into place in the forum rss feed creation as follows.
When it gets all the posts from the forum I've added in the sql
AND ($time - p.created) > $CFG->maxeditingtime
|
this means that only posts which have passed their allotted editing time get published.
I've also changed the modified check from ($newsince is the timestamp the rss file was create last)
AND p.modified > '$newsince'
|
to
AND ($time > (p.created + $CFG->maxeditingtime) AND $newsince < (p.created + $CFG->maxeditingtime))
|
Basically I make sure that the max editing time has passed and that the max editing time is after the last time the rss feed was created.
I have attached the /mod/forum/rsslib.php changes. Please look over them and commit if you feel they are correct.
Regards,
James Brisland