short answer questions not marked correctly when viewed in "detailed statistics"

short answer questions not marked correctly when viewed in "detailed statistics"

by Riaan Bredenkamp -
Number of replies: 3
Hi
Please have a look at the following images, first in the results of a test I took, the first question is marked as correct, -- which is (well) correct. but this does not show in the results, as displayed in the detailed statistics page, see image number 2.

Results of quiz

riaan_quiz_results.png


Detailed statistics

detail_statistics.png


When i view the results of the quizzes, the correct total is displayed. But when I view the detaield statistics, they are not. It seems this only occurs with short answer questions.

Does the script that drives the detailed statistics function re-check the answers of each test when it is run ? This would seem like double work .. why does its results not concur with that shown on the "overview" page of the quiz?

Regards
Riaan
(I hope this is understandable, the comm lobe of my brain is not yet functunal this morning smile )
Average of ratings: -
In reply to Riaan Bredenkamp

Re: short answer questions not marked correctly when viewed in "detailed statistics"

by Daniel Mikšík -
Picture of Core developers Picture of Translators

We encountered the same behaviour, only didn't get to reporting it...shy

After submitting the test you are shown the the mod/quiz/attempt.php page that uses - in case of shortanswer questions - grade_response function in mod/quiz/questiontypes/shortanswer/questiontype.php where all the right answers are pulled out of the database and they are one after another compared to the submitted answer using ereg(^right_answer$,submitted_answer).

In the detailed statistics, a different technique is used: in a single step, the submitted answer is  searched for in all right answers serialized to one long string (qr_answer_lookup function in mod/quiz/report/fullstat/report.php). This is done independently of the results for the individual questions saved in the database.

Posting the technical details here in hope they could save some time for the PHP guys to track down the problem.

Dan

In reply to Daniel Mikšík

Re: short answer questions not marked correctly when viewed in "detailed statistics"

by Riaan Bredenkamp -
We moved our site this morning, so I have had to resubmit those images to this forum. Thanks Daniel, I thought that it was something to do with the way I set up my quizzes smile

riaan_quiz_results.png

Detailed statistics:
detail_statistics.png
In reply to Riaan Bredenkamp

Re: short answer questions not marked correctly when viewed in "detailed statistics"

by Jean-Michel Védrine -

Well in fact the problem is more general than that, it is that detailed statistics hasn't been reworked after this summer quiz mod refactoring so detailed statistics are in fact trying to grade each questions rather than using funct in each questiontypes subfolders to do the grading. Detailed statistics are trying to do to much work on each question, they should use external functions.

This lead to several differences between questions grading as viewed in quiz attempts ans as viewed in detailed statistics. I have outlined a few in http://moodle.org/bugs/bug.php?op=show&bugid=2098&pos=16 the short answer problem you displayed here is another one.

Henrik, I have already said in another message "Maybe as I have some programming skills it's also time to participate more actively. QTI, long answer, or one question per page are too big tasks for a beginning so maybe I will concentrate on report/fullstat.

I already submitted some bug reports for this one and have seen some others too.

Henrik, did you look at this one or have some plans ?"

If the fact that I work on this one give you more time to work on "one question per page" or "essay type answer" grand sourire I will be happy to do some work on this problem but as you know quiz mod far better than me, I want to be sure you didn't already started some work on detailed statistics.