--- loncom/homework/bridgetask.pm 2006/03/29 04:53:42 1.127 +++ loncom/homework/bridgetask.pm 2006/03/29 13:24:43 1.128 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.127 2006/03/29 04:53:42 albertel Exp $ +# $Id: bridgetask.pm,v 1.128 2006/03/29 13:24:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1874,8 +1874,11 @@ 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 inside of <".$tagstack->[-2].">"); + &Apache::lonxml::get_all_text('/introparagraph',$parser,$style); } } @@ -1884,7 +1887,7 @@ sub start_IntroParagraph { sub end_IntroParagraph { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; - if ($target eq 'webgrade') { + if ($tagstack->[-2] eq 'Task' && $target eq 'webgrade') { my $result = &Apache::lonxml::endredirection(); } }