--- loncom/homework/structuretags.pm 2006/10/17 15:11:12 1.367 +++ loncom/homework/structuretags.pm 2006/11/20 11:52:10 1.369 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.367 2006/10/17 15:11:12 albertel Exp $ +# $Id: structuretags.pm,v 1.369 2006/11/20 11:52:10 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -162,14 +162,14 @@ sub page_start { if ($target eq 'edit') { $form_tag_start.=&Apache::edit::form_change_detection(); } - $form_tag_start.='>'; + $form_tag_start.='>'."\n"; my $symb=&Apache::lonnet::symbread(); if ($symb =~ /\S/) { $symb= &HTML::Entities::encode(&Apache::lonenc::check_encrypt($symb)); $form_tag_start.= - ''; + "\t".''."\n"; } } return ($page_start,$form_tag_start); @@ -744,7 +744,7 @@ sub start_problem { &Apache::bridgetask::check_in('problem',undef,undef, $slot_name); } - $result.="\n $form_tag_start". + $result.="\n $form_tag_start \t". ''; # create a page header and exit if ($env{'request.state'} eq "construct") { @@ -1485,15 +1485,17 @@ sub end_preduedate { return ''; } +# In all the modes where text is +# displayable, all we do is eat up the text between the start/stop +# tags if the conditions are not right to display it. sub start_postanswerdate { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; - if ($target eq 'web' || $target eq 'grade' || $target eq 'webgrade') { + if ($target eq 'web' || $target eq 'grade' || $target eq 'webgrade' || + $target eq 'tex') { if ($Apache::lonhomework::scantronmode || $Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') { &Apache::lonxml::get_all_text("/postanswerdate",$parser,$style); } - } elsif ($target eq 'tex') { - &Apache::lonxml::get_all_text("/postanswerdate",$parser,$style); } return ''; }