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

Regrade sometimes grades user attempts for any quiz not selected quiz

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4
    • Component/s: Quiz
    • Labels:
      None
    • Testing Instructions:
      Hide

      1. Create two quizzes in a course, one graded out of 50, the other graded out of 10.
      2. As a student, attempt both quizzes, and get a grade near 100%
      3. Regrade the quiz that is out of 10, verify that the grade in the gradebook does not change to something near 50! Also check the final grade on the quiz view page.

      Show
      1. Create two quizzes in a course, one graded out of 50, the other graded out of 10. 2. As a student, attempt both quizzes, and get a grade near 100% 3. Regrade the quiz that is out of 10, verify that the grade in the gradebook does not change to something near 50! Also check the final grade on the quiz view page.
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull from Repository:

      Description

      Users reported incorrect grades for quizzes being placed in gradebook. Examples included impossible results e.g 45 / 10.

      Investigation revealed quiz regrading was examining all user quiz attempts in the moodle, not just for the selected quiz. The step to fetch all attempts for users does not always restrict to the regraded quiz; in our case this happened when picking a few attempts only (1) and regrading selected attempts.

      This is fixed by adding an extra condition to the all user attemps query that restricts to the correct quiz, so attempt grading works from the correct attempts.

      Unknown if this also affects 1.9 and/or 2.1 as the regrade code is significantly different.

      Patch via github is incoming.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    1/Aug/11