[LON-CAPA-cvs] cvs: loncom /homework imageresponse.pm
foxr
foxr@source.lon-capa.org
Mon, 03 Aug 2009 10:40:00 -0000
foxr Mon Aug 3 10:40:00 2009 EDT
Modified files:
/loncom/homework imageresponse.pm
Log:
BZ 5610 - In some cases image latex is fully formed rather than being generated. In that case, bypasss the call to get_eps_image and just use the supplied LaTeX.
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.97 loncom/homework/imageresponse.pm:1.98
--- loncom/homework/imageresponse.pm:1.97 Fri Dec 19 14:28:14 2008
+++ loncom/homework/imageresponse.pm Mon Aug 3 10:40:00 2009
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# image click response style
#
-# $Id: imageresponse.pm,v 1.97 2008/12/19 14:28:14 raeburn Exp $
+# $Id: imageresponse.pm,v 1.98 2009/08/03 10:40:00 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -187,7 +187,6 @@
}
&Apache::response::end_response();
-
return $result;
}
@@ -716,11 +715,13 @@
my ($commentline, $restofstuff) = split(/\n/, $src);
$graphinclude = $src;
$graphinclude =~ s/^$commentline//;
- } else {
+ } elsif (!($src =~ /\\/)) {
my ($path,$file) = &Apache::londefdef::get_eps_image($src);
my ($height_param,$width_param)=
&Apache::londefdef::image_size($src,0.3,$parstack,$safeeval);
$graphinclude = '\graphicspath{{'.$path.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'}';
+ } else {
+ $graphinclude = $src; # Already fully formed.
}
$Apache::response::foilgroup{"$name.image"} ='\vskip 0 mm \noindent '.$graphinclude;
}