| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.224 2010/05/25 22:04:13 gage Exp $ |
4 | # $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.225 2010/05/28 21:29:48 gage Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 381 | |
381 | |
| 382 | # note: right now, we have to do things completely differently when we are |
382 | # note: right now, we have to do things completely differently when we are |
| 383 | # rendering math from INSIDE the translator and from OUTSIDE the translator. |
383 | # rendering math from INSIDE the translator and from OUTSIDE the translator. |
| 384 | # so we'll just deal with each case explicitly here. there's some code |
384 | # so we'll just deal with each case explicitly here. there's some code |
| 385 | # duplication that can be dealt with later by abstracting out tth/dvipng/etc. |
385 | # duplication that can be dealt with later by abstracting out tth/dvipng/etc. |
|
|
386 | |
|
|
387 | return "" unless defined( $answerResult->{correct_value} ) and ref( $answerResult->{correct_value} ); |
| 386 | |
388 | |
| 387 | my $tex = $answerResult->{correct_value}->TeX; |
389 | my $tex = $answerResult->{correct_value}->TeX; |
| 388 | |
390 | |
| 389 | return "" unless defined $tex and $tex ne ""; |
391 | return "" unless defined $tex and $tex ne ""; |
| 390 | |
392 | |