-
Bug
-
Resolution: Fixed
-
Minor
-
1.9.5
-
None
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
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.