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

get_my_courses does not properly obey the limit parameter

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      get_my_courses always returns 2 more courses than specified in $limit (if available).

      This is because of the way that it applied the limit.

      It does it using a counter as it steps through the courses. In this process, there are two off by one error.

      I have attached a diff that simplifies it somewhat (to read), and removes the two off by one errors.

        Attachments

        1. accesslib.diff
          0.5 kB
        2. datalib.diff
          0.5 kB

          Issue Links

            Activity

              People

              • Assignee:
                emerrill Eric Merrill
                Reporter:
                emerrill Eric Merrill
                Participants:
                Component watchers:
                Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Oct/09