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

              Show
              tlevi Tony Levi added a comment - https://github.com/tlevi/moodle/tree/mdl28227
              Hide
              timhunt Tim Hunt added a comment -

              Thanks for your fix Tony. Submitted for integration.

              Note for integrators. this only affects MOODLE_20_STABLE.

              Show
              timhunt Tim Hunt added a comment - Thanks for your fix Tony. Submitted for integration. Note for integrators. this only affects MOODLE_20_STABLE.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks Tim integrated now

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks Tim integrated now
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Works Great
              Thanks for providing the patch Tim.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Works Great Thanks for providing the patch Tim.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Congratulations - this fix has just been released in the weeklies.

              Show
              samhemelryk Sam Hemelryk added a comment - Congratulations - this fix has just been released in the weeklies.

                People

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

                  Dates

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