Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75530

possible caching error in groups_get_all_groups (visible after duplicating instance of plugin mod_discourse)

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.0.2
    • None
    • Caching, Groups
    • MOODLE_400_STABLE

    Description

      Steps to reproduce:

      1. Install mod_discourse (https://moodle.org/plugins/mod_discourse) release 1.2.0 on a system with Moodle 4.0 or above
      2. Create a DisCourse instance in any course
      3. [Optional]: Login in as a course participant and make a submission in the DisCourse
      4. Duplicate the DisCourse activity in the course

      What happens:

      1. Moodle duplicates activity
      2. The grouping and the groups created by the plugin are correctly duplicated and the new groupingid is stored correctly in the mod_discourse table
      3. 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
      4. The plugin notices this and displays an error message instead of the groups
      5. 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            dtnolte Daniel Nolte
            Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: