--- trunk/webwork2/lib/WeBWorK/PG.pm 2004/06/21 19:07:08 2354 +++ trunk/webwork2/lib/WeBWorK/PG.pm 2004/06/26 21:07:20 2419 @@ -1,7 +1,7 @@ ################################################################################ # WeBWorK Online Homework Delivery System # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ -# $CVSHeader: webwork-modperl/lib/WeBWorK/PG.pm,v 1.52 2004/05/27 01:34:22 jj Exp $ +# $CVSHeader: webwork-modperl/lib/WeBWorK/PG.pm,v 1.54 2004/06/23 01:19:56 sh002i Exp $ # # This program is free software; you can redistribute it and/or modify it under # the terms of either: (a) the GNU General Public License as published by the @@ -38,20 +38,6 @@ asciimath => "HTML_asciimath", }; -use constant DISPLAY_MODE_FAILOVER => { - TeX => [], - HTML => [], - HTML_tth => [ "HTML", ], - HTML_dpng => [ "HTML_tth", "HTML", ], - HTML_jsMath => [ "HTML_dpng", "HTML_tth", "HTML", ], - HTML_asciimath => [ "HTML_dpng", "HTML_tth", "HTML", ], - # legacy modes -- these are not supported, but some problems might try to - # set the display mode to one of these values manually and some macros may - # provide rendered versions for these modes but not the one we want. - Latex2HTML => [ "TeX", "HTML", ], - HTML_img => [ "HTML_dpng", "HTML_tth", "HTML", ], -}; - sub new { shift; # throw away invocant -- we don't need it my ($ce, $user, $key, $set, $problem, $psvn, $formFields, @@ -99,7 +85,6 @@ $envir{displayMode} = translateDisplayModeNames($options->{displayMode}); $envir{languageMode} = $envir{displayMode}; $envir{outputMode} = $envir{displayMode}; - $envir{displayModeFailover} = DISPLAY_MODE_FAILOVER(); $envir{displayHintsQ} = $options->{showHints}; $envir{displaySolutionsQ} = $options->{showSolutions}; $envir{texDisposition} = "pdf"; # in webwork2, we use pdflatex @@ -194,6 +179,10 @@ cacheDir => $ce->{webworkDirs}->{equationCache}, cacheURL => $ce->{webworkURLs}->{equationCache}, cacheDB => $ce->{webworkFiles}->{equationCacheDB}, + useMarkers => ($ce->{pg}->{renderers}->{dvipng_align} && + $ce->{pg}->{renderers}->{dvipng_align} eq 'mysql'), + dvipng_align => $ce->{pg}->{renderers}->{dvipng_align}, + dvipng_depth_db => $ce->{pg}->{renderers}->{dvipng_depth_db}, ); # Other things...