--- loncom/homework/structuretags.pm 2003/05/12 13:50:08 1.170 +++ loncom/homework/structuretags.pm 2003/05/13 20:38:55 1.171 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.170 2003/05/12 13:50:08 www Exp $ +# $Id: structuretags.pm,v 1.171 2003/05/13 20:38:55 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -481,7 +481,7 @@ sub end_problem { ) { if ($status eq 'CAN_ANSWER') { if ($target ne 'tex') { - $result.="\n"; + if ($ENV{'form.print_answer'} ne 'yes') {$result.="\n";} } } elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER' || $status eq 'UNCHECKEDOUT' ) { @@ -505,8 +505,10 @@ sub end_problem { &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. + if ($ENV{'form.print_answer'} ne 'yes') { + $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') {