WeBWorK Main Forum

Problem has wrong answer for a single student

Re: Problem has wrong answer for a single student

by D. Brian Walton -
Number of replies: 0
I have a speculative answer, which is not entirely consistent with the information that you gave me, but which does possibly come into play.

My hypothesis is that the student actually used different units in his/her answer. There appears to be a bug in the way that answers with units are handled if they are used more than once in an answer checker.

For example, I tried your code on PGlabs and entered the answer in a number of different units. The correct answer for my problem happened to be 3 ft/min. If I entered 3 ft/min in both answers, I got both problems correct. So here are some interesting side effects:

3/60 ft/sec and 3/60 ft/sec will only mark the first correct
3/60 ft/sec and 3/60 ft/min will mark both correct.
3/60 ft/sec and 3 ft/min will only mark the first correct
4/60 ft/sec and 3 ft/min will mark both incorrect
4/60 ft/sec and 3/60 ft/min will mark the second answer correct (even though it is incorrect)

It appears that the answer checker actually does some internal manipulation of the answer object and that units are only considered the first time the answer object is used. The numerical part is updated to match the units the student enters, but it does not remember the new units for the next time it is used.

This may not be a complete answer, but it certainly has a high likelihood of impacting the student's issue. If this is the issue, then you should get around it by creating a second object for the second answer.

However, the answers that you provided don't seem entirely compatible with my hypothesis since 1/30 would be the answer in ft/sec for 2 ft/min and not 4 ft/min. Perhaps something was not quite copied correctly? Or there is yet another issue I have not identified.

- Brian

D. Brian Walton
James Madison University