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

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 1.9, 2.0
    • Component/s: Calendar
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      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

            Assignee:
            derekw Derek Woolhead
            Reporter:
            derekw Derek Woolhead
            Tester:
            Andrew Davis
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08