--- loncom/homework/structuretags.pm 2005/11/03 12:14:31 1.310 +++ loncom/homework/structuretags.pm 2005/11/03 12:20:54 1.311 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.310 2005/11/03 12:14:31 foxr Exp $ +# $Id: structuretags.pm,v 1.311 2005/11/03 12:20:54 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -499,6 +499,10 @@ sub get_problem_status { sub start_problem { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; + # We'll use the redirection to fix up printing of duedates. + + &Apache::lonxml::startredirection; + # Problems don't nest and we don't allow more than one in # a .problem file. # @@ -735,7 +739,7 @@ sub start_problem { sub end_problem { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; - my $result=''; + my $result= &Apache::lonxml::endredirection; # This captures the entire .... body. my $status=$Apache::inputtags::status['-1']; if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || @@ -1176,6 +1180,7 @@ sub ordered_show_check { sub start_part { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; + &Apache::lonxml::startredirection; # we'll use redirection to fix up duedates. my $result=''; my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval); if ($id =~ /^\s*$/) { $id = $Apache::lonxml::curdepth; } @@ -1284,13 +1289,13 @@ sub end_part { my $status=$Apache::inputtags::status['-1']; my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part); my $in_order_show=&ordered_show_check(); - my $result=''; + my $result= &Apache::lonxml::endredirection; # $resutl has entire body. if ( $target eq 'meta' ) { - $result=''; + $result.=''; } elsif ($target eq 'grade') { if (($status eq 'CAN_ANSWER' || $Apache::lonhomework::scantronmode) && !$hidden && $in_order_show) { - $result=&Apache::inputtags::grade; + $result.=&Apache::inputtags::grade; } else { # move any submission data to .hidden &Apache::inputtags::hidealldata($Apache::inputtags::part); @@ -1302,10 +1307,10 @@ sub end_part { if ($Apache::lonhomework::type eq 'exam' && $target eq 'tex') { $gradestatus=''; } - $result=$gradestatus; + $result.=$gradestatus; if ($$tagstack[-2] eq 'td' and $target eq 'tex') {$result.='\end{minipage}';} } elsif ($target eq 'edit') { - $result=&Apache::edit::end_table(); + $result.=&Apache::edit::end_table(); } pop @Apache::inputtags::status; $Apache::inputtags::part='';