| 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.46 2003/12/09 01:12:30 sh002i Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/PG.pm,v 1.47 2004/01/05 01:02:41 sh002i 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. |
| … | |
… | |
| 123 | $envir{externalGif2PngPath} = $ce->{externalPrograms}->{gif2png}; |
123 | $envir{externalGif2PngPath} = $ce->{externalPrograms}->{gif2png}; |
| 124 | |
124 | |
| 125 | # Directories and URLs |
125 | # Directories and URLs |
| 126 | # REMOVED: courseName |
126 | # REMOVED: courseName |
| 127 | # ADDED: dvipngTempDir |
127 | # ADDED: dvipngTempDir |
|
|
128 | # ADDED: jsMathURL |
| 128 | |
129 | |
| 129 | $envir{cgiDirectory} = undef; |
130 | $envir{cgiDirectory} = undef; |
| 130 | $envir{cgiURL} = undef; |
131 | $envir{cgiURL} = undef; |
| 131 | $envir{classDirectory} = undef; |
132 | $envir{classDirectory} = undef; |
| 132 | $envir{courseScriptsDirectory} = $ce->{pg}->{directories}->{macros}."/"; |
133 | $envir{courseScriptsDirectory} = $ce->{pg}->{directories}->{macros}."/"; |
| … | |
… | |
| 136 | $envir{templateDirectory} = $ce->{courseDirs}->{templates}."/"; |
137 | $envir{templateDirectory} = $ce->{courseDirs}->{templates}."/"; |
| 137 | $envir{tempDirectory} = $ce->{courseDirs}->{html_temp}."/"; |
138 | $envir{tempDirectory} = $ce->{courseDirs}->{html_temp}."/"; |
| 138 | $envir{tempURL} = $ce->{courseURLs}->{html_temp}."/"; |
139 | $envir{tempURL} = $ce->{courseURLs}->{html_temp}."/"; |
| 139 | $envir{scriptDirectory} = undef; |
140 | $envir{scriptDirectory} = undef; |
| 140 | $envir{webworkDocsURL} = $ce->{webworkURLs}->{docs}."/"; |
141 | $envir{webworkDocsURL} = $ce->{webworkURLs}->{docs}."/"; |
|
|
142 | $envir{jsMathURL} = $ce->{webworkURLs}->{jsMath}; |
| 141 | |
143 | |
| 142 | # Information for sending mail |
144 | # Information for sending mail |
| 143 | |
145 | |
| 144 | $envir{mailSmtpServer} = $ce->{mail}->{smtpServer}; |
146 | $envir{mailSmtpServer} = $ce->{mail}->{smtpServer}; |
| 145 | $envir{mailSmtpSender} = $ce->{mail}->{smtpSender}; |
147 | $envir{mailSmtpSender} = $ce->{mail}->{smtpSender}; |
| … | |
… | |
| 185 | return { |
187 | return { |
| 186 | tex => "TeX", |
188 | tex => "TeX", |
| 187 | plainText => "HTML", |
189 | plainText => "HTML", |
| 188 | formattedText => "HTML_tth", |
190 | formattedText => "HTML_tth", |
| 189 | images => "HTML_dpng", # "HTML_img", |
191 | images => "HTML_dpng", # "HTML_img", |
|
|
192 | jsMath => "HTML_jsMath", |
| 190 | }->{$name}; |
193 | }->{$name}; |
| 191 | } |
194 | } |
| 192 | |
195 | |
| 193 | sub oldSafetyFilter { |
196 | sub oldSafetyFilter { |
| 194 | my $answer = shift; # accepts one answer and checks it |
197 | my $answer = shift; # accepts one answer and checks it |