Quiz scores exceeding maximum grade - how?

Quiz scores exceeding maximum grade - how?

by Mike Green -
Number of replies: 12

One of my teachers has reported a problem with moodle quiz scoring scoring - the score achieved by students is exceeding the maximum grade.

They have run many quizzes before, with the same format, without any problems. Their latest quiz threw up many scores that were higher than maximum grade. Also, when a few students took earlier quizzes  they had missed, and had been scored for most students without any problems, they also got  marks higher than the maximum.

I clicked regrade on the latest quiz that was giving them trouble, which re-set (most of) the courses to no score. When logged on as a student on the course, and re-attempted the quiz, I got all questions right, and (correctly) scored 100%.

The quiz that was giving problems has the following settings:

Attempts allowed:  unlimited
Each attempt builds on the last: No
Grading method: Highest Grade 
Adaptive mode: Yes
Apply penalties: Yes
Decimal digits in grades: 2

 

In edit quiz, each question is set to a potential score of 1 mark. These are simple one-answer multiple choice questions, with the correct answer scoring 100%.

The maximum grade was set to 10.

Students were typically getting 20 marks, some a little less,  and this mark appeared in the gradebook.

So - how can a student achieve a quiz score  which is twice the maximum grade?

 We are running Moodle 1.6.4+ (2006050540)

Very wild guess - the course had several quizzes with the same or similar name (variant use of upper case , etc.)  It couldn't be combining scores from different quizzes, could it?

Average of ratings: -
In reply to Mike Green

Re: Quiz scores exceeding maximum grade - how?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Quiz name is irrelevant. It is all done with id numbers.

I can't think how this happened. It is a pity we could not get a dump of the relevant parts of the database before you clicked regrade.
In reply to Tim Hunt

Re: Quiz scores exceeding maximum grade - how?

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I think I had seen something along these lines when I had changed to marks of one of the random questions. I do not recall the details of this but basically I suspect that the total number of marks on the quiz changed and the already scored tests had 20/19 which gave a score of greater than 100%. I believe a regrade fixed this. If I get a chance I will try to recreate on a test server. Peace.
In reply to Anthony Borrow

Re: Quiz scores exceeding maximum grade - how?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
A step-by-step way to reproduce the problem would be brilliant.
In reply to Tim Hunt

Re: Quiz scores exceeding maximum grade - how?

by Mike Green -

If I get any reccurences, I will bring them to the forum immediately, with DB dumps!

Apparently it has happened on another course too, so I may be able to provide further Interesting Data. smile

In reply to Tim Hunt

Re: Quiz scores exceeding maximum grade - how?

by Mike Green -

OK, I've got lots more instances of this happening now - could you tell me exactly what you need dumping from the database? (Looks like there's lots of quiz-related tables in there, and quiz-sessions looks scarily huge...)

In reply to Mike Green

Re: Quiz scores exceeding maximum grade - how?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What is best is if you can come up with a sequence of steps that let me reproduce the problem on my own system. However, that may not be possible.

However, to extract the needed data from your database, try

SELECT * FROM
mdl_quiz_attempts qa
JOIN mdl_quiz_grades qg ON qa.quiz = qg.quiz AND qa.userid = qg.userid
JOIN mdl_question_sessions qse ON qa.uniqueid = qse.attemptid
JOIN mdl_question_states qst ON qst.attempt = qse.attemptid AND qst.question = qse.questionid
WHERE
qa.uniqueid = [ID of an attempt that has the wrongly calculated score]
ORDER BY
qa.userid, qse.questionid, qst.seq_number

That attempt id comes from the URL /mod/quiz/review.php?attempt=[ID]

That will return a lot of data. Save it as CSV, or something, and attach it to a forum post. (Making sure it does not contain personal information about your students - it shouldn't) Also, if you can, backup the quiz from this course (just the quiz, with no user data) and attach that.

I guess if you don't want to post it publicly, you can email it to me.

Sorry, I have to go now. Probably won't be around for another few hours.
In reply to Tim Hunt

Re: Quiz scores exceeding maximum grade - how?

by Mike Green -

OK, let me experiment a bit and I'll come back with stuff on Monday  - I'm going to try building some new test quizzes, and see what happens - as far as the authors of these quizzes are concerned, this problem has emerged from no-where; their quizzes are no different from the ones that were working, and the fact that quizzes are now scoring wrongly that were scoring fine makes replication of the problem hard. I'm not aware of anything we've done recently to the quiz module that would have damaged it.

I'm very grateful for such quick responses, Tim - it's very nice to feel like I'm not on my own!

In reply to Mike Green

Re: Quiz scores exceeding maximum grade - how?

by Mr. Shortcut -
I get the same problem with moodle 1.7.2+ . Grade of an attempt is greater maximum. Is it a bug?
In reply to Mr. Shortcut

Re: Quiz scores exceeding maximum grade - how?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It is definitely a bug, but most people don'e experience it, so to make any progress, we really need to work out why it happens to you. Once we know why, we can fix it.
In reply to Tim Hunt

Re: Quiz scores exceeding maximum grade - how?

by Mr. Shortcut -
thanks a lot. Looking forward to hear from you.
In reply to Mr. Shortcut

Re: Quiz scores exceeding maximum grade - how?

by Sean Tierney -
Was there ever a resolution provided for this issue? I have a school experiencing this issue who are on Moodle 1.8+.
In reply to Sean Tierney

Re: Quiz scores exceeding maximum grade - how?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I don't think it was ever resolved, at lest in part because I don't think anyone worked out a way to reproduce the problem reliably. Until I can see the problem happening for myself in my development environment, it is very hard to fix.

By the way, is there a tracker issue for this bug yet?