--- loncom/publisher/lonpubdir.pm 2001/12/04 15:34:57 1.16 +++ loncom/publisher/lonpubdir.pm 2001/12/28 22:14:10 1.19 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonpubdir.pm,v 1.16 2001/12/04 15:34:57 albertel Exp $ +# $Id: lonpubdir.pm,v 1.19 2001/12/28 22:14:10 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -28,13 +28,18 @@ # # (TeX Content Handler # +# YEAR=2000 # 05/29/00,05/30,10/11 Gerd Kortemeyer) # # 11/28,11/29,11/30,12/01,12/02,12/04,12/23 Gerd Kortemeyer +# YEAR=2001 # 03/23 Guy Albertelli # 03/24,03/29 Gerd Kortemeyer) -# # 03/31,04/03,05/09,06/23,08/18,08/20 Gerd Kortemeyer +# 12/15 Scott Harrison +# 12/28 Gerd Kortemeyer +# +### package Apache::lonpubdir; @@ -43,8 +48,7 @@ use Apache::File; use File::Copy; use Apache::Constants qw(:common :http :methods); use Apache::loncacc; -use Apache::lonnet; - +use Apache::loncommon(); sub handler { @@ -107,10 +111,12 @@ sub handler { my $docroot=$r->dir_config('lonDocRoot'); my $resdir=$docroot.'/res/'.$udom.'/'.$uname.$thisdisfn; + my $targetdir=$udom.'/'.$uname.$thisdisfn; my $linkdir='/~'.$uname.$thisdisfn; $r->print('
Filename | Modified | Status | ||||
---|---|---|---|---|---|---|
Filename | Metadata | Modified | '. + 'Status | |||
'.$disfilename. - ' | '.localtime($cmtime).' | '.localtime($cmtime). + ' | ' ); } - } elsif (&Apache::lonnet::fileembstyle($extension) ne 'hdn') { + } elsif (&Apache::loncommon::fileembstyle($extension) ne 'hdn') { my $status='Unpublished'; my $bgcol='#FFBBBB'; + my $title=' '; if (-e $resdir.'/'.$filename) { my ($rdev,$rino,$rmode,$rnlink, $ruid,$rgid,$rrdev,$rsize, @@ -148,11 +156,17 @@ sub handler { if ($rmtime>=$cmtime) { $status='Published'; $bgcol='#BBFFBB'; + $title= + ''. + &Apache::lonnet::metadata($targetdir.'/'.$filename,'title').''; } else { $status='Modified'; $bgcol='#FFFFBB'; + $title= + ''. + &Apache::lonnet::metadata($targetdir.'/'.$filename,'title').''; if - (&Apache::lonnet::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') { + (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') { $status.=' | |||
'.$filename. - ' | '.localtime($cmtime).' | '.$status.' | '. + ''.$title. + ' | '.localtime($cmtime).' | '.$status.' | '. ''. 'Publish |