Moodle
  1. Moodle
  2. MDL-29212

RCount incorrect in Quiz Analysis Report when correct answer is 0

    Details

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

      1. Create a numerical (or shortanswer) question with the right answer 0.
      2. Add it to a quiz, and attempt the quiz a few times as different student accounts, answering both 0 and non-zero.
      3. Log in as teach and go to the item analysis report. Verify the response counts are correct.

      Show
      1. Create a numerical (or shortanswer) question with the right answer 0. 2. Add it to a quiz, and attempt the quiz a few times as different student accounts, answering both 0 and non-zero. 3. Log in as teach and go to the item analysis report. Verify the response counts are correct.
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Pull from Repository:

      Description

      This is an issue in 1.9.13 but the report has been replaced in Moodle 2+
      I imagine it won't be patched for 1.9.13+ but can provide a github patch if devs want it.

      To fix, open up /mod/quiz/report/analysis/report.php and modify the following on line 157 and replace


      if ($resp) {


      with


      if ('' !== $resp) {


      Diff is attached.

        Gliffy Diagrams

          Activity

          Hide
          Tim Hunt added a comment -

          I'm about to go on holiday for a week, so this probably won't get reviewed until I get back.

          Show
          Tim Hunt added a comment - I'm about to go on holiday for a week, so this probably won't get reviewed until I get back.
          Hide
          Tim Hunt added a comment -

          Nice one. We must teach you to submit bug fixes using git.

          Show
          Tim Hunt added a comment - Nice one. We must teach you to submit bug fixes using git.
          Hide
          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
          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
          Sam Hemelryk added a comment -

          Thanks Glenn this has been integrated now.

          Show
          Sam Hemelryk added a comment - Thanks Glenn this has been integrated now.
          Hide
          Ankit Agarwal added a comment -

          test passed,
          Thanks

          Show
          Ankit Agarwal added a comment - test passed, Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing. Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: