--- loncom/homework/outputtags.pm 2005/11/08 12:00:22 1.43 +++ loncom/homework/outputtags.pm 2005/11/09 12:05:56 1.44 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # tags that create controlled output # -# $Id: outputtags.pm,v 1.43 2005/11/08 12:00:22 foxr Exp $ +# $Id: outputtags.pm,v 1.44 2005/11/09 12:05:56 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -91,15 +91,26 @@ sub start_displayduedate { } if ($showduedate) { + my $duetext = &Apache::lonnavmaps::timeToHumanString($date, '', $format); if ($target eq 'web') { if (lc($style) !~ 'plain') { - $result ='
Due '. - &Apache::lonnavmaps::timeToHumanString($date,'', $format). - '
'; + $result ='
Due '.$duetext.'
'; } else { - $result=&mt('Due').' '.&Apache::lonnavmaps::timeToHumanString($date); + $result=&mt('Due').' '.$duetext; } } elsif ($target eq 'tex') { + # For TeX we'll make the duedate tag work exactly like the + # duedate tag for web. + + my $duetext = &Apache::lonnavmaps::timeToHumanString($date, '', $format); + if (lc($style) !~ 'plain') { + # The due date will be put in a box. + + $result = '\framebox{' + .&mt('Due').' '.$duetext.'}'; + } else { + $result = &mt('Due') . ' '.$duetext; + } } }