Allow ordering of posts by last post date or last edited date

Issue #36 resolved
Manoj Solanki created an issue

Due to a recent change in Moodle as per:, the core forum library will not update the discussion updated time if a post is edited. This was part of an attempt to correct the display of discussions so it shows them ordered by the latest replies on the forum page.

Currently the news slider follows the logic to get the posts based on the discussion updated date. Now it won't show them if a post is merely edited and is outside of the original set of posts that is retrieved (i.e. they already appear on the slider).

Add a sort to the call to forum_get_discussions to order by p.modified, which will take into account when a post is created or updated. This will allow posts to show as updated even if a post is edited.

Also add a setting for this sort, to allow it to be on or off. This will allow posts to be retrieved based on this mechanism, or the current way, which would retrieve them based on when a new post is added. The latter being the way the current Moodle forum discussions page shows them.

Comments (2)

  1. Manoj Solanki reporter

    Missed off sort on all news retrieval. Added back sort of all news items once retrieved in the case of site and course news. Fix #36..

    → <<cset 20a326249716>>

  2. Log in to comment