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

Group override does not appear on user calendar

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.7, 3.8.4, 3.9
    • Fix Version/s: None
    • Component/s: Groups
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE

      Description

      Looks like I could find a way that will help to replicate MDL-67225.

      A very minor bug. Also it affects assignments.

      Here are steps to replicate the issue:

      1. Create a new Moodle instance.
      2. Create a user.
      3. Create a course.
      4. Create an assignment with due date enabled (eg on 5 June).
      5. Add calendar block to the course.
      6. Enroll the user to the course with student role.
      7. Create group1.
      8. Add group override for the group1 and set due date on 10 June.
      9. Set the group1 for the user.
      10. Open a new tab in incognito mode and login as the user.
      11. Confirm that calendar shows an event on 10 June.
      12. As an admin create group2.
      13. Add group override for the group2 and set due date on 15 June.
      14. Set the group2 for the user and remove group1.
      15. In the user tab refresh the page and confirm, that the calendar doesn't show any of these events.
      16. Re-login and purging caches fixes the issue.

      This happens because `$USER->groupmember` is cached during the session, so new groupis is not being picked up here:

      https://github.com/moodle/moodle/blob/68fd8d8bdfffc23b252c17f017e7cb573fdb3019/calendar/lib.php#L2129-L2131

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mikhailgolenkov Mikhail Golenkov
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: