--- loncom/publisher/lonretrieve.pm 2003/09/22 15:39:53 1.23 +++ loncom/publisher/lonretrieve.pm 2005/01/05 17:38:27 1.26 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to retrieve an old version of a file # -# $Id: lonretrieve.pm,v 1.23 2003/09/22 15:39:53 www Exp $ +# $Id: lonretrieve.pm,v 1.26 2005/01/05 17:38:27 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -26,20 +26,6 @@ # http://www.lon-capa.org/ # # -# (Publication Handler -# -# (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/02,05/09,06/23,08/20 Gerd Kortemeyer -# ### package Apache::lonretrieve; @@ -74,19 +60,16 @@ sub phaseone { ''. ''. - ''. + ''. ''); my $filename; opendir(DIR,$resdir); while ($filename=readdir(DIR)) { if ($filename=~/^\Q$main\E\.(\d+)\.\Q$suffix\E$/) { my $version=$1; - my ($rdev,$rino,$rmode,$rnlink, - $ruid,$rgid,$rrdev,$rsize, - $ratime,$rmtime,$rctime, - $rblksize,$rblocks)=stat($resdir.'/'.$filename); + my $rmtime=&Apache::lonnet::metadata($resdir.'/'.$filename,'lastrevisiondate'); $r->print(''); } } closedir(DIR); - my ($rdev,$rino,$rmode,$rnlink, - $ruid,$rgid,$rrdev,$rsize, - $ratime,$rmtime,$rctime, - $rblksize,$rblocks)=stat($resfn); + my $rmtime=&Apache::lonnet::metadata($resfn,'lastrevisiondate'); $r->print(''. - '
'.&mt('Select').''. &mt('Version').''.&mt('Became this version on ...').''.&mt('Published on ...').''.&mt('Metadata').'
'.$version.''. + $version.'">'.&mt('Previously published version').' '.$version.''. localtime($rmtime).''. ''. &mt('Metadata Version').' '.$version.''); @@ -94,19 +77,16 @@ sub phaseone { $r->print( '  '.&mt('Diffs with Version').' '.$version.''); } $r->print('
'.&mt('Current').''.localtime($rmtime). + ''.&mt('Currently public version').''.localtime($rmtime). ''. &mt('Metadata current version').''); if (&Apache::loncommon::fileembstyle($suffix) eq 'ssi') { @@ -123,6 +103,8 @@ sub phaseone { } else { $r->print('

'.&mt('No previous versions published.').'

'); } + $r->print('

'.&mt('Back to').' '.$fn. + '

'); } # ---------------------------------- Interface for presenting specified version