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

quiz_get_user_attempts() does not return result in a deterministic order.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.0.4, 3.1
    • None
    • Quiz
    • None
    • MOODLE_30_STABLE, MOODLE_31_STABLE

    Description

      MDL-41922 introduced the ability for quiz_get_user_attempts() to handle more than 1 quiz. It added a unit test that handled multiple quizzes.

      That test assumes that the results of quizzes will be in a certain order. They are sorted by attempt. However with multiple quizzes, there are multiple attempt 1's and you can get either quiz first. In MySQL you will always get the same order, but in PostgreSQL that in not guaranteed and results in random unit test failures. The result may not make sense when sorted in that order either.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mr-russ Russell Smith
              Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: