--- loncom/homework/structuretags.pm 2004/02/16 19:19:31 1.238 +++ loncom/homework/structuretags.pm 2004/02/16 19:50:10 1.239 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.238 2004/02/16 19:19:31 albertel Exp $ +# $Id: structuretags.pm,v 1.239 2004/02/16 19:50:10 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1131,7 +1131,8 @@ sub start_notsolved { $target eq 'tex') { my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"}; &Apache::lonxml::debug("not solved has :$gradestatus:"); - if ($gradestatus =~ /^correct/) { + if ($gradestatus =~ /^correct/ && + &Apache::response::show_answer()) { &Apache::lonxml::debug("skipping"); &Apache::lonxml::get_all_text("/notsolved",$parser); } @@ -1148,7 +1149,8 @@ sub start_solved { if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') { my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"}; - if ($gradestatus !~ /^correct/) { + if ($gradestatus !~ /^correct/ || + !&Apache::response::show_answer()) { &Apache::lonxml::get_all_text("/solved",$parser); } }