WeBWorK Problems

Answers (having ) are not printed correctly in the Correct Answers Column

Answers (having ) are not printed correctly in the Correct Answers Column

by Liping Chen -
Number of replies: 3
I have a question about the following code:

DOCUMENT();
loadMacros(
"PGstandard.pl",
"parserPopUp.pl",
);
TEXT(beginproblem());

$popup = PopUp(["?", "a>b", "a=b", "a<b"], "a<b");

BEGIN_TEXT
Test: \{ $popup->menu() \}.
$PAR
END_TEXT

ANS( $popup->cmp() );

Context()->texStrings;
SOLUTION(EV3(<<'END_SOLUTION'));
$PAR SOLUTION $PAR
The correct answer is \{ $popup->correct_ans() \}
words.
END_SOLUTION
Context()->normalStrings;
ENDDOCUMENT();

When I select "Show correct answers", the answer is not printed correctly in the Correct column:
answer.png
How should I fix it? Many thanks!

Liping
In reply to Liping Chen

Re: Answers (having ) are not printed correctly in the Correct Answers Column

by Hedley Pinsent -
I had a different problem with the code which means we are working with a different version of things.

My problem was that the drop down was displaying "a" instead of "a<b"; I was able to "workaround that" by placing spaces around the inequalities.

Screenshot is attached
Attachment popup_1.png
In reply to Hedley Pinsent

Re: Answers (having ) are not printed correctly in the Correct Answers Column

by Liping Chen -
Hi Hedley,

Thank you very much for reply! Yes, I am working under the version 2.5 of WeBWorK. I still got the same printing mistake after I placed some spaces around the inequalities, but I did not get the display problem in this case. I will try it in a newer version of WeBWorK and see how it works.

Liping
Attachment display.JPG