mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
1e36665719
Users that don't have permission to view timed posts outside of the release time frame will have discussions that have entered the visible frame appear in an odd order from their point of view on the discussion list. Example: Discussion 1, modified 2015-01-01, hidden till 2015-01-03 Discussion 2, modified 2015-01-02, not hidden The standard 'modified descending' order means that D2 is listed at the top even after D1 becomes visible. When scanning the list of discussions for new posts, the user could be tricked into thinking they'd already read it. This fix instead takes into account the release time of the discussion when timed forum posts are enabled. I opted to use CASE statements to handle this instead of GREATEST as the latter is not supported by MSSQL.