--- loncom/homework/outputtags.pm 2005/11/08 12:00:22 1.43 +++ loncom/homework/outputtags.pm 2005/12/12 22:10:32 1.45 @@ -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.45 2005/12/12 22:10:32 albertel 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; + } } } @@ -158,12 +169,18 @@ sub end_displaytitle { sub multipart { my ($uri)=@_; if (!defined($uri)) { $uri=$env{'request.uri'}; } + my ($symb)=&Apache::lonxml::whichuser(); + my @parts; my $metadata = &Apache::lonnet::metadata($uri,'packages'); foreach (split(/\,/,$metadata)) { if ($_ =~ /^part_(.*)$/) { my $part = $1; - if ($part ne '0') { push(@parts,$part); } + if ($part ne '0' + && !&Apache::loncommon::check_if_partid_hidden($part, + $symb)) { + push(@parts,$part); + } } } return @parts;