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

Response analysis fails when the response to a numeric question is invalid and the question has a '*' catch all answer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.3, 2.7
    • Fix Version/s: 2.6.3
    • Component/s: Quiz
    • Labels:

      Description

      When we have a quiz with a numerical question with an invalid response to the question a fatal error is met when we try to analyse the responses when showing the statistics report.

      The attached backup "backup-moodle2-activity-500-quiz500-20140410-0952.mbz" is a quiz with a single question and student attempt that triggers this error message.

      Below description was original description before we knew what was causing the problem.

      "I was checking section 1.3 of the enhanced statistics specification (Individual question statistics for a random question).

      I created a test with one variable numeric sets question and 1 random question to be chosen from a pool of 19.

      I was showing statistics for all attempts.

      I happily ran tests and watched the number of questions listed below the entry for the random question. I got up to 10 OK.

      Then at the 11th I got a notice followed by a fatal error.
      Notice: Undefined offset: 0 in /fs1/www_root/icmatest/moodle/question/classes/statistics/responses/analysis_for_subpart.php on line 84
      Fatal error: Call to a member function count_response() on a non-object in /fs1/www_root/icmatest/moodle/question/classes/statistics/responses/analysis_for_subpart.php on line 104.

      Once I've created this bug I'll try to work out how to add the backup I've taken."

        Attachments

          Activity

            People

            Assignee:
            jamiesensei Jamie Pratt
            Reporter:
            pgb Philip Butcher
            Peer reviewer:
            Tim Hunt
            Integrator:
            Dan Poltawski
            Tester:
            Dan Poltawski
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/May/14