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

RCount incorrect in Quiz Analysis Report when correct answer is 0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11