[LON-CAPA-cvs] cvs: loncom(version_2_1_X) /xml londefdef.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 29 Mar 2006 22:54:11 -0000


This is a MIME encoded message

--albertel1143672851
Content-Type: text/plain

albertel		Wed Mar 29 17:54:11 2006 EDT

  Modified files:              (Branch: version_2_1_X)
    /loncom/xml	londefdef.pm 
  Log:
  -backport 1.325
  
  
  
--albertel1143672851
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060329175411.txt"

Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.302.2.3 loncom/xml/londefdef.pm:1.302.2.4
--- loncom/xml/londefdef.pm:1.302.2.3	Fri Jan 13 16:05:57 2006
+++ loncom/xml/londefdef.pm	Wed Mar 29 17:54:10 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.302.2.3 2006/01/13 21:05:57 albertel Exp $
+# $Id: londefdef.pm,v 1.302.2.4 2006/03/29 22:54:10 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -146,7 +146,7 @@
 sub start_tthoption {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
     my $result;
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	my $inside = &Apache::lonxml::get_all_text("/tthoption",$parser,
 						   $style);
 	$inside=~s/^\s*//;
@@ -231,7 +231,7 @@
 sub start_map {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -240,7 +240,7 @@
 sub end_map {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -250,7 +250,7 @@
 sub start_select {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     }  elsif ($target eq 'tex') {
 	$Apache::londefdef::select=0;
@@ -261,7 +261,7 @@
 sub end_select {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -271,7 +271,7 @@
 sub start_option {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	$Apache::londefdef::select++;
@@ -287,7 +287,7 @@
 sub end_option {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     }  elsif ($target eq 'tex') {
 	$currentstring='}';
@@ -299,7 +299,7 @@
 sub start_input {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -308,7 +308,7 @@
 sub end_input {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -318,7 +318,7 @@
 sub start_textarea {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -327,7 +327,7 @@
 sub end_textarea {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -337,7 +337,7 @@
 sub start_form {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -346,7 +346,7 @@
 sub end_form {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -387,7 +387,7 @@
 sub start_meta {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	my $args='';
 	if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }
 	if ($args eq '') {
@@ -436,7 +436,7 @@
 sub end_meta {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	my $args='';
 	if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }
 	if ($args ne '') {
@@ -601,7 +601,7 @@
 sub start_center {
     my ($target,$token,$tagstack) = @_;
     my $currentstring = &end_p();	# Close off any prior para.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];     
     } elsif ($target eq 'tex') {
 	if (&is_inside_of($tagstack, "table")) {
@@ -615,7 +615,7 @@
 sub end_center {
     my ($target,$token,$tagstack) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
 	$currentstring = '\end{center}';  
@@ -631,7 +631,7 @@
 sub start_b {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	&disable_para();
@@ -643,7 +643,7 @@
 sub end_b {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
 	&enable_para();
@@ -657,7 +657,7 @@
 sub start_strong {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	&disable_para();
@@ -669,7 +669,7 @@
 sub end_strong {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {	
+    if ($target eq 'web' || $target eq 'webgrade') {	
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
 	&enable_para();
@@ -682,7 +682,7 @@
 sub start_h1 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close off any prior para.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	my $pre;
@@ -707,7 +707,7 @@
 sub end_h1 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	my $post='\vskip 0 mm ';
@@ -731,7 +731,7 @@
 sub start_h2 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close off any prior para.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	my $pre;
@@ -753,7 +753,7 @@
 sub end_h2 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	my $post='\vskip 0 mm ';
@@ -774,7 +774,7 @@
 sub start_h3 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close off any prior para.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	my $pre;
@@ -796,7 +796,7 @@
 sub end_h3 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	my $post='\vskip 0 mm ';
@@ -817,7 +817,7 @@
 sub start_h4 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close off any prior para.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	my $pre;
@@ -839,7 +839,7 @@
 sub end_h4 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	my $post='\vskip 0 mm ';
@@ -860,7 +860,7 @@
 sub start_h5 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close off any prior paras.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	my $pre;
@@ -882,7 +882,7 @@
 sub end_h5 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	my $post='\vskip 0 mm ';
@@ -903,7 +903,7 @@
 sub start_h6 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close off any prior paras.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	my $pre;
@@ -925,7 +925,7 @@
 sub end_h6 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	my $post='\vskip 0 mm ';
@@ -946,7 +946,7 @@
 sub start_cite {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\textit{';
@@ -957,7 +957,7 @@
 sub end_cite {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -969,7 +969,7 @@
 sub start_i {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\textit{';
@@ -980,7 +980,7 @@
 sub end_i {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -992,7 +992,7 @@
 sub start_address {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\textit{';
@@ -1003,7 +1003,7 @@
 sub end_address {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -1015,7 +1015,7 @@
 sub start_dfn {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\textit{';
@@ -1026,7 +1026,7 @@
 sub end_dfn {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -1038,7 +1038,7 @@
 sub start_tt {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\texttt{';
@@ -1049,7 +1049,7 @@
 sub end_tt {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -1061,7 +1061,7 @@
 sub start_kbd {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\texttt{';
@@ -1072,7 +1072,7 @@
 sub end_kbd {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -1084,7 +1084,7 @@
 sub start_code {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\texttt{';
@@ -1095,7 +1095,7 @@
 sub end_code {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -1107,7 +1107,7 @@
 sub start_em {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\emph{';
@@ -1118,7 +1118,7 @@
 sub end_em {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -1130,7 +1130,7 @@
 sub start_q {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\emph{';
@@ -1141,7 +1141,7 @@
 sub end_q {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -1180,7 +1180,7 @@
 sub start_p {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= &end_p();	# close off prior para if in progress.
 	$currentstring .= $token->[4];
 	if (! ($currentstring =~ /\//)) {
@@ -1231,7 +1231,7 @@
 sub start_br {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	my @tempo=@$tagstack;
@@ -1259,7 +1259,7 @@
 sub end_br {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     }
     return $currentstring;
@@ -1269,7 +1269,7 @@
 sub start_big {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '{\large ';
@@ -1280,7 +1280,7 @@
 sub end_big {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -1292,7 +1292,7 @@
 sub start_small {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '{\footnotesize ';
@@ -1303,7 +1303,7 @@
 sub end_small {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}';
@@ -1315,7 +1315,7 @@
 sub start_basefont {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	my $basesize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval);
@@ -1329,7 +1329,7 @@
 sub end_basefont {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	my $basesize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval);
@@ -1344,7 +1344,7 @@
 sub start_font {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	my $face=&Apache::lonxml::get_param('face',$parstack,$safeeval);
 	if ($face!~/symbol/i) {
 	    if (($env{'browser.fontenhance'} eq 'on') || 
@@ -1363,7 +1363,7 @@
 sub end_font {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     }  elsif ($target eq 'tex') {
 	my $fontsize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval);
@@ -1378,7 +1378,7 @@
 sub start_strike {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	&Apache::lonxml::startredirection();
@@ -1389,7 +1389,7 @@
 sub end_strike {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring=&Apache::lonxml::endredirection();
@@ -1404,7 +1404,7 @@
 sub start_s {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	&Apache::lonxml::startredirection();
@@ -1415,7 +1415,7 @@
 sub end_s {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring=&Apache::lonxml::endredirection();
@@ -1430,7 +1430,7 @@
 sub start_sub {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\ensuremath{_{';
@@ -1441,7 +1441,7 @@
 sub end_sub {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}}';
@@ -1453,7 +1453,7 @@
 sub start_sup {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\ensuremath{^{';
@@ -1464,7 +1464,7 @@
 sub end_sup {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '}}';
@@ -1476,7 +1476,7 @@
 sub start_hr {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# End enclosing para.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	my $LaTeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0);
@@ -1506,7 +1506,7 @@
 sub end_hr {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     }
     return $currentstring;
@@ -1524,7 +1524,7 @@
 sub start_div {
     my ($target,$token, $tagstack, $parstack, $parser, $safeeval) = @_;
     my $currentstring = &end_p();	# Close enclosing para.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } 
     if ($target eq 'tex') {
@@ -1561,7 +1561,7 @@
 sub end_div {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     }
     if ($target eq 'tex') {
@@ -1576,7 +1576,7 @@
 sub start_a {
     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);
 	$currentstring=&Apache::lonenc::encrypt_ref($token,{'href'=>$href});
@@ -1598,7 +1598,7 @@
 sub end_a {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     }
     return $currentstring;
@@ -1608,7 +1608,7 @@
 sub start_li {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0);
@@ -1639,7 +1639,7 @@
 sub end_li {
     my ($target,$token) = @_;
     my $currentstring = &end_p();	# In case there's a <p> in the <li>
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];     
     } 
     return $currentstring;
@@ -1649,7 +1649,7 @@
 sub start_u {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	&Apache::lonxml::startredirection();
@@ -1660,7 +1660,7 @@
 sub end_u {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring=&Apache::lonxml::endredirection();
@@ -1675,7 +1675,7 @@
 sub start_ul {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close off enclosing list.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];     
     } elsif ($target eq 'tex') {
 	my $TeXtype=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0);
@@ -1704,7 +1704,7 @@
 sub end_ul {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
 	$currentstring = '\end{itemize} \renewcommand{\labelitemi}{$\bullet$}'.
@@ -1719,7 +1719,7 @@
 sub start_menu {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	$currentstring = " \\begin{itemize} ";  
@@ -1730,7 +1730,7 @@
 sub end_menu {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
 	$currentstring = " \\end{itemize}";  
@@ -1742,7 +1742,7 @@
 sub start_dir {
     my ($target,$token) = @_;
     my $currentstring = &end_p();	# In case there's a <p> prior to the list.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];     
     } elsif ($target eq 'tex') {
 	$currentstring .= " \\begin{itemize} ";  
@@ -1753,7 +1753,7 @@
 sub end_dir {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
 	$currentstring = " \\end{itemize}";  
@@ -1765,7 +1765,7 @@
 sub start_ol {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# In case there's a <p> prior to the list.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];     
     } elsif ($target eq 'tex') {
 	$Apache::londefdef::list_index=0;
@@ -1804,7 +1804,7 @@
 sub end_ol {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
 	$currentstring = '\end{enumerate}\renewcommand{\labelenumi}{\arabic{enumi}.}'.
@@ -1819,7 +1819,7 @@
 sub start_dl {
     my ($target,$token) = @_;
     my $currentstring = &end_p();	# In case there's a <p> unclosed prior to the list.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];     
     } elsif ($target eq 'tex') {
 	$currentstring .= '\begin{description}';
@@ -1835,7 +1835,7 @@
 sub end_dl {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
 	if ($Apache::londefdef::DT[-1]) { &end_dt(@_); }
@@ -1857,7 +1857,7 @@
 sub start_dt {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring='';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	if ($Apache::londefdef::DT[-1]) { &end_dt(@_); }
@@ -1872,7 +1872,7 @@
 sub end_dt {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } elsif ($target eq 'tex') {
 	if ($Apache::londefdef::DT[-1]) {
@@ -1895,7 +1895,7 @@
 sub start_dd {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	if ($Apache::londefdef::DT[-1]) { &end_dt(@_); }
@@ -1914,7 +1914,7 @@
 sub end_dd {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     }  elsif ($target eq 'tex') {
 	$Apache::londefdef::description[-1]->[-1].=
@@ -1935,7 +1935,7 @@
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $textwidth = '';
     my $currentstring = &end_p();
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];     
     } elsif ($target eq 'tex') {
 	my $aa = {};
@@ -2018,7 +2018,7 @@
 sub end_table {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
 	my $inmemory = '';
@@ -2270,7 +2270,7 @@
 sub start_tr {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	$Apache::londefdef::table[-1]{'row_number'}++;
@@ -2298,7 +2298,7 @@
 sub end_tr {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close any pending <p> in the row.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];     
     } elsif ($target eq 'tex') {
 	if ($Apache::londefdef::TD_redirection) {
@@ -2320,7 +2320,7 @@
 sub start_td {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	$Apache::londefdef::TD_redirection = 1;
@@ -2463,7 +2463,7 @@
 sub end_td {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
         $Apache::londefdef::TD_redirection =0;
@@ -2476,7 +2476,7 @@
 sub start_th {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	$Apache::londefdef::TD_redirection = 1;
@@ -2592,7 +2592,7 @@
 sub end_th {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# Close any open <p> in the row.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];     
     } elsif ($target eq 'tex') {
         $Apache::londefdef::TD_redirection =0;
@@ -2616,7 +2616,9 @@
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
     my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval,
 					 undef,1);
-    if (not $src and ($target eq 'web' or $target eq 'tex')) { 
+    if (! $src && 
+	($target eq 'web' || $target eq 'webgrade' || $target eq 'tex')
+	) { 
 	my $inside = &Apache::lonxml::get_all_text("/img",$parser,$style);
 	return '';
     }
@@ -2626,7 +2628,7 @@
 
    # Render unto browsers that which are the browser's...
 
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	if ($env{'browser.imagesuppress'} ne 'on') {
 	    $currentstring.=&Apache::lonenc::encrypt_ref($token,{'src'=>$src});
 	} else {
@@ -2818,7 +2820,7 @@
 sub end_img {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring = '';
@@ -2836,7 +2838,7 @@
 					   undef,1);
     &Apache::lonxml::extlink($archive);
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	if ($env{'browser.appletsuppress'} ne 'on') {
 	    $currentstring = &Apache::lonenc::encrypt_ref($token,
 							  {'code'=>$code,
@@ -2869,7 +2871,7 @@
 sub end_applet {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];
     } elsif ($target eq 'tex') {
     } 
@@ -2882,7 +2884,7 @@
     my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
     &Apache::lonxml::extlink($src);
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	if ($env{'browser.embedsuppress'} ne 'on') {
 	    $currentstring=&Apache::lonenc::encrypt_ref($token,{'src'=>$src});
 	} else {
@@ -2901,7 +2903,7 @@
 sub end_embed {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {  
     } 
@@ -2921,7 +2923,7 @@
     my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
     &Apache::lonxml::extlink($src);
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	my %toconvert;
 	my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
 	if ($src) { $toconvert{'src'}= $src; }
@@ -2940,7 +2942,7 @@
 sub end_param {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];     
     } elsif ($target eq 'tex') {
     } 
@@ -2978,7 +2980,7 @@
 sub start_frameset {
     my ($target,$token) = @_;
     my $currentstring = '';	# Close any pending para.
-    if ($target eq 'web') { 
+    if ($target eq 'web' || $target eq 'webgrade') { 
 	if (!$Apache::lonxml::registered &&
 	    $env{'request.state'} eq 'published') {
 	    $currentstring.='<head>'.
@@ -3014,7 +3016,7 @@
 sub end_frameset {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];
     }
     return $currentstring;
@@ -3024,7 +3026,7 @@
 sub start_xmp {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\begin{verbatim}';
@@ -3035,7 +3037,7 @@
 sub end_xmp {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\end{verbatim}';
@@ -3047,7 +3049,7 @@
 sub start_pre {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = &end_p();	# close off pending <p>
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\begin{verbatim}';
@@ -3058,7 +3060,7 @@
 sub end_pre {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring .= '\end{verbatim}';
@@ -3070,7 +3072,7 @@
 sub start_insert {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	my $display = &Apache::lonxml::get_param('display',$parstack,$safeeval,undef,1);
 	$currentstring .= '<b>'.$display.'</b>';;
     }
@@ -3080,7 +3082,7 @@
 sub end_insert {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= '';
     }
     return $currentstring;
@@ -3090,7 +3092,7 @@
 sub start_externallink {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	my $display = &Apache::lonxml::get_param('display',$parstack,$safeeval,undef,1);
 	$currentstring .= '<b>'.$display.'</b>';;
     }
@@ -3100,7 +3102,7 @@
 sub end_externallink {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= '';
     }
     return $currentstring;
@@ -3130,7 +3132,7 @@
 sub start_abbr {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3139,7 +3141,7 @@
 sub end_abbr {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3149,7 +3151,7 @@
 sub start_acronym {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3158,7 +3160,7 @@
 sub end_acronym {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3168,7 +3170,7 @@
 sub start_area {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3177,7 +3179,7 @@
 sub end_area {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3187,7 +3189,7 @@
 sub start_base {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     }
     return $currentstring;
@@ -3196,7 +3198,7 @@
 sub end_base {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3206,7 +3208,7 @@
 sub start_bdo {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3215,7 +3217,7 @@
 sub end_bdo {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3225,7 +3227,7 @@
 sub start_bgsound {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3234,7 +3236,7 @@
 sub end_bgsound {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3244,7 +3246,7 @@
 sub start_blink {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3253,7 +3255,7 @@
 sub end_blink {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3263,7 +3265,7 @@
 sub start_blockquote {
     my ($target,$token) = @_;
     my $currentstring = &end_p();	# Close any unclosed <p>
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];     
     } 
     return $currentstring;
@@ -3272,7 +3274,7 @@
 sub end_blockquote {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3282,7 +3284,7 @@
 sub start_button {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3291,7 +3293,7 @@
 sub end_button {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3301,7 +3303,7 @@
 sub start_caption {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3310,7 +3312,7 @@
 sub end_caption {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3320,7 +3322,7 @@
 sub start_col {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3329,7 +3331,7 @@
 sub end_col {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3339,7 +3341,7 @@
 sub start_colgroup {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3348,7 +3350,7 @@
 sub end_colgroup {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3358,7 +3360,7 @@
 sub start_del {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3367,7 +3369,7 @@
 sub end_del {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3377,7 +3379,7 @@
 sub start_fieldset {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3386,7 +3388,7 @@
 sub end_fieldset {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3396,7 +3398,7 @@
 sub start_frame {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3405,7 +3407,7 @@
 sub end_frame {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3415,7 +3417,7 @@
 sub start_iframe {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3424,7 +3426,7 @@
 sub end_iframe {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3434,7 +3436,7 @@
 sub start_ins {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3443,7 +3445,7 @@
 sub end_ins {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3453,7 +3455,7 @@
 sub start_isindex {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3462,7 +3464,7 @@
 sub end_isindex {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3472,7 +3474,7 @@
 sub start_keygen {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3481,7 +3483,7 @@
 sub end_keygen {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3491,7 +3493,7 @@
 sub start_label {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3500,7 +3502,7 @@
 sub end_label {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3510,7 +3512,7 @@
 sub start_layer {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3519,7 +3521,7 @@
 sub end_layer {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3529,7 +3531,7 @@
 sub start_legend {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3538,7 +3540,7 @@
 sub end_legend {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3560,7 +3562,7 @@
 sub end_link {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3570,7 +3572,7 @@
 sub start_marquee {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3579,7 +3581,7 @@
 sub end_marquee {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3589,7 +3591,7 @@
 sub start_multicol {
     my ($target,$token) = @_;
     my $currentstring = &end_p();	# Close any pending <p>
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];     
     } 
     return $currentstring;
@@ -3598,7 +3600,7 @@
 sub end_multicol {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3608,7 +3610,7 @@
 sub start_nobr {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     }  elsif ($target eq 'tex') {
 	$currentstring='\mbox{';
@@ -3619,7 +3621,7 @@
 sub end_nobr {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     }   elsif ($target eq 'tex') {
 	$currentstring='}';
@@ -3631,7 +3633,7 @@
 sub start_noembed {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3640,7 +3642,7 @@
 sub end_noembed {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3650,7 +3652,7 @@
 sub start_noframes {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3659,7 +3661,7 @@
 sub end_noframes {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3669,7 +3671,7 @@
 sub start_nolayer {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3678,7 +3680,7 @@
 sub end_nolayer {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3688,7 +3690,7 @@
 sub start_noscript {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3697,7 +3699,7 @@
 sub end_noscript {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3707,7 +3709,7 @@
 sub start_object {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3716,7 +3718,7 @@
 sub end_object {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3726,7 +3728,7 @@
 sub start_optgroup {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3735,7 +3737,7 @@
 sub end_optgroup {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3745,7 +3747,7 @@
 sub start_samp {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	$currentstring='\texttt{';
@@ -3756,7 +3758,7 @@
 sub end_samp {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } elsif ($target eq 'tex') {
 	$currentstring='}';
@@ -3768,7 +3770,7 @@
 sub start_server {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3777,7 +3779,7 @@
 sub end_server {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3787,7 +3789,7 @@
 sub start_spacer {
     my ($target,$token) = @_;
     my $currentstring = &end_p();	# Close off any open <p> tag.
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring .= $token->[4];     
     } 
     return $currentstring;
@@ -3796,7 +3798,7 @@
 sub end_spacer {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3806,7 +3808,7 @@
 sub start_span {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3815,7 +3817,7 @@
 sub end_span {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3825,7 +3827,7 @@
 sub start_tbody {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3834,7 +3836,7 @@
 sub end_tbody {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3844,7 +3846,7 @@
 sub start_tfoot {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3853,7 +3855,7 @@
 sub end_tfoot {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3863,7 +3865,7 @@
 sub start_thead {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3872,7 +3874,7 @@
 sub end_thead {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3882,7 +3884,7 @@
 sub start_var {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } elsif ($target eq 'tex') {
 	$currentstring = '\textit{'; 
@@ -3893,7 +3895,7 @@
 sub end_var {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];
     } elsif ($target eq 'tex') {
 	$currentstring = '}'; 
@@ -3905,7 +3907,7 @@
 sub start_wbr {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[4];     
     } 
     return $currentstring;
@@ -3914,7 +3916,7 @@
 sub end_wbr {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = $token->[2];    
     } 
     return $currentstring;
@@ -3923,7 +3925,7 @@
 #-- <hideweboutput> tag
 sub start_hideweboutput {
     my ($target,$token) = @_;
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	&Apache::lonxml::startredirection();     
     } 
     return '';
@@ -3932,7 +3934,7 @@
 sub end_hideweboutput {
     my ($target,$token) = @_;
     my $currentstring = '';
-    if ($target eq 'web') {
+    if ($target eq 'web' || $target eq 'webgrade') {
 	$currentstring = &Apache::lonxml::endredirection();    
     } 
     return '';

--albertel1143672851--