--- loncom/homework/structuretags.pm 2007/06/05 22:37:56 1.379 +++ loncom/homework/structuretags.pm 2007/06/11 20:52:29 1.380 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.379 2007/06/05 22:37:56 albertel Exp $ +# $Id: structuretags.pm,v 1.380 2007/06/11 20:52:29 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1225,6 +1225,13 @@ sub end_while { $return = 0; $error=1; next; } $result.=&Apache::scripttag::xmlparse($bodytext); + if ($target eq 'grade' || $target eq 'answer' || + $target eq 'analyze') { + # grade/answer/analyze should produce no output but if we + # are redirecting, the redirecter should know what to do + # with the output + if (!$Apache::lonxml::redirection) { undef($result); } + } $return = &Apache::run::run($code,$safeeval); } if ($error) {