--- loncom/homework/structuretags.pm 2002/11/22 19:46:36 1.138 +++ loncom/homework/structuretags.pm 2002/11/25 21:19:45 1.139 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.138 2002/11/22 19:46:36 albertel Exp $ +# $Id: structuretags.pm,v 1.139 2002/11/25 21:19:45 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -695,17 +695,19 @@ sub end_part { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; &Apache::lonxml::debug("in end_part $target "); my $status=$Apache::inputtags::status['-1']; - pop @Apache::inputtags::status; - if ( $target eq 'meta' ) { return ''; } - if ( $target eq 'grade' && $status eq 'CAN_ANSWER') { - return &Apache::inputtags::grade; - } - if ($target eq 'web' || $target eq 'tex' ) { - my $gradestatus=&Apache::inputtags::gradestatus($Apache::inputtags::part,$target); + my $result=''; + if ( $target eq 'meta' ) { + $result=''; + } elsif ( $target eq 'grade' && $status eq 'CAN_ANSWER') { + $result=&Apache::inputtags::grade; + } elsif ($target eq 'web' || $target eq 'tex' ) { + my $gradestatus=&Apache::inputtags::gradestatus($Apache::inputtags::part, + $target); if ($Apache::lonhomework::type eq 'exam') {$gradestatus='';} - return $gradestatus; + $result=$gradestatus; } - return ''; + pop @Apache::inputtags::status; + return $result; } sub start_preduedate {