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

get_all_instances_in_course and get_all_instances_in_courses duplicate code, and the latter has bugs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      The patch I am about to attach here fixes the problem by making get_all_instances_in_course call get_all_instances_in_courses with a one-element array.

      From a detailed look at the code, I don't think this will cause any performance problems.

      And it means that in future, people can't change one function without changing the other.

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            timhunt Tim Hunt
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

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