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

RCount incorrect in Quiz Analysis Report when correct answer is 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.14
    • 1.9.13
    • Quiz
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • 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.

      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.

            blepoxp Glenn Ansley
            blepoxp Glenn Ansley
            Tim Hunt Tim Hunt
            Sam Hemelryk Sam Hemelryk
            Ankit Agarwal Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.