WeBWorK Main Forum

33% Correct and a Green Bar: Bug?

33% Correct and a Green Bar: Bug?

by Christopher Heckman -
Number of replies: 1
I use WeBWorK to give tests for my online class, and a student pointed out something that seems strange.

The answer to the problem in question was a list with 3 elements in it, where the grader allows extra credit. The student had one answer correct and received the following information:

* 33% of the problem was correct. (The status was changed to 0.33333.)
* A green bar, along with the statement: "The answer is correct."

The student saw the green bar and didn't bother redoing the problem. (They get two tries for the test.) Later, he found out that his answer was wrong.

I consider this a serious bug, and I don't recall WeBWorK having worked this way. I'm not doing anything fancy in this problem. (I've summarized the code below; I removed the code not related to answer-checking.)

DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGunion.pl",
"parserMultiAnswer.pl",
"PGcourse.pl",
"PGchoicemacros.pl",
);

$showPartialCorrectAnswers = 1;

[code to generate a problem instance]

$ans = List (0, $l1, $l2);

Context() -> texStrings;
TEXT(beginproblem());

BEGIN_TEXT
[problem description]
END_TEXT

Context()->normalStrings;

ANS ($ans -> cmp);

COMMENT('MathObject version.');
ENDDOCUMENT();
In reply to Christopher Heckman

Re: 33% Correct and a Green Bar: Bug?

by Davide Cervone -
It is not an error in the problem, it is an issue with the gateway quiz module. It looks like it treats any partial credit as complete credit. I suspect that it is line 407 of GatewayQuiz.pm

I suspect this should be

    $numCorrect += $answerScore >= 1;
though I haven't confirmed it. I thought this was taken care of some time ago, but apparently not.