--- loncom/homework/structuretags.pm 2006/11/20 11:52:10 1.369 +++ loncom/homework/structuretags.pm 2006/11/21 10:01:31 1.370 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.369 2006/11/20 11:52:10 foxr Exp $ +# $Id: structuretags.pm,v 1.370 2006/11/21 10:01:31 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1490,10 +1490,14 @@ sub end_preduedate { # tags if the conditions are not right to display it. sub start_postanswerdate { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; + my $pav = &Apache::lonnet::allowed('pav', $env{'request.course.id'}) || + &Apache::lonnet::allowed('pav', + $env{'request.course.id'}.'/'.$env{'request.course.sec'}); if ($target eq 'web' || $target eq 'grade' || $target eq 'webgrade' || - $target eq 'tex') { + $target eq 'tex' ) { if ($Apache::lonhomework::scantronmode || - $Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') { + $Apache::inputtags::status['-1'] ne 'SHOW_ANSWER' || + (($target eq 'tex') && !$pav)) { &Apache::lonxml::get_all_text("/postanswerdate",$parser,$style); } }