Wednesday, February 26, 2014

Why are my quiz question scores so BIG and HOW do I fix it?

We have a couple vendor courses where the questions on most of the quizzes are resulting in too many or too high.  This is a little hard to explain, but Ill try.  In moodle, questions can have values or total points associated with them.  This allows some questions to be worth more than others, logical.  However, in some of these quizzes, questions had/have a total point value of 3 or 1.  This means the question is worth 3 points or 1 point.  When the quiz was attempted, the resulting attempt would total 300 or 100 points, rather than 3 or 1 in many of the questions.   Hmmmm..

An example - viewing a quiz attempt.










Notice the points of 100, rather than 1.  and a resulting total of 601 points rather than 6.

Notice this quiz shows points of 300, rather than 3 and a total of 3314, rather than 100 - you can see where the question gotten wrong resulting in 0, which is correct, but the questions correct, some/most are resulting in 300, the yellow are partial credit responses and are also calculating fine.






If I click on the Review attempt link, I see this view, which also shows the incorrect total of points awarded to the quiz.





3314 out of a maximum of 100





The very slow process of correcting this problem via the moodle interface is to scroll down the review attempt and click the Make comment or override mark link (for each question that is showing too many points


And then change the value (300 in this case to 3) and then click the Save button.



































Now this is very tedious, and if there are a lot of questions and quizzes to correct, well I would rather stick sharp needles under my fingernails.....

So, I spend a couple hrs looking in the tables and browsing the moodle forums and walking the halls of BOCES, thinking about how I could make these corrections directly in the DB, rather than fooling around with the interface and changing one question at a time.....

Finally, I found the table, mdl_question_answers that looked like it might be involved in assigning those points to the questions.  Eventually I found that the questions where the points were too high had a different fraction value in the column for the record.  This was very promising.  Once I reduced the factor value from 100 to 1 for a couple of the questions and re-calculated the quiz, I used this SQL statement to change the factor value from 100 to 1 for lots of records at once.

Update mdl_question_answers
SET fraction = 1 
WHERE fraction = 100
AND question > xxxxxxx AND question < xxxxxx 

After I updated the table, I had to re-grade each quiz, which was a little tedious, but not terrible.









Moral of the story?  Be patient and look for ways to correct moodle errors en mass, sometimes you get lucky!


No comments:

Post a Comment