Negative marking - MCQ

Negative marking - MCQ

by bala chandra -
Number of replies: 5

Hi there,

I have a requirement to customize the negative marking functionality.

The scenario is like, the teacher/admin will enter all the options for a question and mark the correct answer only and leave the rest as it is (None). They need a customized option where they can select the quiz and enter the negative mark and save, this has to get updated to the question.

I have customized everything, and when the user updates negative mark, I am updating the mdl_question_answers table -> fraction column. 

There are no issues until here. But, the actual issue is when the student answers the questions, these negative marks are not being considered, though the DB is updated properly.

When I try to apply negative marks to the question directly through question, they perform normally.

My question is, Have I missed any other table??  Do I need to update any other table other than mdl_question_answers

Thanks in Advance

Regards

BalaChandra

Average of ratings: -
In reply to bala chandra

Re: Negative marking - MCQ

by bala chandra -
I rechecked the DB.. But, could not figure out which table I should update other than the mdl_question_answers table.
In reply to bala chandra

Re: Negative marking - MCQ

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
After changing questions directly in the database, you need to purge the 'Question definitions' cache for the changes to show up. (You can do this under Admin -> Plugins -> Caching.

Also, if you want this to affect students who have already attempted the quiz, you need to regrade the quiz (under Quiz settings -> Results -> Grades for the particular quiz).
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Negative marking - MCQ

by bala chandra -

Thanks a lot Sir...

Really.. you solved the mystery... 

Thank you very much for the solution.

Now, In my custom code I am calling the purge function so that the teacher does not need to purge again and again when he adds some negative marking. It is working like a charm. Thanks once again.

Regards

Balachandra