[system] / branches / rel-2-1-a1 / webwork-modperl / lib / WeBWorK / PG / Local.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-1-a1/webwork-modperl/lib/WeBWorK/PG/Local.pm

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

Revision 2532 Revision 2533
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/Local.pm,v 1.12 2004/01/05 01:02:41 sh002i Exp $ 4# $CVSHeader: webwork2/lib/WeBWorK/PG/Local.pm,v 1.14 2004/06/26 20:44:54 jj 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.
225 rmtree($envir->{dvipngTempDir}, 0, 0); 225 rmtree($envir->{dvipngTempDir}, 0, 0);
226 } 226 }
227 227
228 # HTML_dpng, on the other hand, uses an ImageGenerator. We have to 228 # HTML_dpng, on the other hand, uses an ImageGenerator. We have to
229 # render the queued equations. 229 # render the queued equations.
230 my $body_text_ref = $translator->r_text;
230 if ($envir->{imagegen}) { 231 if ($envir->{imagegen}) {
231 my $sourceFile = $ce->{courseDirs}->{templates} . "/" . $problem->source_file; 232 my $sourceFile = $ce->{courseDirs}->{templates} . "/" . $problem->source_file;
232 my %mtimeOption = -e $sourceFile 233 my %mtimeOption = -e $sourceFile
233 ? (mtime => (stat $sourceFile)[9]) 234 ? (mtime => (stat $sourceFile)[9])
234 : (); 235 : ();
235 236
236 $envir->{imagegen}->render( 237 $envir->{imagegen}->render(
237 refresh => $translationOptions->{refreshMath2img}, 238 refresh => $translationOptions->{refreshMath2img},
238 %mtimeOption, 239 %mtimeOption,
240 body_text => $body_text_ref,
239 ); 241 );
240 } 242 }
241 243
242 my ($result, $state); # we'll need these on the other side of the if block! 244 my ($result, $state); # we'll need these on the other side of the if block!
243 if ($translationOptions->{processAnswers}) { 245 if ($translationOptions->{processAnswers}) {
293 # the translation process. this is DIFFERENT from the "format expected 295 # the translation process. this is DIFFERENT from the "format expected
294 # by Webwork.pm (and I believe processProblem8, but check.)" 296 # by Webwork.pm (and I believe processProblem8, but check.)"
295 return bless { 297 return bless {
296 translator => $translator, 298 translator => $translator,
297 head_text => ${ $translator->r_header }, 299 head_text => ${ $translator->r_header },
298 body_text => ${ $translator->r_text }, 300 body_text => ${ $body_text_ref },
299 answers => $translator->rh_evaluated_answers, 301 answers => $translator->rh_evaluated_answers,
300 result => $result, 302 result => $result,
301 state => $state, 303 state => $state,
302 errors => $translator->errors, 304 errors => $translator->errors,
303 warnings => $warnings, 305 warnings => $warnings,

Legend:
Removed from v.2532  
changed lines
  Added in v.2533

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9