Merge branch 'MDL-79247_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE

This commit is contained in:
Huong Nguyen 2023-10-03 09:57:55 +07:00
commit ff7530e1d6
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A
2 changed files with 6 additions and 1 deletions

View File

@ -350,7 +350,7 @@ class discussion_list extends db_table_vault {
$favouritesort .= ", {$favalias}.itemtype DESC";
}
return "{$alias}.pinned DESC $favouritesort , {$keyfield} {$direction}";
return "{$alias}.pinned DESC $favouritesort , {$keyfield} {$direction}, {$alias}.id {$direction}";
}
/**

View File

@ -51,6 +51,11 @@ Feature: A user can navigate to previous and next discussions
And I follow "Reply"
And I set the following fields to these values:
| Message | Answer to discussion |
# We need to wait a bit to guarantee that the post is created after the previous ones.
# because there is a bug in the forum_get_discussion_neighbours() when all the discussion
# last modified times are the same. See MDL-79247 for more details. Once that bug is fixed
# we can remove this wait.
And I wait "1" seconds
And I press "Post to forum"
And I should not see "Discussion 2"
And I should see "Discussion 3"