## Forum archive 2000-2006

### Bill Ziemer - old webwork problem broken

by Arnold Pizer -
Number of replies: 0
 old webwork problem broken topic started 4/4/2006; 3:38:55 PMlast post 4/5/2006; 12:22:55 PM
 Bill Ziemer - old webwork problem broken  4/4/2006; 3:38:55 PM (reads: 455, responses: 3) The problem file: setAlgebra30LogExpEqns/srw4_4_33.pg and one's like it seem to be broken under the webwork2 (with parser enabled). The problem asks for two answers, and says leave second answer blank if there is only one solution. The code uses: $ans1 = ln(-$a); $ans2 = ""; ANS(std_num_cmp($ans1)); ANS(std_str_cmp($ans2)); but there is no way to get the second answer counted as correct. Is there an easy fix? <| Post or View Comments |>  Arnold K. Pizer - Re: old webwork problem broken 4/4/2006; 4:40:04 PM (reads: 571, responses: 0) Hi Bill, See the discussion http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$3795 In particular, Davide Cervone wrote (toward the end): OK, I have fixed the Parser to handle emtpy strings. You can use  ANS(String("")->cmp) to get a blank string checker. I have also modified Problem.pm to not count empty answers that are marked correct as blank answers. This means that you won't get the "n unanswered questions" warning (nor the contradictory "all the answers are correct/at least one is NOT correct" messages). Finally, I modified the MultiPart object to work with blank answers. Arnie <| Post or View Comments |>

 Davide P. Cervone - Re: old webwork problem broken  4/4/2006; 8:02:43 PM (reads: 560, responses: 0) Note that you will need to use  loadMacros("Parser.pl"); at the top of the problem in order to be able to use the String() function. Davide <| Post or View Comments |>

 Bill Ziemer - Re: old webwork problem broken  4/5/2006; 12:22:55 PM (reads: 568, responses: 0) Excellent! Thanks, that did the trick. <| Post or View Comments |>