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

On busy calendars, events near the end of the month are dropped off

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.4
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a lot of calendar events - at least 50, and preferable closer to 100), I recommend some combination of:
        1. Subscribe to an iCal feed such as https://calendar.google.com/calendar/ical/en.australian%23holiday%40group.v.calendar.google.com/public/basic.ics
        2. Create some repeating events
      2. View the calendar month view
        1. Confirm that your calendar is filled
      3. Add the upcoming calendar block
        1. Confirm that only 10 items are shown
      4. Edit your Calendar Prefs (User menu -> Prefs -> Calendar prefs) and increase the max number of upcoming events
      5. View your dashboard again
        1. Confirm the new number is respected
      Show
      Create a lot of calendar events - at least 50, and preferable closer to 100), I recommend some combination of: Subscribe to an iCal feed such as https://calendar.google.com/calendar/ical/en.australian%23holiday%40group.v.calendar.google.com/public/basic.ics Create some repeating events View the calendar month view Confirm that your calendar is filled Add the upcoming calendar block Confirm that only 10 items are shown Edit your Calendar Prefs (User menu -> Prefs -> Calendar prefs) and increase the max number of upcoming events View your dashboard again Confirm the new number is respected
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull Master Branch:
      MDL-60561-master

      Description

      We have an arbitrary limit of only 40 events to be shown at once.
      We theoretically allow the user to select more, but this logic is also in the wrong place, and there is a hard-coded limit in the API of only 50 events.

      MDL-60092 introduced a partially-configurable limit for the number of events to show. This is confusing because the setting is only fetched in the upcoming view, but the code makes it look like it's always applied:
      https://github.com/moodle/moodle/blob/849405177fd087b65baf42b9215d4d6e7eb661c0/calendar/lib.php#L3131-L3137

      Furthermore, there is an arbitrary limit of only 50 events in the vault before an exception is thrown.
      Unfortunately, this really messes with the calenar, and items disappear off the end of the calendar.

      https://github.com/moodle/moodle/blob/849405177fd087b65baf42b9215d4d6e7eb661c0/calendar/classes/local/event/data_access/event_vault.php#L105-L107

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Nov/17