[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Tue, 08 Oct 2002 20:09:17 -0000
sakharuk Tue Oct 8 16:09:17 2002 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
Corrected <allow> tag for the replication. Due to the very last place of
the tag in the problems we have to parse latex file two times: the first parse is neccessary to replicate pictures and the second - to invoke correctly <img> tag to produce the correct output. It seems to me bad. Working on the solution. Any ideas are welcomed.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.91 loncom/xml/londefdef.pm:1.92
--- loncom/xml/londefdef.pm:1.91 Tue Oct 8 11:35:22 2002
+++ loncom/xml/londefdef.pm Tue Oct 8 16:09:17 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.91 2002/10/08 15:35:22 sakharuk Exp $
+# $Id: londefdef.pm,v 1.92 2002/10/08 20:09:17 sakharuk Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -330,7 +330,6 @@
#-- <body> tag
sub start_body {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
-# my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
if (!$Apache::lonxml::registered) {
@@ -1617,8 +1616,7 @@
if ($alt) {
$currentstring .= ' '.$alt.' ';
} else {
- #there are no image and alt attribute
- $currentstring .= ' THE ORIGINAL PROBLEM CONTAINS EMPTY IMG TAG WITHOUT IMAGE AND ALT ATTRIBUTE ';
+ #<allow> tag will care about replication
}
}
}
@@ -1716,22 +1714,22 @@
}
#-- <allow> tag
sub start_allow {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
$Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
$token->[2]->{'src'};
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
if (not -e '/home/httpd/html'.$src) {
#replicates image itself
- &Apache::lonnet::repcopy($src);
+ &Apache::lonnet::repcopy('/home/httpd/html'.$src);
#replicates eps or ps
my $newsrc = $src;
$newsrc =~ s/(.gif|.jpg)$/.eps/;
- if (not-e $newsrc && &Apache::lonnet::repcopy($newsrc) ne 'OK') {
+ if (not-e $newsrc && &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc) ne 'OK') {
$newsrc =~ s/\.ps$/\.eps/;
- &Apache::lonnet::repcopy($newsrc);
+ &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc);
}
}
- return '';
+ return '';
}
sub end_allow {
return '';