From: Mike G. v. a. <we...@ma...> - 2010-05-29 13:07:25
|
Log Message: ----------- check that a tex output actually exists before typesetting the correct answer. This effort is still a hack. Problem.pm needs to be written from the ground up. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: Problem.pm Revision Data ------------- Index: Problem.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v retrieving revision 1.225 retrieving revision 1.226 diff -Llib/WeBWorK/ContentGenerator/Problem.pm -Llib/WeBWorK/ContentGenerator/Problem.pm -u -r1.225 -r1.226 --- lib/WeBWorK/ContentGenerator/Problem.pm +++ lib/WeBWorK/ContentGenerator/Problem.pm @@ -384,6 +384,8 @@ # so we'll just deal with each case explicitly here. there's some code # duplication that can be dealt with later by abstracting out tth/dvipng/etc. + return "" unless defined( $answerResult->{correct_value} ) and ref( $answerResult->{correct_value} ); + my $tex = $answerResult->{correct_value}->TeX; return "" unless defined $tex and $tex ne ""; |