version 1.56, 2002/05/03 22:32:15
|
version 1.57, 2002/05/09 15:44:43
|
Line 48 package Apache::londefdef;
|
Line 48 package Apache::londefdef;
|
use Apache::lonnet; |
use Apache::lonnet; |
use strict; |
use strict; |
use Apache::lonxml; |
use Apache::lonxml; |
|
use Apache::File(); |
|
|
BEGIN { |
BEGIN { |
|
|
Line 1394 EDITBUTTON
|
Line 1394 EDITBUTTON
|
my $path; |
my $path; |
if ($src =~ m!(.*)/([^/]*)$!) { |
if ($src =~ m!(.*)/([^/]*)$!) { |
$file = $2; |
$file = $2; |
$path = $1; |
$path = $1.'/'; |
} else { |
|
$path = $Apache::lonxml::pwd[-1]; |
|
$file = $src; |
|
} |
} |
$file=~s/(\.gif|\.jpg)$/\.eps/; |
my $newsrc = $src; |
if ($path) { |
$newsrc =~ s/(\.gif|\.jpg)$/\.eps/; |
$currentstring .= '\graphicspath{{'.$path.'/}}\fbox{\includegraphics{'.$file.'}}'; |
$file=~s/(\.gif|\.jpg)$/\.eps/; |
|
if (-e $newsrc) { |
|
if ($path) { |
|
$currentstring .= '\graphicspath{{'.$path.'}}\fbox{\includegraphics{'.$file.'}}'; |
|
} |
} else { |
} else { |
$currentstring .= 'See the image at \tt{'.$src.'}'; |
my $temp_file; |
|
my $filename = "/home/httpd/prtspool/$ENV{'user.name'}$ENV{'user.domain'}temp$ENV{'user.login.time'}.dat"; |
|
$temp_file = Apache::File->new('>>'.$filename); |
|
print $temp_file "$src\n"; |
|
$currentstring .= '\graphicspath{{/home/httpd/prtspool/}}\fbox{\includegraphics{'.$file.'}}'; |
} |
} |
} |
} |
return $currentstring; |
return $currentstring; |