--- loncom/xml/londefdef.pm 2006/03/29 22:54:10 1.302.2.4 +++ loncom/xml/londefdef.pm 2005/12/26 19:01:25 1.306 @@ -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.306 2005/12/26 19:01:25 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -68,7 +68,6 @@ BEGIN { # for ($row =0; $row <= $lastrow; $row++ ) { # my $text = Dumper($Apache::londefdef::table[$row]); # &Apache::lonnet::logthis("table [ $row ]".$text); -# # } #} sub initialize_londefdef { @@ -146,7 +145,7 @@ sub end_m { sub start_tthoption { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; my $result; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { my $inside = &Apache::lonxml::get_all_text("/tthoption",$parser, $style); $inside=~s/^\s*//; @@ -179,6 +178,7 @@ sub start_html { (!$env{'request.role.adv'})) {$currentstring .='\batchmode';} $currentstring .= '\newcommand{\keephidden}[1]{}'. '\renewcommand{\deg}{$^{\circ}$}'. + '\usepackage{multirow}'. '\usepackage{longtable}'. '\usepackage{textcomp}'. '\usepackage{makeidx}'. @@ -231,7 +231,7 @@ sub end_head { sub start_map { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -240,7 +240,7 @@ sub start_map { sub end_map { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -250,7 +250,7 @@ sub end_map { sub start_select { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $Apache::londefdef::select=0; @@ -261,7 +261,7 @@ sub start_select { sub end_select { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -271,7 +271,7 @@ sub end_select { sub start_option { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $Apache::londefdef::select++; @@ -287,7 +287,7 @@ sub start_option { sub end_option { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring='}'; @@ -299,7 +299,7 @@ sub end_option { sub start_input { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -308,7 +308,7 @@ sub start_input { sub end_input { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -318,7 +318,7 @@ sub end_input { sub start_textarea { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -327,7 +327,7 @@ sub start_textarea { sub end_textarea { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -337,7 +337,7 @@ sub end_textarea { sub start_form { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -346,7 +346,7 @@ sub start_form { sub end_form { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -387,7 +387,7 @@ sub end_title { sub start_meta { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { my $args=''; if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } if ($args eq '') { @@ -436,7 +436,7 @@ sub start_meta { sub end_meta { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { my $args=''; if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } if ($args ne '') { @@ -594,34 +594,25 @@ sub end_body { return $currentstring; } -# \begin{center} causes a new paragprah spacing that looks odd inside -# of a table cell -sub center_correction { return '\vspace*{-6 mm}'; } #--
tag (end tag required) sub start_center { - my ($target,$token,$tagstack) = @_; + my ($target,$token) = @_; my $currentstring = &end_p(); # Close off any prior para. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { - if (&is_inside_of($tagstack, "table")) { - $currentstring .= ¢er_correction(); - } $currentstring .= '\begin{center}'; } return $currentstring; } sub end_center { - my ($target,$token,$tagstack) = @_; + my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = '\end{center}'; - if (&is_inside_of($tagstack, "table")) { - #$currentstring .= ¢er_correction(); - } } return $currentstring; } @@ -631,7 +622,7 @@ sub end_center { sub start_b { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { &disable_para(); @@ -643,7 +634,7 @@ sub start_b { sub end_b { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { &enable_para(); @@ -657,7 +648,7 @@ sub end_b { sub start_strong { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { &disable_para(); @@ -669,7 +660,7 @@ sub start_strong { sub end_strong { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { &enable_para(); @@ -682,7 +673,7 @@ sub end_strong { sub start_h1 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off any prior para. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $pre; @@ -707,7 +698,7 @@ sub start_h1 { sub end_h1 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { my $post='\vskip 0 mm '; @@ -731,7 +722,7 @@ sub end_h1 { sub start_h2 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off any prior para. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $pre; @@ -753,7 +744,7 @@ sub start_h2 { sub end_h2 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { my $post='\vskip 0 mm '; @@ -774,7 +765,7 @@ sub end_h2 { sub start_h3 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off any prior para. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $pre; @@ -796,7 +787,7 @@ sub start_h3 { sub end_h3 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { my $post='\vskip 0 mm '; @@ -817,7 +808,7 @@ sub end_h3 { sub start_h4 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off any prior para. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $pre; @@ -839,7 +830,7 @@ sub start_h4 { sub end_h4 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { my $post='\vskip 0 mm '; @@ -860,7 +851,7 @@ sub end_h4 { sub start_h5 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off any prior paras. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $pre; @@ -882,7 +873,7 @@ sub start_h5 { sub end_h5 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { my $post='\vskip 0 mm '; @@ -903,7 +894,7 @@ sub end_h5 { sub start_h6 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off any prior paras. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $pre; @@ -925,7 +916,7 @@ sub start_h6 { sub end_h6 { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { my $post='\vskip 0 mm '; @@ -946,7 +937,7 @@ sub end_h6 { sub start_cite { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\textit{'; @@ -957,7 +948,7 @@ sub start_cite { sub end_cite { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -969,7 +960,7 @@ sub end_cite { sub start_i { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\textit{'; @@ -980,7 +971,7 @@ sub start_i { sub end_i { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -992,7 +983,7 @@ sub end_i { sub start_address { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\textit{'; @@ -1003,7 +994,7 @@ sub start_address { sub end_address { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -1015,7 +1006,7 @@ sub end_address { sub start_dfn { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\textit{'; @@ -1026,7 +1017,7 @@ sub start_dfn { sub end_dfn { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -1038,7 +1029,7 @@ sub end_dfn { sub start_tt { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\texttt{'; @@ -1049,7 +1040,7 @@ sub start_tt { sub end_tt { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -1061,7 +1052,7 @@ sub end_tt { sub start_kbd { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\texttt{'; @@ -1072,7 +1063,7 @@ sub start_kbd { sub end_kbd { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -1084,7 +1075,7 @@ sub end_kbd { sub start_code { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\texttt{'; @@ -1095,7 +1086,7 @@ sub start_code { sub end_code { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -1107,7 +1098,7 @@ sub end_code { sub start_em { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\emph{'; @@ -1118,7 +1109,7 @@ sub start_em { sub end_em { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -1130,7 +1121,7 @@ sub end_em { sub start_q { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\emph{'; @@ -1141,7 +1132,7 @@ sub start_q { sub end_q { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -1180,7 +1171,7 @@ sub enable_para { sub start_p { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= &end_p(); # close off prior para if in progress. $currentstring .= $token->[4]; if (! ($currentstring =~ /\//)) { @@ -1192,10 +1183,6 @@ sub start_p { if ($align eq 'center') { $currentstring .='\begin{center}\par'; $closing_string = '\end{center}'; - if (&is_inside_of($tagstack, "table")) { - $currentstring = ¢er_correction().$currentstring; - #$closing_string .= ¢er_correction(); - } } elsif ($align eq 'right') { $currentstring.='\makebox['.$env{'form.textwidth'}.']{\hfill\llap{'; $closing_string= '}}'; @@ -1231,7 +1218,7 @@ sub end_p { sub start_br { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my @tempo=@$tagstack; @@ -1259,7 +1246,7 @@ sub start_br { sub end_br { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } return $currentstring; @@ -1269,7 +1256,7 @@ sub end_br { sub start_big { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '{\large '; @@ -1280,7 +1267,7 @@ sub start_big { sub end_big { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -1292,7 +1279,7 @@ sub end_big { sub start_small { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '{\footnotesize '; @@ -1303,7 +1290,7 @@ sub start_small { sub end_small { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}'; @@ -1315,7 +1302,7 @@ sub end_small { sub start_basefont { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { my $basesize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval); @@ -1329,7 +1316,7 @@ sub start_basefont { sub end_basefont { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { my $basesize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval); @@ -1344,7 +1331,7 @@ sub end_basefont { sub start_font { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { my $face=&Apache::lonxml::get_param('face',$parstack,$safeeval); if ($face!~/symbol/i) { if (($env{'browser.fontenhance'} eq 'on') || @@ -1363,7 +1350,7 @@ sub start_font { sub end_font { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { my $fontsize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval); @@ -1378,7 +1365,7 @@ sub end_font { sub start_strike { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { &Apache::lonxml::startredirection(); @@ -1389,7 +1376,7 @@ sub start_strike { sub end_strike { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring=&Apache::lonxml::endredirection(); @@ -1404,7 +1391,7 @@ sub end_strike { sub start_s { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { &Apache::lonxml::startredirection(); @@ -1415,7 +1402,7 @@ sub start_s { sub end_s { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring=&Apache::lonxml::endredirection(); @@ -1430,7 +1417,7 @@ sub end_s { sub start_sub { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\ensuremath{_{'; @@ -1441,7 +1428,7 @@ sub start_sub { sub end_sub { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}}'; @@ -1453,7 +1440,7 @@ sub end_sub { sub start_sup { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\ensuremath{^{'; @@ -1464,7 +1451,7 @@ sub start_sup { sub end_sup { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '}}'; @@ -1476,7 +1463,7 @@ sub end_sup { sub start_hr { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # End enclosing para. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $LaTeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0); @@ -1506,7 +1493,7 @@ sub start_hr { sub end_hr { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } return $currentstring; @@ -1524,7 +1511,7 @@ sub end_hr { sub start_div { my ($target,$token, $tagstack, $parstack, $parser, $safeeval) = @_; my $currentstring = &end_p(); # Close enclosing para. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } if ($target eq 'tex') { @@ -1537,10 +1524,6 @@ sub start_div { if ($align eq 'center') { $currentstring .= '\begin{center}'; $endstring = '\end{center}'; - if (&is_inside_of($tagstack, "table")) { - $currentstring = ¢er_correction().$currentstring; - #$endstring .= ¢er_correction(); - } } elsif ($align eq 'right') { $currentstring .= '\begin{flushright}'; @@ -1561,7 +1544,7 @@ sub start_div { sub end_div { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } if ($target eq 'tex') { @@ -1576,7 +1559,7 @@ sub end_div { sub start_a { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval, undef,1); $currentstring=&Apache::lonenc::encrypt_ref($token,{'href'=>$href}); @@ -1598,7 +1581,7 @@ sub start_a { sub end_a { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } return $currentstring; @@ -1608,7 +1591,7 @@ sub end_a { sub start_li { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0); @@ -1639,7 +1622,7 @@ sub start_li { sub end_li { my ($target,$token) = @_; my $currentstring = &end_p(); # In case there's a

in the

  • - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } return $currentstring; @@ -1649,7 +1632,7 @@ sub end_li { sub start_u { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { &Apache::lonxml::startredirection(); @@ -1660,7 +1643,7 @@ sub start_u { sub end_u { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring=&Apache::lonxml::endredirection(); @@ -1675,7 +1658,7 @@ sub end_u { sub start_ul { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off enclosing list. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $TeXtype=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0); @@ -1704,7 +1687,7 @@ sub start_ul { sub end_ul { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = '\end{itemize} \renewcommand{\labelitemi}{$\bullet$}'. @@ -1719,7 +1702,7 @@ sub end_ul { sub start_menu { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $currentstring = " \\begin{itemize} "; @@ -1730,7 +1713,7 @@ sub start_menu { sub end_menu { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = " \\end{itemize}"; @@ -1742,7 +1725,7 @@ sub end_menu { sub start_dir { my ($target,$token) = @_; my $currentstring = &end_p(); # In case there's a

    prior to the list. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= " \\begin{itemize} "; @@ -1753,7 +1736,7 @@ sub start_dir { sub end_dir { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = " \\end{itemize}"; @@ -1765,7 +1748,7 @@ sub end_dir { sub start_ol { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # In case there's a

    prior to the list. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $Apache::londefdef::list_index=0; @@ -1804,7 +1787,7 @@ sub start_ol { sub end_ol { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = '\end{enumerate}\renewcommand{\labelenumi}{\arabic{enumi}.}'. @@ -1819,7 +1802,7 @@ sub end_ol { sub start_dl { my ($target,$token) = @_; my $currentstring = &end_p(); # In case there's a

    unclosed prior to the list. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\begin{description}'; @@ -1835,7 +1818,7 @@ sub start_dl { sub end_dl { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { if ($Apache::londefdef::DT[-1]) { &end_dt(@_); } @@ -1857,7 +1840,7 @@ sub end_dl { sub start_dt { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring=''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { if ($Apache::londefdef::DT[-1]) { &end_dt(@_); } @@ -1872,7 +1855,7 @@ sub start_dt { sub end_dt { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { if ($Apache::londefdef::DT[-1]) { @@ -1895,7 +1878,7 @@ sub item_cleanup { sub start_dd { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { if ($Apache::londefdef::DT[-1]) { &end_dt(@_); } @@ -1914,7 +1897,7 @@ sub start_dd { sub end_dd { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $Apache::londefdef::description[-1]->[-1].= @@ -1935,7 +1918,7 @@ sub start_table { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $textwidth = ''; my $currentstring = &end_p(); - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $aa = {}; @@ -1961,16 +1944,11 @@ sub start_table { # width either comes forced from the TeXwidth or the width parameters. # in either case it can be a percentage or absolute width. - # in the width case we ignore absolute width + my $TeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0); - if (!defined($TeXwidth)) { - my $htmlwidth = &Apache::lonxml::get_param('width',$parstack, - $safeeval,undef,1); - if ($htmlwidth =~ /%/) { - $TeXwidth = $htmlwidth; - } else { - $TeXwidth = $textwidth; - } + if (not defined $TeXwidth) { + $TeXwidth = &Apache::lonxml::get_param('width',$parstack,$safeeval,undef,1); + } else { $Apache::londefdef::table[-1]{'forcedtablewidth'} = 1; } @@ -2018,12 +1996,13 @@ sub start_table { sub end_table { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { my $inmemory = ''; my $output = ''; my $WARNING=''; + # &debug_dump_table($Apache::londefdef::table[-1]); #width of columns from TeXwidth attributes for (my $in=0;$in<=$Apache::londefdef::table[-1]{'row_number'};$in++) { @@ -2208,21 +2187,73 @@ sub end_table { $header_of_table .= '}'; #fill the table for (my $in=0;$in<=$Apache::londefdef::table[-1]{'row_number'};$in++) { + my $have_rowspan = 0; for (my $jn=0;$jn<=$#fwidth;$jn++) { + # + # Do the appropriate magic if this has a colspan + # + my $colspan = $Apache::londefdef::table[-1]{'colspan'}[$in][$jn]; + if ($colspan > 1) { + $output .= '\multicolumn{'. + $colspan + .'}{|l|}{'; + } + my $rowspan = $Apache::londefdef::table[-1]{'rowspan'}[$in][$jn]; + + # Start a rowspan if necessary: + + if ($rowspan > 1) { + $have_rowspan++; + $output .= '\multirow{'.$rowspan.'}[0]{'.$fwidth[$jn].'mm}{'; + } + if (($rowspan eq '^') || ($rowspan eq '_')) { + $have_rowspan++; + } + if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') { - $output.=¢er_correction().'\begin{center}'; + # $output.='\vspace*{-6 mm}\begin{center}'; + $output.='\begin{center}'; } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') { $output.=' \hfill \llap{' } $output.=$Apache::londefdef::table[-1]{'content'}[$in][$jn]; if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') { - $output.='\end{center}';#.¢er_correction(); + # $output.='\end{center}\vspace*{-6 mm}'; + $output.='\end{center}'; } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') { $output.='} '; } + # Close off any open multirow: + + if ($rowspan > 1) { + $output .= '}'; + } + # Close off the colspan... + # + if ($colspan > 1) { + $output .= '}'; + $jn += $colspan-1; # Adjust for number of rows really left. + } if ($jn!=$#fwidth) {$output.=' '.$Apache::londefdef::table[-1]{'vinc'};} } - $output.=' \\\\ '.$Apache::londefdef::table[-1]{'hinc'}.' '; + # If have_rowspan > 0, and borders are on, then + # we need to do more than put an \hline at the bottom of row. + # we need to do the appropriate \cline to ensure that + # the spanned rows don't have \hlines through them. + + if (($Apache::londefdef::table[-1]{'hinc'} =~ /\\hline/) && $have_rowspan) { + $output .= ' \\\\ '; + for (my $jn=0; $jn<=$#fwidth;$jn++) { + my $rowspan = $Apache::londefdef::table[-1]{'rowspan'}[$in][$jn]; + if (($rowspan <= 1) || ($rowspan eq '_')) { + my $column = $jn+1; + $output .= '\cline{'.$column.'-'.$column.'} '; + } + } + + } else { + $output.=' \\\\ '.$Apache::londefdef::table[-1]{'hinc'}.' '; + } } # Note that \newline destroys alignment env's produced by e.g.

    # $Apache::londefdef::table[-1]{'output'} .= $header_of_table.$Apache::londefdef::table[-1]{'hinc'}.$output.'\end{tabular}\strut\newline\strut '; @@ -2270,7 +2301,7 @@ sub end_table { sub start_tr { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $Apache::londefdef::table[-1]{'row_number'}++; @@ -2298,7 +2329,7 @@ sub start_tr { sub end_tr { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close any pending

    in the row. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { if ($Apache::londefdef::TD_redirection) { @@ -2320,7 +2351,7 @@ sub end_tr { sub start_td { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $Apache::londefdef::TD_redirection = 1; @@ -2366,8 +2397,42 @@ sub start_td_tex { sub end_td_tex { my ($parstack,$parser,$safeeval) = @_; - my $current_row = $Apache::londefdef::table[-1]{'row_number'}; - my $data=&Apache::lonxml::endredirection(); + my $current_row = $Apache::londefdef::table[-1]{'row_number'}; + my $current_column = $Apache::londefdef::table[-1]{'counter_columns'}; + my $data = &Apache::lonxml::endredirection(); + + # The rowspan array of the table indicates which cells are part of a span. + # n indicates the start of a span set of n rows. + # ^ indicates a cell that continues a span set. + # _ indicates the cell is at the bottom of a span set. + # If this and subsequent cells are part of a rowspan, we must + # push along the row until we find one that is not. + + while ((defined $Apache::londefdef::table[-1]{'rowspan'}[$current_row] [$current_column]) + && ($Apache::londefdef::table[-1]{'rowspan'}[$current_row][$current_column] =~ /[\^\_]/)) { + # Part of a span. + push @ {$Apache::londefdef::table[-1]{'content'}[-1]}, ''; + $current_column++; + } + $Apache::londefdef::table[-1]{'counter_columns'} = $current_column; + + + + my $rowspan = &Apache::lonxml::get_param('rowspan', $parstack, $safeeval, undef, 0); + if (!$rowspan) { + $rowspan = 1; + } + + + + $Apache::londefdef::table[-1]{'rowspan'}[$current_row][$current_column] = $rowspan; + for (my $i = 1; $i < $rowspan; $i++) { + $Apache::londefdef::table[-1]{'rowspan'}[$current_row+$i][$current_column] = '^'; + if ($i == ($rowspan-1)) { + $Apache::londefdef::table[-1]{'rowspan'}[$current_row+$i][$current_column] = '_'; + } + } + my $TeXwidth=&Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0); if (defined $TeXwidth) { push @ {$Apache::londefdef::table[-1]{'objectlen'}[$Apache::londefdef::table[-1]{'row_number'}] },'0'; @@ -2456,14 +2521,41 @@ sub end_td_tex { } # Should be be killing off the 'include' elements as they're used up? + push @ {$Apache::londefdef::table[-1]{'content'}[-1] },$data; + + # Get the column and row spans. + # Colspan can be done via \multicolumn if I can figure out the data structs. + + my $colspan = &Apache::lonxml::get_param('colspan', $parstack, $safeeval, undef, 0); + if (!$colspan) { + $colspan = 1; + } + + + # the colspan array will indicate how many columns will be spanned by this + # cell..this requires that counter_columns also be adjusted accordingly + # so that the next bunch of text goes in the right cell. Note that since + # counter_columns is incremented in the start_td_tex, we adjust by colspan-1. + # + + $Apache::londefdef::table[-1]{'colspan'}[$current_row][$current_column] = $colspan; + $Apache::londefdef::table[-1]{'counter_columns'} += $colspan -1; + + # Put empty text in spanned cols. + + for (my $i = 0; $i < ($colspan -1); $i++) { + push @ {$Apache::londefdef::table[-1]{'content'}[-1] },''; + } + + return ''; } sub end_td { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $Apache::londefdef::TD_redirection =0; @@ -2476,7 +2568,7 @@ sub end_td { sub start_th { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $Apache::londefdef::TD_redirection = 1; @@ -2592,7 +2684,7 @@ sub end_th_tex { sub end_th { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close any open

    in the row. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $Apache::londefdef::TD_redirection =0; @@ -2616,9 +2708,7 @@ sub start_img { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval, undef,1); - if (! $src && - ($target eq 'web' || $target eq 'webgrade' || $target eq 'tex') - ) { + if (not $src and ($target eq 'web' or $target eq 'tex')) { my $inside = &Apache::lonxml::get_all_text("/img",$parser,$style); return ''; } @@ -2628,7 +2718,7 @@ sub start_img { # Render unto browsers that which are the browser's... - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { if ($env{'browser.imagesuppress'} ne 'on') { $currentstring.=&Apache::lonenc::encrypt_ref($token,{'src'=>$src}); } else { @@ -2655,9 +2745,8 @@ sub start_img { $safeeval, undef,1)); if(!$align) { - # disabled for now see BUG#4535 if (&is_inside_of($tagstack, "table")) { - $align = "top"; # Force top of image to top of table cell + $align = "right"; # Force wraptext use. } else { $align = "bottom"; # This is html's default so it's ours too. } @@ -2820,7 +2909,7 @@ sub start_img { sub end_img { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = ''; @@ -2838,7 +2927,7 @@ sub start_applet { undef,1); &Apache::lonxml::extlink($archive); my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { if ($env{'browser.appletsuppress'} ne 'on') { $currentstring = &Apache::lonenc::encrypt_ref($token, {'code'=>$code, @@ -2871,7 +2960,7 @@ sub start_applet { sub end_applet { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { } @@ -2884,7 +2973,7 @@ sub start_embed { my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1); &Apache::lonxml::extlink($src); my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { if ($env{'browser.embedsuppress'} ne 'on') { $currentstring=&Apache::lonenc::encrypt_ref($token,{'src'=>$src}); } else { @@ -2903,7 +2992,7 @@ sub start_embed { sub end_embed { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { } @@ -2923,7 +3012,7 @@ sub start_param { my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1); &Apache::lonxml::extlink($src); my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { my %toconvert; my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1); if ($src) { $toconvert{'src'}= $src; } @@ -2942,7 +3031,7 @@ sub start_param { sub end_param { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { } @@ -2980,7 +3069,7 @@ sub end_allow { sub start_frameset { my ($target,$token) = @_; my $currentstring = ''; # Close any pending para. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { if (!$Apache::lonxml::registered && $env{'request.state'} eq 'published') { $currentstring.=''. @@ -3016,7 +3105,7 @@ sub start_frameset { sub end_frameset { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3026,7 +3115,7 @@ sub end_frameset { sub start_xmp { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\begin{verbatim}'; @@ -3037,7 +3126,7 @@ sub start_xmp { sub end_xmp { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '\end{verbatim}'; @@ -3049,7 +3138,7 @@ sub end_xmp { sub start_pre { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # close off pending

    - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= '\begin{verbatim}'; @@ -3060,7 +3149,7 @@ sub start_pre { sub end_pre { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= '\end{verbatim}'; @@ -3072,7 +3161,7 @@ sub end_pre { sub start_insert { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { my $display = &Apache::lonxml::get_param('display',$parstack,$safeeval,undef,1); $currentstring .= ''.$display.'';; } @@ -3082,7 +3171,7 @@ sub start_insert { sub end_insert { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= ''; } return $currentstring; @@ -3092,7 +3181,7 @@ sub end_insert { sub start_externallink { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { my $display = &Apache::lonxml::get_param('display',$parstack,$safeeval,undef,1); $currentstring .= ''.$display.'';; } @@ -3102,7 +3191,7 @@ sub start_externallink { sub end_externallink { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= ''; } return $currentstring; @@ -3132,7 +3221,7 @@ sub end_blankspace { sub start_abbr { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3141,7 +3230,7 @@ sub start_abbr { sub end_abbr { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3151,7 +3240,7 @@ sub end_abbr { sub start_acronym { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3160,7 +3249,7 @@ sub start_acronym { sub end_acronym { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3170,7 +3259,7 @@ sub end_acronym { sub start_area { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3179,7 +3268,7 @@ sub start_area { sub end_area { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3189,7 +3278,7 @@ sub end_area { sub start_base { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3198,7 +3287,7 @@ sub start_base { sub end_base { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3208,7 +3297,7 @@ sub end_base { sub start_bdo { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3217,7 +3306,7 @@ sub start_bdo { sub end_bdo { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3227,7 +3316,7 @@ sub end_bdo { sub start_bgsound { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3236,7 +3325,7 @@ sub start_bgsound { sub end_bgsound { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3246,7 +3335,7 @@ sub end_bgsound { sub start_blink { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3255,7 +3344,7 @@ sub start_blink { sub end_blink { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3265,7 +3354,7 @@ sub end_blink { sub start_blockquote { my ($target,$token) = @_; my $currentstring = &end_p(); # Close any unclosed

    - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } return $currentstring; @@ -3274,7 +3363,7 @@ sub start_blockquote { sub end_blockquote { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3284,7 +3373,7 @@ sub end_blockquote { sub start_button { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3293,7 +3382,7 @@ sub start_button { sub end_button { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3303,7 +3392,7 @@ sub end_button { sub start_caption { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3312,7 +3401,7 @@ sub start_caption { sub end_caption { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3322,7 +3411,7 @@ sub end_caption { sub start_col { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3331,7 +3420,7 @@ sub start_col { sub end_col { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3341,7 +3430,7 @@ sub end_col { sub start_colgroup { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3350,7 +3439,7 @@ sub start_colgroup { sub end_colgroup { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3360,7 +3449,7 @@ sub end_colgroup { sub start_del { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3369,7 +3458,7 @@ sub start_del { sub end_del { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3379,7 +3468,7 @@ sub end_del { sub start_fieldset { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3388,7 +3477,7 @@ sub start_fieldset { sub end_fieldset { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3398,7 +3487,7 @@ sub end_fieldset { sub start_frame { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3407,7 +3496,7 @@ sub start_frame { sub end_frame { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3417,7 +3506,7 @@ sub end_frame { sub start_iframe { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3426,7 +3515,7 @@ sub start_iframe { sub end_iframe { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3436,7 +3525,7 @@ sub end_iframe { sub start_ins { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3445,7 +3534,7 @@ sub start_ins { sub end_ins { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3455,7 +3544,7 @@ sub end_ins { sub start_isindex { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3464,7 +3553,7 @@ sub start_isindex { sub end_isindex { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3474,7 +3563,7 @@ sub end_isindex { sub start_keygen { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3483,7 +3572,7 @@ sub start_keygen { sub end_keygen { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3493,7 +3582,7 @@ sub end_keygen { sub start_label { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3502,7 +3591,7 @@ sub start_label { sub end_label { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3512,7 +3601,7 @@ sub end_label { sub start_layer { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3521,7 +3610,7 @@ sub start_layer { sub end_layer { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3531,7 +3620,7 @@ sub end_layer { sub start_legend { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3540,7 +3629,7 @@ sub start_legend { sub end_legend { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3562,7 +3651,7 @@ sub start_link { sub end_link { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3572,7 +3661,7 @@ sub end_link { sub start_marquee { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3581,7 +3670,7 @@ sub start_marquee { sub end_marquee { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3591,7 +3680,7 @@ sub end_marquee { sub start_multicol { my ($target,$token) = @_; my $currentstring = &end_p(); # Close any pending

    - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } return $currentstring; @@ -3600,7 +3689,7 @@ sub start_multicol { sub end_multicol { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3610,7 +3699,7 @@ sub end_multicol { sub start_nobr { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $currentstring='\mbox{'; @@ -3621,7 +3710,7 @@ sub start_nobr { sub end_nobr { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring='}'; @@ -3633,7 +3722,7 @@ sub end_nobr { sub start_noembed { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3642,7 +3731,7 @@ sub start_noembed { sub end_noembed { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3652,7 +3741,7 @@ sub end_noembed { sub start_noframes { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3661,7 +3750,7 @@ sub start_noframes { sub end_noframes { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3671,7 +3760,7 @@ sub end_noframes { sub start_nolayer { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3680,7 +3769,7 @@ sub start_nolayer { sub end_nolayer { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3690,7 +3779,7 @@ sub end_nolayer { sub start_noscript { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3699,7 +3788,7 @@ sub start_noscript { sub end_noscript { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3709,7 +3798,7 @@ sub end_noscript { sub start_object { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3718,7 +3807,7 @@ sub start_object { sub end_object { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3728,7 +3817,7 @@ sub end_object { sub start_optgroup { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3737,7 +3826,7 @@ sub start_optgroup { sub end_optgroup { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3747,7 +3836,7 @@ sub end_optgroup { sub start_samp { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $currentstring='\texttt{'; @@ -3758,7 +3847,7 @@ sub start_samp { sub end_samp { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring='}'; @@ -3770,7 +3859,7 @@ sub end_samp { sub start_server { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3779,7 +3868,7 @@ sub start_server { sub end_server { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3789,7 +3878,7 @@ sub end_server { sub start_spacer { my ($target,$token) = @_; my $currentstring = &end_p(); # Close off any open

    tag. - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring .= $token->[4]; } return $currentstring; @@ -3798,7 +3887,7 @@ sub start_spacer { sub end_spacer { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3808,7 +3897,7 @@ sub end_spacer { sub start_span { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3817,7 +3906,7 @@ sub start_span { sub end_span { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3827,7 +3916,7 @@ sub end_span { sub start_tbody { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3836,7 +3925,7 @@ sub start_tbody { sub end_tbody { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3846,7 +3935,7 @@ sub end_tbody { sub start_tfoot { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3855,7 +3944,7 @@ sub start_tfoot { sub end_tfoot { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3865,7 +3954,7 @@ sub end_tfoot { sub start_thead { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3874,7 +3963,7 @@ sub start_thead { sub end_thead { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3884,7 +3973,7 @@ sub end_thead { sub start_var { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $currentstring = '\textit{'; @@ -3895,7 +3984,7 @@ sub start_var { sub end_var { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = '}'; @@ -3907,7 +3996,7 @@ sub end_var { sub start_wbr { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[4]; } return $currentstring; @@ -3916,7 +4005,7 @@ sub start_wbr { sub end_wbr { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = $token->[2]; } return $currentstring; @@ -3925,7 +4014,7 @@ sub end_wbr { #-- tag sub start_hideweboutput { my ($target,$token) = @_; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { &Apache::lonxml::startredirection(); } return ''; @@ -3934,7 +4023,7 @@ sub start_hideweboutput { sub end_hideweboutput { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { $currentstring = &Apache::lonxml::endredirection(); } return '';