Penalty for incorrect answer on multiple choice

Penalty for incorrect answer on multiple choice

par Jill Kaminski,
Nombre de réponses : 9

I'm trying to simulate the grading of Advanced Placement multiple choice question (not multiple answer). Assuming that questions are each worth one point (and the whole quiz can be scaled from there), correct answers earn 1 point, and incorrect answers earn -0.25 points. In other words, there is a 1/4 point deduction from the total score for each incorrect answer.

I tried making all incorrect answers worth -25% and the correct answer worth 100% in the question editor, but it does not seem to be deducting the penalty.

Moyenne des évaluations Useful (1)
En réponse à Jill Kaminski

Re: Penalty for incorrect answer on multiple choice

par Henrik Kaipe,
Negative scores on a question is not supported. The support for negative scores on multichoice questions are intended for the multiple-answer mode that you apperantly are not using. When using multiple answers the negative points earned are deducted from any positive points earned on the same question. If the total score on the question is negative - then the question score is increased to zero.
One way to accomplish what you intend is to gather the multichoice questions in an "Embedded Answers (Cloze)" type of question. All negative scores on multichoice answers within that question are drawn from the positive dito. However, the total score on the question will still be at least zero.
I have plans for a new question type "Quiz Section", in which a number of questions from the same category can be gathered. What the quiz section then does is that it (among other features) can support negative scores on individual questions within the section. The total score on the entire section will be adjusted to zero if negative, however. I won't be constructed very soon thou because I have a lot on my shoulders right now.
Moyenne des évaluations Useful (1)
En réponse à Henrik Kaipe

Re: Penalty for incorrect answer on multiple choice

par Jill Kaminski,

I've made two little changes that seems to be working to implement this in mod/quiz/lib.php:

In function quiz_grade_attempt_question_result, set $gradecanbenegative to true instead of false.

In function quiz_grade_attempt_results, at the bottom, I added:

if ($result->sumgrades < 0) {
   $result->sumgrades = 0;
}

just before
$fraction = (float)($result->sumgrades / $quiz->sumgrades);

This makes the lowest possible grade on the whole quiz 0 instead of negative (like if the person misses every question).

This is my first Moodle hack! and it seems too easy. Do any of my esteemed programmers on this forum see any terrible repercussions from this?

grand sourire

Moyenne des évaluations Useful (1)
En réponse à Jill Kaminski

Re: Penalty for incorrect answer on multiple choice

par Martin Dougiamas,
Avatar Core developers Avatar Documentation writers Avatar Moodle HQ Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers
Sounds good to me Jill, thanks!

Could I ask you to file a bug on the bug tracker referencing this discussion?  That'll help it not get lost after the big quiz refactoring that Henrik is working on right now.
En réponse à Martin Dougiamas

Re: Penalty for incorrect answer on multiple choice

par Manish Verma,
It seems to have got lost as it no longer works in 1.5.x .  Is there any hack for this for 1.5.x?
En réponse à Jill Kaminski

Re: Penalty for incorrect answer on multiple choice

par Brian Mulligan,
Hi Jill,

will this help to get over the problem of negative marking in multiple choice?
En réponse à Jill Kaminski

Re: Penalty for incorrect answer on multiple choice

par Jean-Marc Hilson,

Hi Jill,

Your solution for penalty for incorrect answer on multiple choice doesn't seem to work with moodle 1.5. Do you know a solution for this version?

Thanks!

En réponse à Jill Kaminski

Re: Penalty for incorrect answer on multiple choice

par benita daniel,
hi jill,

I'm using moodle 1.8 and it does not seem to have the function u have mentioned in : /mod/quiz/lib.php
Can u help ?
En réponse à Jill Kaminski

Re: Penalty for incorrect answer on multiple choice

par Ashok Bapi,

Jill madam,

will it work in moodle 3 version plz inform...

Thanks..

Ashok

En réponse à Henrik Kaipe

Re: Penalty for incorrect answer on multiple choice

par Brian Mulligan,
Does this mean that there is no intention to add negative marking as an option in multiple choice questions/ If not, could I ask why?