|
Michael Blake made changes - 21/Aug/06 05:05 PM
Tim Hunt made changes - 23/Aug/06 07:42 PM
This patch allows multichoice and multianswer questiontypes to have negative marks. I choose this two types because it seemd to me the most logical ones. The total sum of all questions on a quiz is set to zero if negative.
Paulo Matos made changes - 01/Mar/07 07:46 PM
Some feedback on the patch:
The reason this bug is non-trivial is that you have to consider what happens in adaptive mode as well as non-adaptive mode. Your patch does not consider that. Also, "//paulo.matos: ..." comments are not helpful. CVS tracks who changed what, so names in comments just clutter the code. So only use comments to describe what the code is doing, like "// Make sure sumgrades are non-negative." Comments like "// This should not be here, ..." do not inspire confidence (questionlib line ~1060). In fact, this comment confused me. It was clearer to me what was going on when I ignored the comment and worked out what the code is doing. I think that any patch that fixes this should treat all question types the same. This is a pain becuase the (Dratted thing. I had not finished. Why did it suddenly submit my comment when I hit return, to continue ...)
I think that any patch that fixes this should treat all question types the same. This is a pain because the $state->raw_grade = min(max((float) $state->raw_grade, 0.0), 1.0)
line of code is copied and pasted into each question type. Probably we need to start by making a method in the base class that applies this logic, and then call that function from each question type. Then we can fix this bug in one place. So, a good attempt to fix this bug, but it needs more work before it can be committed to core. Also, I feel that this counts as a new feature, so I would be reluctant to add it to the 1.6 stable branch. I would rather put in into HEAD. By all means you can make a patch available to people who want to patch their own 1.6 installs, but for core, we need a patch against HEAD. Thanks for your help. > Also, "//paulo.matos: ..." comments are not helpful.
Sorry for that I'll clean that on my next patches. I use it to track my changes while working on the patch. > Comments like "// This should not be here, ..." do not inspire confidence (questionlib line ~1060). In fact, this comment confused me. It was clearer to me what was going on when I ignored the comment and worked out what the code is doing. Ok, I might not expressed quite well on that comment! This comment was about the block code, that is runned every time, even if does not have penalties or timelimit constraints. It should be like a note to the merger. I'll post a new version of the patch with it more clear (hopefully). Ok, here's the new version of the patch.
The comments on the previous one were doubts about the block: I concluded that this block is specific to penalties/timelimit/closing time, and coded accordingly. Cheers, Paulo
Paulo Matos made changes - 01/Mar/07 10:29 PM
Tim> I think that any patch that fixes this should treat all question types the same.
I choosed multichoice and multianswer questiontypes to have negative marks because their were the single one's where you can set a negative mark for an answer through the UI.
Paulo Matos made changes - 22/Mar/07 02:51 AM
Tim Hunt made changes - 02/Nov/07 04:29 AM
Here goes the updated patch for 1.8.x, only multichoice and multianswer questions are treated because those are the only ones that allow setting a negative value through UI.
Paulo Matos made changes - 06/May/08 09:13 PM
Paulo Matos made changes - 01/Oct/08 07:05 PM
I am also facing the Problem but i dont know how to install patch in my site
if anybody can help me Note: a proper solution to this issue is part of this proposal: http://docs.moodle.org/en/Development:Changing_the_Moodle_Question_Engine
Dan Poltawski made changes - 23/Mar/09 09:06 PM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hi Jill,
if you still haven't observed any negative side effects of this hack then I would like to put it into Moodle 1.5.
Gustav
From Gustav Delius (gwd2 at york.ac.uk) Saturday, 7 May 2005, 01:39 AM:
Ah, I almost forgot about this. Our new code again rules out negative marks for questions. I am not sure why, it just seemed natural to us. I will see if I find the time to fix that, it shouldn't be too difficult. I am upgrading the priority on this.
From Gustav Delius (gwd2 at york.ac.uk) Thursday, 23 February 2006, 05:49 PM:
This subject has come up again on the forums, see for example http://moodle.org/mod/forum/discuss.php?d=40310&parent=185678
From Gustav Delius (gwd2 at york.ac.uk) Thursday, 23 February 2006, 05:51 PM:
Also see http://moodle.org/mod/forum/discuss.php?d=40128
.
We could implement another quiz option to allow negative marks for questions.
From John Isner (john.isner at gmail.com) Tuesday, 11 July 2006, 08:04 PM:
Standardized tests such as the SAT deduct 1/4 point for each wrong answer to a MCQ. It is very difficult to simulate those tests in moodle without this feature.