--- loncom/xml/londefdef.pm 2003/10/24 21:25:50 1.187 +++ loncom/xml/londefdef.pm 2003/10/24 21:48:17 1.189 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.187 2003/10/24 21:25:50 albertel Exp $ +# $Id: londefdef.pm,v 1.189 2003/10/24 21:48:17 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -52,7 +52,6 @@ use Apache::lonmenu(); use Apache::lonmeta(); use Apache::Constants qw(:common); -$Apache::londefdef::TD_redirection=0; BEGIN { @@ -60,6 +59,15 @@ BEGIN { } +sub initialize_londefdef { + $Apache::londefdef::TD_redirection=0; + @Apache::londefdef::table = (); + $Apache::londefdef::select=0; + @Apache::londefdef::description=(); + $Apache::londefdef::DD_redirection=0; + $Apache::londefdef::DT_redirection=0; +} + #======================= TAG SUBROUTINES ===================== #-- sub start_output { @@ -2085,6 +2093,11 @@ sub start_img { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval, undef,1); + if (not $src and ($target eq 'web' or $target eq 'tex')) { + my $inside = &Apache::lonxml::get_all_text("/img",$parser); + &Apache::lonnet::logthis("inside was $inside"); + return ''; + } $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=$src; my $currentstring = ''; my $width_param = ''; @@ -2203,6 +2216,7 @@ sub start_img { $safeeval,'src','alt', 'TeXwidth','TeXheight', 'width','height'); + $src=$token->[2]{'src'}; if (!$token->[2]{'width'} && !$token->[2]{'height'}) { $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); &image_replication($src);