--- loncom/xml/londefdef.pm 2006/03/29 22:54:10 1.302.2.4 +++ loncom/xml/londefdef.pm 2006/03/29 23:00:51 1.302.2.5 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.302.2.4 2006/03/29 22:54:10 albertel Exp $ +# $Id: londefdef.pm,v 1.302.2.5 2006/03/29 23:00:51 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -201,7 +201,7 @@ sub start_html { sub end_html { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web') { + if ($target eq 'web' || $target eq 'webgrade') { $currentstring = ''; } return $currentstring; @@ -211,7 +211,7 @@ sub end_html { sub start_head { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web') { + if ($target eq 'web' || $target eq 'webgrade') { $currentstring = $token->[4].&Apache::lonxml::fontsettings(); } return $currentstring; @@ -220,7 +220,8 @@ sub start_head { sub end_head { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' && $env{'request.state'} eq 'published') { + if (($target eq 'web' && $env{'request.state'} eq 'published') || + ($target eq 'webgrade' && $env{'request.state'} eq 'published')) { $currentstring = &Apache::lonmenu::registerurl(undef,$target). $token->[2]; } @@ -356,7 +357,7 @@ sub end_form { sub start_title { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web') { + if ($target eq 'web' || $target eq 'webgrade') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\keephidden{Title of the document: ' @@ -371,7 +372,7 @@ sub start_title { sub end_title { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web') { + if ($target eq 'web' || $target eq 'webgrade') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -502,7 +503,7 @@ sub start_body { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web') { + if ($target eq 'web' || $target eq 'webgrade') { if ($Apache::lonhomework::parsing_a_problem) { &Apache::lonxml::warning(" tag found inside of tag this can cause problems."); return ''; @@ -586,7 +587,7 @@ EDITBUTTON sub end_body { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off unclosed

- if ($target eq 'web') { + if ($target eq 'web' || $target eq 'webgrade') { $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}'; @@ -3550,7 +3551,7 @@ sub end_legend { sub start_link { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web') { + if ($target eq 'web' || $target eq 'webgrade') { my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval, undef,1); &Apache::lonxml::extlink($href);