Negative marks/points in multi answer quiz

Negative marks/points in multi answer quiz

napisao/la Manoj Rajiwadekar -
Number of replies: 15

Hi, 

I am using moodle 3.6.

I observed behaviour of negative scoring in multiple choice questions. When there is only a single answer the scoring can be negative and when there are multiple answers possible the lowest grade is 0. How can I change this for multi answer questions? Is there any plugin or hack possible for this?

Prosjek ocjena: -
In reply to Manoj Rajiwadekar

Re: Negative marks/points in multi answer quiz

napisao/la Dominique Bauer -
Slika Documentation writers Slika Particularly helpful Moodlers Slika Plugin developers

With the Multiple choice question type, the lowest possible score is 0, regardless of whether it is set to Multiple answers allowed or to One answer only.

In reply to Dominique Bauer

Re: Negative marks/points in multi answer quiz

napisao/la Manoj Rajiwadekar -

Are you referring to total quiz's score. I am referring to each question's score.  

In reply to Manoj Rajiwadekar

Re: Negative marks/points in multi answer quiz

napisao/la Shirley Gregorczyk -
Slika Particularly helpful Moodlers

The multiple choice correct answers must total 100. The multiple choice incorrect answers must not exceed -100 or total -100 .


In reply to Manoj Rajiwadekar

Re: Negative marks/points in multi answer quiz

napisao/la Dominique Bauer -
Slika Documentation writers Slika Particularly helpful Moodlers Slika Plugin developers

Manoj,

I was referring to the total score of the question. Regarding the score for each individual choice, it can be set between 100% and -100%, regardless of whether the question is set to Multiple answers allowed or to One answer only.

I suggest that you check the settings of your question. You can try a Multiple choice question on the Moodle sandbox to verify the correct behavior.

You can also consult the documentation of the Multiple choice question type on MoodleDocs:

Single-answer questions

...You can specify negative or non-negative marks for each answer...

Multiple-answer questions

...Each answer may carry a positive or negative grade...

I do not know why you can not set negative grades when you set Multiple answers possible. This is not the expected behavior. Maybe someone else can help you.

In reply to Dominique Bauer

Re: Negative marks/points in multi answer quiz

napisao/la Manoj Rajiwadekar -

Hi Dominique,

I think you didn't understand my problem.

Let me explain it with some screenshots. 

Case 1:

When I take a multi choice question with single correct answer in "deferred feedback" and allot the correct answer 3 points and -33% for any incorrect option then I see following question behaviour.


Case 2: And when I select a question of multi choice with multiple answers in "deferred feedback" and allot 3 points for question with 3 correct options (that means individually 1 point for a correct option) and -33% for any incorrect option (that means -1 for any incorrect choice) then I get 0 point instead of -1 if I select 2 incorrect and one correct option.


I hope I am pretty much clear here. Anyways, thanks for your help. 

In reply to Manoj Rajiwadekar

Re: Negative marks/points in multi answer quiz

napisao/la Tim Hunt -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

That is the expected behaviour.

In reply to Tim Hunt

Re: Negative marks/points in multi answer quiz

napisao/la Dominique Bauer -
Slika Documentation writers Slika Particularly helpful Moodlers Slika Plugin developers

Single-answer questions (MoodleDocs)

... A single-answer Multiple Choice question can result in a negative grade.

During the attempt and review, the above statement is correct for Deferred feedback. It is incorrect for Adaptative mode and Interactive with multiple tries: the lowest possible mark is 0.

In the Gradebook, the above statement is incorrect for Deferred feedback, Adaptive mode and Interactive with multiple tries: negative grades do not appear in the gradebook, i.e. the lowest possible mark is 0.

All this is not properly documented. The negative mark for Deferred feedback during the attempt and review is a misleading behaviour.

In reply to Dominique Bauer

Re: Negative marks/points in multi answer quiz

napisao/la Manoj Rajiwadekar -

Also, I don't understand why there is difference in behaviour for same type of question i.e. MCQ

In reply to Manoj Rajiwadekar

Re: Negative marks/points in multi answer quiz

napisao/la Tim Hunt -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers

The are not the same type of question. The grading calculation is completely different and always has been.

In reply to Tim Hunt

Re: Negative marks/points in multi answer quiz

napisao/la stefan weber -
Slika Plugin developers

i just had the same problem and stumbled on this thread via google

i find this behaviour extremely misleading - it is neither documented nor can anyone except this

how are people supposed to know that these are not the same type of question?

  • the name of the question type is the same
  • the plugin name of the question type is the same
  • both are created by choosing the same question type in the question chooser

for one to allow negative points while the other doesn't clearly makes absolutely no sense, and is very misleading, even by moodle standards

there is not even any help text for the "one of multiple answers" setting - so how should anyone expect that this setting chooses a completely different grade calculation method? it makes no sense!

In reply to stefan weber

Re: Negative marks/points in multi answer quiz

napisao/la Dominique Bauer -
Slika Documentation writers Slika Particularly helpful Moodlers Slika Plugin developers

Hello Stefan,

Tim Hunt provided the reason for this at https://moodle.org/mod/forum/discuss.php?d=383245.

In reply to Dominique Bauer

Re: Negative marks/points in multi answer quiz

napisao/la stefan weber -
Slika Plugin developers

sorry, I don't understand the reasoning at all - apparently it is about adaptive behaviour being more consistent that way? I don't see or understand the connection here.

also, the overwhelming majority of quizzes uses deferred feedback, so wouldn't it make more sense to have that behave consistently, rather than sacrifice consistency there in order to make adaptive consistent?


In reply to Tim Hunt

Re: Negative marks/points in multi answer quiz

napisao/la Dominique Bauer -
Slika Documentation writers Slika Particularly helpful Moodlers Slika Plugin developers

Tim,

It would help me clarify the question if you could comment on my last post. I am right? I would not want to mislead anyone. Should clarification be provided in MoodleDocs?

In reply to Manoj Rajiwadekar

Re: Negative marks/points in multi answer quiz

napisao/la Suhailan Safei -

I have managed to fix this problem by adding the following codes: 

- Filename : moodle/question/type/multianswer/question.php
- Function name: function grade_response(array $response) 
- Code added at line 267

public function grade_response(array $response) {
        $overallstate = null;
        $fractionsum = 0;
        $fractionmax = 0;
        foreach ($this->subquestions as $i => $subq) {
            $fractionmax += $subq->defaultmark;
            $substep = $this->get_substep(null, $i);
            $subresp = $substep->filter_array($response);
            if (!$subq->is_gradable_response($subresp)) {
                $overallstate = $this->combine_states($overallstate, question_state::$gaveup);
            } else {
                list($subfraction, $newstate) = $subq->grade_response($subresp);
                $fractionsum += $subfraction * $subq->defaultmark;
                $overallstate = $this->combine_states($overallstate, $newstate);
            }
        }
        if ($fractionsum <0) $fractionsum =0;    //ADDED THIS LINE TO FILTER NEGATIVE MARK
        return array($fractionsum / $fractionmax, $overallstate);
    }

In reply to Suhailan Safei

Re: Negative marks/points in multi answer quiz

napisao/la Manoj Rajiwadekar -

Hi Suhailan,

I tried your hack but it doesn't work for me. Also If I put " if ($fractionsum <0) $fractionsum =0;" this line on 267 line, it is below " return array($fractionsum / $fractionmax, $overallstate);" this line and you posted here above this line. I tried both the positions but it doesn't work.