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

All 4 calls to calendar_sql_where() function are followed by identical code which should therefore be within the function

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.0
    • 1.9, 2.0
    • Calendar
    • None
    • MOODLE_20_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE

    Description

      There are only 4 calls to the calendar_sql_where() function and each call is followed by identical code to select calendar events. This is not good practice and the accompanying patch embodies the calendar event selection within the renamed (calendar_get_events()) function, always returning an array (even if empty) of events.

      Furthermore, there are issues with regards to selecting calendar events on installations with large numbers of users, groups and/or courses which will require changes to the way events are selected anyway, so it makes sense for this code to just be in one place.

      Attachments

        Activity

          People

            derekw Derek Woolhead
            derekw Derek Woolhead
            Andrew Davis Andrew Davis
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3/Mar/08