WeBWorK Problems

ans_array and student response storage

Re: ans_array and student response storage

by Glenn Rice -
Number of replies: 0

This is quite different in the code than what was happening in Gateway Quizzes with extended answers.  Although it applies to all of the same types of answers.  Any extended answer in hardcopy only prints the first part of the answer.  This applies to answers that use ans_array, as well as answers that use a MultiAnswer with the singleResult option.  The reason for this is that Hardcopy.pm uses the original_student_ans inside a LaTeX verbatim environment.  The original_student_ans for an extended answer only contains the first part of the extended answer that you see.  The preview_text_string won't work in the verbatim environment, because in many cases it contains html.

I personally think that the student answers (and correct answers) in the hardcopy should not use the verbatim environment, and instead print the preview_latex_string (and correct_ans_latex_string).  It is LaTeX already, and looks better.  Of course, I understand the philosophy that the preview is not what the student entered with the default way that most use WeBWorK.  That is with the html text inputs.  I use the MathQuill answer boxes and hide the preview_text_string (Entered column) in the results table.  So the preview_latex_string is what the students see.  That generally is the same as what the students see in the MathQuill answer box.