Moodle
  1. Moodle
  2. MDL-35667

Potential infinite loop in grade_category::apply_limit_rules()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.5
    • Fix Version/s: 2.2.6, 2.3.3
    • Component/s: Gradebook
    • Labels:
    • Rank:
      44404

      Description

      I've spotted a possible infinite loop introduced by MDL-13629 to do with droplow and keephigh and extra credit grade items.

        Issue Links

          Activity

          Hide
          Andrew Davis added a comment -

          Requesting peer review. Assuming that goes fine Ill backport this to 2.3 and 2.2.

          Show
          Andrew Davis added a comment - Requesting peer review. Assuming that goes fine Ill backport this to 2.3 and 2.2.
          Hide
          Dan Poltawski added a comment -

          Makes sense to me Andrew.

          If you were feeling keen you add more to the the unit tests which exposes this bug (benefit of not introducing the same problem in the future).

          Show
          Dan Poltawski added a comment - Makes sense to me Andrew. If you were feeling keen you add more to the the unit tests which exposes this bug (benefit of not introducing the same problem in the future).
          Hide
          Andrew Davis added a comment -

          I've added a new test that demonstrated the bug. The new test is in a second commit. It can only go into master and 2.3, not 2.2. 2.2 gets the bug fix but not the test due to changes in the unit testing framework.

          Peer review part 2

          Show
          Andrew Davis added a comment - I've added a new test that demonstrated the bug. The new test is in a second commit. It can only go into master and 2.3, not 2.2. 2.2 gets the bug fix but not the test due to changes in the unit testing framework. Peer review part 2
          Hide
          Dan Poltawski added a comment -

          Looks great, thanks Andrew!

          Show
          Dan Poltawski added a comment - Looks great, thanks Andrew!
          Hide
          Eric Eisenhart added a comment - - edited

          This definitely affects 2.3.2. Ran into it during the cron job, "Looking for quiz overdue quiz attempts between [yesterday 11:05am] and [about right now]", and just hung there. Tracked down with xdebug stuff and found it was hanging in this infinite loop. Applying the 2.3 diff fixed it.

          Show
          Eric Eisenhart added a comment - - edited This definitely affects 2.3.2. Ran into it during the cron job, "Looking for quiz overdue quiz attempts between [yesterday 11:05am] and [about right now] ", and just hung there. Tracked down with xdebug stuff and found it was hanging in this infinite loop. Applying the 2.3 diff fixed it.
          Hide
          Sam Hemelryk added a comment -

          Thanks Andrew, this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks Andrew, this has been integrated now
          Hide
          Adrian Greeve added a comment -

          Tested on the 2.2, 2.3 and master integration branches.
          I repeated the tests for MDL-13629 - No problems there.
          I ran the unit tests as well - No problems.
          Test passed.

          Show
          Adrian Greeve added a comment - Tested on the 2.2, 2.3 and master integration branches. I repeated the tests for MDL-13629 - No problems there. I ran the unit tests as well - No problems. Test passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          From somewhere within the clouds...

          Congrats, this has been sent upstream and is now part of Moodle (your favorite LMS platform). Many thanks for your awesome collaboration!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - From somewhere within the clouds... Congrats, this has been sent upstream and is now part of Moodle (your favorite LMS platform). Many thanks for your awesome collaboration! Ciao

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: