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

Regrade sometimes grades user attempts for any quiz not selected quiz

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.3
    • 2.0.4
    • Quiz
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE
    • 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.

    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.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              tlevi Tony Levi
              Sam Hemelryk Sam Hemelryk
              Rajesh Taneja Rajesh Taneja
              Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                1/Aug/11