Moodle
  1. Moodle
  2. MDL-27030

Quiz reports display incorrect and inconsistent data after regrade

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      1. Go to a quiz with some attempts
      2. Turn off 'Show / download marks for each question'
      3. Regrade, and check that the final scores are shown properly.

      Repeat 3. for all the different ways to regrade (all / selected / dry run / only attempts that need it).

      Show
      1. Go to a quiz with some attempts 2. Turn off 'Show / download marks for each question' 3. Regrade, and check that the final scores are shown properly. Repeat 3. for all the different ways to regrade (all / selected / dry run / only attempts that need it).
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Problem: After regrading, students' final grades are incorrectly displayed as 0.00 when marks for each question are not shown (see attached screenshot). Strangely, the final grades are correct when marks for each question are displayed (see screenshot). In both cases, the average grade is incorrect, as it is in an exported Excel file (see screenshot).

      Steps to reproduce (probably happens in many situations, but these steps consistently reproduce the problem for me):

      1. Take a quiz with at least 1 multiple choice question.

      2. Change the point value of a multiple choice question (#9 in the screenshots above) to 0, as you would if the question had an error in it and you wanted to discount it.

      3. Regrade the quiz.

        Gliffy Diagrams

          Activity

          Hide
          Tony Levi added a comment -

          I have a fix for this, I'll put it on github shortly for you Tim.

          Show
          Tony Levi added a comment - I have a fix for this, I'll put it on github shortly for you Tim.
          Show
          Tony Levi added a comment - https://github.com/tlevi/moodle/tree/mdl27030
          Hide
          Tim Hunt added a comment -

          Thank you very much for your proposed fix.

          I have just added it to my 'must review' list, but I am afraid that is rather long, so I may not get to your patch as speedily as it deserves.

          Sorry, stressful week.

          Show
          Tim Hunt added a comment - Thank you very much for your proposed fix. I have just added it to my 'must review' list, but I am afraid that is rather long, so I may not get to your patch as speedily as it deserves. Sorry, stressful week.
          Hide
          Tony Levi added a comment -

          Any update on applying this one?

          Show
          Tony Levi added a comment - Any update on applying this one?
          Hide
          Tim Hunt added a comment -

          Not immediately clear to me why your fix works. Can you explain? If I can understand this then I should be able to submit it for integration soon after I get back from leave.

          Show
          Tim Hunt added a comment - Not immediately clear to me why your fix works. Can you explain? If I can understand this then I should be able to submit it for integration soon after I get back from leave.
          Hide
          Tim Hunt added a comment -

          OK. To answer my own question. This change is necessary because of the code in quiz_report_overview_table::col_sumgrades().

          And regrettably, this same change is also necessary in Moodle 2.1 and master. I was really hoping that the clean-ups I had done to the code there would have rendered this unnecessary. Oh well.

          Show
          Tim Hunt added a comment - OK. To answer my own question. This change is necessary because of the code in quiz_report_overview_table::col_sumgrades(). And regrettably, this same change is also necessary in Moodle 2.1 and master. I was really hoping that the clean-ups I had done to the code there would have rendered this unnecessary. Oh well.
          Hide
          Tim Hunt added a comment -

          Updating branch information so we have commits for all branches.

          Show
          Tim Hunt added a comment - Updating branch information so we have commits for all branches.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, many thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, many thanks!
          Hide
          Rajesh Taneja added a comment -

          Works Great.
          Thanks for fixing this Tim

          Show
          Rajesh Taneja added a comment - Works Great. Thanks for fixing this Tim
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Such an effort has get its prize. Universal Award to the very-best Moodle developer in the family. Thanks!

          Closing. Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Such an effort has get its prize. Universal Award to the very-best Moodle developer in the family. Thanks! Closing. Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: