--- loncom/xml/lonplot.pm 2005/12/01 18:46:17 1.112 +++ loncom/xml/lonplot.pm 2006/05/30 12:47:53 1.113 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.112 2005/12/01 18:46:17 albertel Exp $ +# $Id: lonplot.pm,v 1.113 2006/05/30 12:47:53 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,6 +36,9 @@ use Apache::response; use Apache::lonxml; use Apache::edit; use Apache::lonnet; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + use vars qw/$weboutputformat $versionstring/; @@ -574,7 +577,7 @@ sub end_gnuplot { '_'.time.'_'.$$.$randnumber.'_plot'; ## Write the plot description to the file &write_gnuplot_file($tmpdir,$filename,$target); - $filename = &Apache::lonnet::escape($filename); + $filename = &escape($filename); ## return image tag for the plot if ($target eq 'web') { $result .= <<"ENDIMAGE"; @@ -591,7 +594,7 @@ ENDIMAGE &Apache::lonxml::register_ssi("/cgi-bin/plot.gif?file=$filename.data&output=eps"); $result = "%DYNAMICIMAGE:$Apache::lonplot::plot{'width'}:$Apache::lonplot::plot{'height'}:$Apache::lonplot::plot{'texwidth'}\n"; $result .= '\graphicspath{{/home/httpd/perl/tmp/}}'."\n"; - $result .= '\includegraphics[width='.$Apache::lonplot::plot{'texwidth'}.' mm]{'.&Apache::lonnet::unescape($filename).'.eps}'; + $result .= '\includegraphics[width='.$Apache::lonplot::plot{'texwidth'}.' mm]{'.&unescape($filename).'.eps}'; } } elsif ($target eq 'edit') { $result.=&Apache::edit::tag_end($target,$token); @@ -1108,7 +1111,7 @@ sub write_gnuplot_file { } elsif ($target eq 'tex') { $gnuplot_input .= "set term postscript eps $Apache::lonplot::plot{'plotcolor'} solid \"Helvetica\" $pt \n"; $gnuplot_input .= "set output \"/home/httpd/perl/tmp/". - &Apache::lonnet::unescape($filename).".eps\"\n"; + &unescape($filename).".eps\"\n"; } # cartesian or polar? if (lc($Apache::lonplot::plot{'plottype'}) eq 'polar') {