version 1.271, 2005/05/17 23:27:25
|
version 1.272, 2005/05/18 16:34:03
|
Line 3878 sub image_height {
|
Line 3878 sub image_height {
|
sub get_eps_image { |
sub get_eps_image { |
my ($src)=@_; |
my ($src)=@_; |
my $orig_src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1], $src); |
my $orig_src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1], $src); |
&Apache::lonxml::debug("get_eps_image: Original image: $orig_src<BR />"); |
&Apache::lonxml::debug("get_eps_image: Original image: $orig_src"); |
$src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i; |
$src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i; |
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); |
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); |
&Apache::lonxml::debug("Filelocation gives; $src <BR />"); |
&Apache::lonxml::debug("Filelocation gives: $src"); |
if (! -e $src) { |
if (! -e $src) { |
&Apache::lonxml::debug("$src does not exist"); |
&Apache::lonxml::debug("$src does not exist"); |
if (&Apache::lonnet::repcopy($src) ne 'ok' ) { |
if (&Apache::lonnet::repcopy($src) ne 'ok' ) { |
Line 3902 sub get_eps_image {
|
Line 3902 sub get_eps_image {
|
open(FILE,">>/home/httpd/prtspool/$env{'user.name'}_$env{'user.domain'}_printout.dat"); |
open(FILE,">>/home/httpd/prtspool/$env{'user.name'}_$env{'user.domain'}_printout.dat"); |
my $newsrc=$orig_src; |
my $newsrc=$orig_src; |
$newsrc =~ s|(.*)/res/|/home/httpd/html/res/|; |
$newsrc =~ s|(.*)/res/|/home/httpd/html/res/|; |
&Apache::lonxml::debug("queueing $newsrc for dynamic eps production. <BR/>"); |
&Apache::lonxml::debug("queueing $newsrc for dynamic eps production."); |
print FILE "$newsrc\n"; |
print FILE "$newsrc\n"; |
close FILE; |
close FILE; |
$src=~s|/home/httpd/html/res|/home/httpd/prtspool|; |
$src=~s|/home/httpd/html/res|/home/httpd/prtspool|; |