--- loncom/homework/structuretags.pm 2003/05/13 20:38:55 1.171 +++ loncom/homework/structuretags.pm 2003/05/14 13:33:00 1.172 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.171 2003/05/13 20:38:55 sakharuk Exp $ +# $Id: structuretags.pm,v 1.172 2003/05/14 13:33:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -480,8 +480,9 @@ sub end_problem { ($target eq 'answer') || ($target eq 'tex') ) { if ($status eq 'CAN_ANSWER') { - if ($target ne 'tex') { - if ($ENV{'form.print_answer'} ne 'yes') {$result.="\n";} + if ($target ne 'tex' && + $ENV{'form.answer_output_mode'} ne 'tex') { + $result.="\n"; } } elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER' || $status eq 'UNCHECKEDOUT' ) { @@ -504,11 +505,10 @@ sub end_problem { &Apache::lonhomework::showhash(%Apache::lonhomework::results); &finalize_storage(); } - if ($target eq 'answer' && ($ENV{'request.state'} eq 'construct') ) { - if ($ENV{'form.print_answer'} ne 'yes') { - $result.=''; #normally we get it from xmlend, but in CSTR - # we always show answer mode too. - } + if ($target eq 'answer' && ($ENV{'request.state'} eq 'construct') + && $ENV{'form.answer_mode_output'} ne 'tex') { + $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') {