- Login as admin
- Enrol 2 students to the course (s1, s2)
- Create 1 group, and 1 grouping in the course
- The group contains both students
- The grouping contains the group 1
- Create a forum with
- Tracking enabled
- Separate groups
- Grouping set to A
- Login as both students and enable forum tracking in your preference
- Login as s1 and post to the forum
- Login as s2 and make sure you see the number of unread posts (1) in the course page
- Login as admin and delete the grouping A
- Login back as s2
- Make sure you see the number of unread posts
- Make sure you don't see any notice
- if you donot see the error straight away just visit the settings page for forum once and go back to course page without saving.
On step 10 Notices are generated as mentioned in
https://tracker.moodle.org/browse/MDL-39947?focusedCommentId=227956&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-227956
The reason is groupind id is still set for $mod, even though it is updated in database.
Purging caches didn't help