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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.0.4, 3.1
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Affected Branches:
      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

              • Assignee:
                Unassigned
                Reporter:
                mr-russ Russell Smith
                Participants:
                Component watchers:
                Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: