Can't create an issue: bug concerning multiple choice questions with corrections

Can't create an issue: bug concerning multiple choice questions with corrections

by Uwe Brauer -
Number of replies: 3

Hi 

I thought I found a serious bug in the quiz concerning multiple choice questions with corrections (that is negative values).

When I want to create an issue the system tells me 

Dear Moodler, before creating a new issue you need to demonstrate that you have searched among the existing issues to see if it's already been filed. Please find a similar issue from among the open issues and either start watching it or vote for it.

but there is no similar issue. and there seems no way to convince the system.

I will, just in case, post the bug report here (my apologies if that is not appropriate)

Hi

In a quiz I set up multiple choice questions with corrections. Recall if you have c choices, the correct answer gets c-1 and the incorrect answers -1 points, such that the expected value of answering a question, not know anything is 0. I chose a question with 4 possible answers, the question itself received 0.75 so the incorrect questions -0.25. The students did the quiz, everything went fine, when I reviewed one student she obtained the final mark of -0.25, which is a bit odd, but not the problem.
The problem was, that she convinced me that actually one answer was correct, so

  1. I overwrote the answer, that is manually changed the value of her answer from -0.25 to 0.75 (I already noticed that moodle claimed that -0.25 was outside  the allowed value, which looked odd to me.
  2. It turned out that I changed the wrong question. So I wanted to re-change from 0.75 to -0.25, but I could not.
  3. So deleted my change leaving the question in empty.
  4. The system displayed not yet graded.
  5. So I selected her and selected regrade selected attempt, but the system failed to set the value to -0.25**

*I think this is a *serious bug

I could provide the xml of the question if required.

 

regards

 

Uwe Brauer 

 


Average of ratings: -
In reply to Uwe Brauer

Re: Can't create an issue: bug concerning multiple choice questions with corrections

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The code looks logically correct to me: https://github.com/moodle/moodle/blob/master/question/engine/questionattempt.php#L1161

It is only rejecting the grade as too small if $mark < $maxmark * $this->get_min_fraction().

However, I guess there could be a floating point issue here. Could you check to see if it will accept -0.249, or -0.2499999? (If so, I guess we need to allow a bit of slack in the comparison.)

(Restrictions on logging your first bug in the tracker are a pain. Sorry. It was necessary because of spammers sad )
In reply to Tim Hunt

Re: Can't create an issue: bug concerning multiple choice questions with corrections

by Uwe Brauer -
This is a floating point issue.
I checked -0.249 or -0.24999 work! Thanks a lot.
However I think this should be fixed somehow, since this not intuitive at all.
Two comments.
1. as I said, if the student gives a wrong answer, the system assigns, correctly, -0.25, but it also states that is is outside the valid range. That is confusing as well.
2. Can I from now on send regular bug reports?
thanks and regards
In reply to Uwe Brauer

Re: Can't create an issue: bug concerning multiple choice questions with corrections

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yes. Definitely a bug. And thanks to your testing, we now understand eactly what the problem is.

I would say that if you report the bug in the tracker, I would fix it, but ...

I just created MDL-69246. You should be able to add yourself as a watcher to that issue.