Negative marking in MCQ with one correct answer only

Negative marking in MCQ with one correct answer only

by Timos Almpanis -
Number of replies: 1

Hello all,

I am trying to apply negative marking in a multiple choice exam. I want students to get 1 point for each correct answer and loose 0.5 point for each incorrect answer. Only 1 of the four options is correct. However, when I take the test I still get 0 points instead of -0.5 for the wrongly answered questions. I am using version 1.82.

Any ideas?   

Average of ratings: -
In reply to Timos Almpanis

Re: Negative marking in MCQ with one correct answer only

by Jaime Villate -
Hi Timos,
Sorry for the late reply. I ran across the same problem today and I fixed it. Before I show you what I did, let me make a couple of comments.

If you are using four options for each question, then the negative percentage for the wrong answers should be -33.333...% and not -50%. That way you will ensure that with a large number of questions, if they were answered randomly the final score will be 0 and not negative (one fourth of the answers would be correct and three fourths incorrect).

The second comment is that the failure of the testing method with negative points for wrong answers seems to be a long standing problem in Moodle, that has not been solved in version 1.8.2 and it is due to the fact that the grading script refuses to give a negative score to each single question.

Now let's look at the solution, which was given in this old thread and for Moodle 1.8.2+ looks like this:

1. Edit /question/type/multichoice/questiontype.php
Change lines 366-367 to: (obviously remove line numbers on the left)
365    // Make sure we don't assign negative or too high marks
366       $state->raw_grade = min((float) $state->raw_grade,
367                      1.0) * $question->maxgrade;

2. Edit /lib/questionlib.php
Comment out line 1385 so the code looks like this:
1384   // Ensure that the grade does not go down
1385   // $state->grade = max($state->grade, $state->last_graded->grade);