Analysis of responses not calculating correctly

Re: Analysis of responses not calculating correctly

by Tim Hunt -
Number of replies: 2
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Don't worry. I know all about more urgent issues coming up.

Thank you for checking. i am now very mystified. The logic is relatively simple: It loops over every attempt at each question https://github.com/moodle/moodle/blob/master/question/classes/statistics/responses/analyser.php#L125, it asks the question type to classify the response: https://github.com/moodle/moodle/blob/master/question/type/multichoice/question.php#L187, and then counts them up. And, this code is covered by unit tests.

What else could be happening??? Are you using How questions behave: Interactive with multiple tries (or adaptive)? Or are you using Allow redo within an attempt?

I'd love to know what is going on here.
In reply to Tim Hunt

Re: Analysis of responses not calculating correctly

by Greg Merchant -

I know I'm resurrecting an old thread, but this was happening on my site also, but I think we accidentally found the issue, at least for us.  The "Decimal places in grades" was set to zero for the quiz.  The "Count" number corrected after we changed the decimal places to two.

Average of ratings: Useful (1)
In reply to Greg Merchant

Re: Analysis of responses not calculating correctly

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That is good detective work, and it sounds like a bug. The statistics report should analyse the raw data, before rounding.

I made MDL-70043 (which is a terrible example of how to report a bug. Don't do that!) Please add any extra details there.
Average of ratings: Useful (1)