Forum archive 2000-2006

Thomas Hagedorn - Improving Display of Text in Answer Previewer

by Arnold Pizer -
Number of replies: 0
 Improving Display of Text in Answer Previewer topic started 8/1/2005; 12:29:49 PMlast post 8/16/2005; 11:13:26 AM
 Thomas Hagedorn - Improving Display of Text in Answer Previewer  8/1/2005; 12:29:49 PM (reads: 990, responses: 4) We have some multiple choice questions, where the answers are text expressions. They display fine when the student sees the question, but if they use the answer previewer, the text is put into capital italics. For one word, this is ok, but for longer expressions, it makes it hard to read. I was unable to figure out a solution to this. Does anyone have any ideas? Or can you point me to a problem in the Rochester problem library that solves this display problem? Thanks, Tom <| Post or View Comments |>

 Davide P. Cervone - Re: Improving Display of Text in Answer Previewer  8/7/2005; 12:55:56 PM (reads: 1195, responses: 0) The way the answer preview is set up depends on which answer checker you are using, so it would help if you would let us know more specifically what the answer checker is. Also, is this in WW1.x or WW2.x? When you say "use the answer previewer" it sounds like WW1.x, and that will also make a difference. The reason that the answer shows up in italics is because the preview is processed by LaTeX, and (in the absense of other TeX commands) text will be typeset as though it were variables (i.e., using the math italic font), and spaces will be ignored. The reason that it is in upper case is probably because the answer checker has put the answer into upper case to do a case-insensitive check against the expected answer. You might be able to solve the problem by adding a post-filter the answer checker that puts an \hbox{...} around the student's answer, so that it will be typset as normal text. Note, however, that if the student has entered TeX special characters (like $or %) as part of his answer, this can cause problems for the previewer (whether you put the \hbox in or not). Davide <| Post or View Comments |>  Thomas Hagedorn - Re: Improving Display of Text in Answer Previewer 8/15/2005; 10:31:47 PM (reads: 1203, responses: 1) Hi Davide, Sorry, about not posting that information. WW1 seems like a long time ago. We're using WW2.1. Unfortunately, I couldn't get your suggestion to work. Here's the situation we're looking at. We have a multiple choice question and the initial code is below: # Make a new checkbox multiple choice$tf = new_pop_up_select_list(); $tf->ra_pop_up_list(["?"=>"Select Answer", "No Solution" => "No Solution", "Infinite Solutions" => "Infinite Solutions", "Unique Solution" => "Unique Solution"]); Changing the second entries by inserting a hbox or mathrm negatively affects what the student sees. Changing the first entry causes an ugly display when Webwork checks whether the student's answer is correct. Currently, the problem is that when Webwork checks the student's answer, the entries showing up in the "Answer Preview" column are all in upper-case, italics, which can be very hard to read. The "perfect" solution would be for normal text to be printed in this column. For this type of problem, we can control what the answers look like, so we don't have to worry about a student entering in special TeX characters. Thanks, Tom <| Post or View Comments |>  Davide P. Cervone - Re: Improving Display of Text in Answer Previewer 8/16/2005; 11:02:28 AM (reads: 1429, responses: 0) OK, I looked more at how these problems work, and I suspect you are using  ANS(str_cmp($tf->ra_correct_ans)); to check the answer. Try using strict_str_cmp instead. It does not force the answer to upper case. Davide <| Post or View Comments |>