[system] / branches / rel-2-4-patches / webwork2 / lib / WeBWorK / PG.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-4-patches/webwork2/lib/WeBWorK/PG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2354 Revision 2371
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/PG.pm,v 1.52 2004/05/27 01:34:22 jj Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/PG.pm,v 1.53 2004/06/21 19:07:08 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.
34 plainText => "HTML", 34 plainText => "HTML",
35 formattedText => "HTML_tth", 35 formattedText => "HTML_tth",
36 images => "HTML_dpng", 36 images => "HTML_dpng",
37 jsMath => "HTML_jsMath", 37 jsMath => "HTML_jsMath",
38 asciimath => "HTML_asciimath", 38 asciimath => "HTML_asciimath",
39};
40
41use constant DISPLAY_MODE_FAILOVER => {
42 TeX => [],
43 HTML => [],
44 HTML_tth => [ "HTML", ],
45 HTML_dpng => [ "HTML_tth", "HTML", ],
46 HTML_jsMath => [ "HTML_dpng", "HTML_tth", "HTML", ],
47 HTML_asciimath => [ "HTML_dpng", "HTML_tth", "HTML", ],
48 # legacy modes -- these are not supported, but some problems might try to
49 # set the display mode to one of these values manually and some macros may
50 # provide rendered versions for these modes but not the one we want.
51 Latex2HTML => [ "TeX", "HTML", ],
52 HTML_img => [ "HTML_dpng", "HTML_tth", "HTML", ],
53}; 39};
54 40
55sub new { 41sub new {
56 shift; # throw away invocant -- we don't need it 42 shift; # throw away invocant -- we don't need it
57 my ($ce, $user, $key, $set, $problem, $psvn, $formFields, 43 my ($ce, $user, $key, $set, $problem, $psvn, $formFields,
97 $envir{probFileName} = $envir{fileName}; 83 $envir{probFileName} = $envir{fileName};
98 $envir{problemSeed} = $problem->problem_seed; 84 $envir{problemSeed} = $problem->problem_seed;
99 $envir{displayMode} = translateDisplayModeNames($options->{displayMode}); 85 $envir{displayMode} = translateDisplayModeNames($options->{displayMode});
100 $envir{languageMode} = $envir{displayMode}; 86 $envir{languageMode} = $envir{displayMode};
101 $envir{outputMode} = $envir{displayMode}; 87 $envir{outputMode} = $envir{displayMode};
102 $envir{displayModeFailover} = DISPLAY_MODE_FAILOVER();
103 $envir{displayHintsQ} = $options->{showHints}; 88 $envir{displayHintsQ} = $options->{showHints};
104 $envir{displaySolutionsQ} = $options->{showSolutions}; 89 $envir{displaySolutionsQ} = $options->{showSolutions};
105 $envir{texDisposition} = "pdf"; # in webwork2, we use pdflatex 90 $envir{texDisposition} = "pdf"; # in webwork2, we use pdflatex
106 91
107 # Problem Information 92 # Problem Information

Legend:
Removed from v.2354  
changed lines
  Added in v.2371

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9