--- loncom/xml/lonxml.pm 2005/03/23 22:02:32 1.367 +++ loncom/xml/lonxml.pm 2005/03/31 15:55:47 1.368 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.367 2005/03/23 22:02:32 albertel Exp $ +# $Id: lonxml.pm,v 1.368 2005/03/31 15:55:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -174,7 +174,8 @@ sub xmlend { my ($target,$parser)=@_; my $mode='xml'; my $status='OPEN'; - if ($Apache::lonhomework::parsing_a_problem) { + if ($Apache::lonhomework::parsing_a_problem || + $Apache::lonhomework::parsing_a_task ) { $mode='problem'; $status=$Apache::inputtags::status[-1]; } @@ -1370,6 +1371,7 @@ ENDNOTFOUND if (!$ENV{'form.editmode'} || $ENV{'form.viewmode'}) { $result = &Apache::lonxml::xmlparse($request,$target,$filecontents, '',%mystyle); + undef($Apache::lonhomework::parsing_a_task); } }