--- loncom/homework/bridgetask.pm	2006/03/28 22:03:47	1.126
+++ loncom/homework/bridgetask.pm	2006/03/29 23:06:22	1.132
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.126 2006/03/28 22:03:47 albertel Exp $
+# $Id: bridgetask.pm,v 1.132 2006/03/29 23:06:22 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -974,7 +974,7 @@ DONEBUTTON
 	    &Apache::structuretags::finalize_storage();
 	}
     } elsif ($target eq 'webgrade') {
-	$result.="</div>\n<hr />";
+	$result.="</div>";
 	#$result.='<input type="submit" name="next" value="'.
 	#    &mt('Save &amp; Next').'" /> ';
 	#$result.='<input type="submit" name="end" value="'.
@@ -1874,7 +1874,10 @@ sub start_IntroParagraph {
 	if ($tagstack->[-2] eq 'Dimension') {
 	    $dimension{'intro'}=&Apache::lonxml::get_all_text('/introparagraph',$parser,$style);
 	
-	} elsif ($target eq 'webgrade') {
+	} elsif ($tagstack->[-2] eq 'Task' && $target eq 'webgrade') {
+	    &Apache::lonxml::startredirection();
+	} else {
+	    &Apache::lonxml::error("Invalid use of <IntroParagraph> inside of <".$tagstack->[-2].">");
 	    &Apache::lonxml::get_all_text('/introparagraph',$parser,$style);
 	}
 	
@@ -1883,6 +1886,10 @@ sub start_IntroParagraph {
 }
 
 sub end_IntroParagraph {
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+    if ($tagstack->[-2] eq 'Task' && $target eq 'webgrade') {
+	my $result = &Apache::lonxml::endredirection();
+    }
 }
 
 sub start_Instance {