--- loncom/xml/londefdef.pm 2006/03/23 22:34:53 1.323 +++ loncom/xml/londefdef.pm 2006/03/23 23:47:12 1.324 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.323 2006/03/23 22:34:53 foxr Exp $ +# $Id: londefdef.pm,v 1.324 2006/03/23 23:47:12 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -211,7 +211,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; @@ -221,7 +221,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; @@ -230,7 +230,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]; } @@ -366,7 +367,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: ' @@ -381,7 +382,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 .= '}'; @@ -512,7 +513,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 ''; @@ -596,7 +597,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}'; @@ -3702,7 +3703,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);