--- loncom/homework/structuretags.pm 2002/12/05 23:26:24 1.143 +++ loncom/homework/structuretags.pm 2003/02/07 21:50:12 1.145 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.143 2002/12/05 23:26:24 albertel Exp $ +# $Id: structuretags.pm,v 1.145 2003/02/07 21:50:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -411,7 +411,7 @@ sub end_problem { my $result=''; my $status=$Apache::inputtags::status['-1']; if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || $target eq 'tex') { - if ( $target eq 'grade' && $Apache::inputtags::part eq '0') { + if ( $target eq 'grade' && $Apache::inputtags::part eq '0' && $status eq 'CAN_ANSWER' ) { # if part is zero, no s existed, so we need to the grading &Apache::inputtags::grade; } elsif ( ($target eq 'web' || $target eq 'tex') && $Apache::inputtags::part eq '0' && @@ -450,6 +450,10 @@ sub end_problem { &Apache::lonhomework::showhash(%Apache::lonhomework::results); &finalize_storage(); } + if ($target eq 'answer' && ($ENV{'request.state'} eq 'construct') ) { + $result.=''; #normally we get it from xmlend, but in CSTR + # we always show answer mode too. + } } elsif ($target eq 'meta') { if ($Apache::inputtags::part eq '0') { $result=&Apache::response::mandatory_part_meta;