--- loncom/homework/structuretags.pm 2002/06/21 20:27:54 1.97 +++ loncom/homework/structuretags.pm 2002/06/25 14:50:53 1.98 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.97 2002/06/21 20:27:54 albertel Exp $ +# $Id: structuretags.pm,v 1.98 2002/06/25 14:50:53 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -203,7 +203,7 @@ sub start_problem { &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval); if ($target eq 'tex' and $ENV{'request.symb'} =~ m/\.page_/) { $result = '';} - if ($target eq 'web' || $target eq 'grade' || $target eq 'answer') { + if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') { #handle exam checkout if ($Apache::lonhomework::type eq 'exam') { my $token=$Apache::lonhomework::history{"resource.0.outtoken"}; @@ -283,7 +283,16 @@ sub start_problem { $result.=$head_tag_start. "$name\n$body_tag_start\n"; } - } + } elsif ($target eq 'tex') { + my $id = $Apache::inputtags::part; + my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); + $duedate = POSIX::strftime("%c",localtime($duedate)); + if (not $ENV{'request.symb'} =~ m/\.page_/) { + $result .= '\begin{document} \noindent\fbox{Due date: '.$duedate.'} \\vskip 1 mm'; + } else { + $result .= '\begin{minipage}{\minipagewidth} '; + } + } } elsif ($target eq 'edit') { $result.=$head_tag_start."".$body_tag_start. '