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

Non backwards compatible change in calendar_get_events behaviour

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.3
    • 3.3
    • Calendar

    Description

      In 3.3 we changed calendar_get_events such that it tries to respect user and group overrides and returns only the most applicable event.

      The details of this rely on the current logged in user, which is not good. Previously you could call it with something like: calendar_get_events(PHP_INT_MIN, PHP_INT_MAX, [3,4], true, true); and you would recieve all the events for users with id 3 and 4.

      Now it will only give you events for the current logged in user (in the case that the logged in user is neither 3 or 4 as in the example above, you will get back an empty array).

      A big part of the problem is that we attempt to solve the overrides problem with SQL, when really it should be done by filtering the results returned by the original query (probably).

      Attachments

        Activity

          People

            cameron1729 cameron1729
            cameron1729 cameron1729
            Ryan Wyllie Ryan Wyllie
            Andrew Lyons Andrew Lyons
            Damyon Wiese Damyon Wiese
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              15/May/17