Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
4.0.2
-
None
-
MOODLE_400_STABLE
Description
Steps to reproduce:
- Install mod_discourse (https://moodle.org/plugins/mod_discourse) release 1.2.0 on a system with Moodle 4.0 or above
- Create a DisCourse instance in any course
- [Optional]: Login in as a course participant and make a submission in the DisCourse
- Duplicate the DisCourse activity in the course
What happens:
- Moodle duplicates activity
- The grouping and the groups created by the plugin are correctly duplicated and the new groupingid is stored correctly in the mod_discourse table
- If you open the duplicated DisCourse (view.php) the method groups_get_all_groups() in the method groups_get_activity_allowed_groups() returns the groups for the grouping of the original DisCourse before its duplication
- The plugin notices this and displays an error message instead of the groups
- After purging the moodle cache the correct groups for the duplicated DisCourse are displayed
What should happen:
- At step 3 groups_get_all_groups should return the groups in the duplicated grouping like it does after purging the cache
Additional info:
- In previous Moodle versions (3.9-3.11) it is working as intended
- Also this behaviour leads to the display of the wrong grouping in the availability box under the activity instance in the course (also fixed after cache purging)
Workaround:
- After purging the moodle caches groups_get_all_groups returns the correct groups for the duplicated grouping
- Cache purging can be triggered by teachers through other actions like renaming an instance in the course too