--- loncom/xml/londefdef.pm 2005/02/18 23:22:43 1.257 +++ loncom/xml/londefdef.pm 2005/03/02 22:26:36 1.260 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.257 2005/02/18 23:22:43 albertel Exp $ +# $Id: londefdef.pm,v 1.260 2005/03/02 22:26:36 raeburn Exp $ # # # Copyright Michigan State University Board of Trustees @@ -84,7 +84,6 @@ sub start_m { my $currentstring = ''; my $inside = &Apache::lonxml::get_all_text_unbalanced("/m",$parser); if ($target eq 'web' || $target eq 'analyze') { - $inside ='\\documentstyle{article}'.$inside; &Apache::lonxml::debug("M is starting with:$inside:"); my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval); if ($eval eq 'on') { @@ -185,7 +184,7 @@ sub end_html { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; if ($target eq 'web') { - $currentstring = &Apache::lonxml::xmlend($target,$parser); + $currentstring = ''; } return $currentstring; } @@ -565,10 +564,10 @@ EDITBUTTON } sub end_body { - my ($target,$token) = @_; + my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; if ($target eq 'web') { - $currentstring = $token->[2]; + $currentstring = &Apache::lonxml::xmlend($target,$parser); } elsif ($target eq 'tex') { $currentstring = '\strut\newline\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}\newline\noindent \end{document}'; } @@ -3750,7 +3749,7 @@ sub image_replication { $pssrc =~ s/\.(gif|jpg|jpeg|png)$/.ps/i; if (not -e $epssrc && not -e $pssrc) { my $result=&Apache::lonnet::repcopy($epssrc); - if ($result ne OK) { &Apache::lonnet::repcopy($pssrc); } + if ($result ne 'OK') { &Apache::lonnet::repcopy($pssrc); } } return ''; } @@ -3816,12 +3815,12 @@ sub get_eps_image { $src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i; $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); if (! -e $src) { - if (&Apache::lonnet::repcopy($src) ne OK ) { + if (&Apache::lonnet::repcopy($src) ne 'OK' ) { #if replication failed try to find ps file $src=~s/\.eps$/\.ps/; #if no ps file try to replicate it if (not -e $src && - &Apache::lonnet::repcopy($src) ne OK) { + &Apache::lonnet::repcopy($src) ne 'OK') { #if replication failed try to produce eps file dynamically $src=~s/\.ps$/\.eps/; my $temp_file;