[LON-CAPA-cvs] cvs: loncom /publisher lonretrieve.pm

www lon-capa-cvs@mail.lon-capa.org
Wed, 05 Jan 2005 17:38:27 -0000


www		Wed Jan  5 12:38:27 2005 EDT

  Modified files:              
    /loncom/publisher	lonretrieve.pm 
  Log:
  Bug #1356: less odd display.
  
  
Index: loncom/publisher/lonretrieve.pm
diff -u loncom/publisher/lonretrieve.pm:1.25 loncom/publisher/lonretrieve.pm:1.26
--- loncom/publisher/lonretrieve.pm:1.25	Fri Jul  2 05:41:07 2004
+++ loncom/publisher/lonretrieve.pm	Wed Jan  5 12:38:27 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to retrieve an old version of a file
 #
-# $Id: lonretrieve.pm,v 1.25 2004/07/02 09:41:07 albertel 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 @@
               '<input type=hidden name=phase value=two>'.
               '<table border=2><tr><th>'.&mt('Select').'</th><th>'.
 	      &mt('Version').'</th>'.
-              '<th>'.&mt('Became this version on ...').'</th>'.
+              '<th>'.&mt('Published on ...').'</th>'.
               '<th>'.&mt('Metadata').'</th></tr>');
     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('<tr><td><input type=radio name=version value="'.
-                     $version.'"></td><th>'.$version.'</th><td>'.
+                     $version.'"></td><td>'.&mt('Previously published version').' '.$version.'</td><td>'.
                      localtime($rmtime).'</td><td>'.
                      '<a href="'.$urldir.$filename.'.meta" target=cat>'.
                      &mt('Metadata Version').' '.$version.'</a>');
@@ -101,12 +84,9 @@
         }
     }
     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('<tr><td><input type=radio name=version value="new"></td>'.
-              '<th>'.&mt('Current').'</th><td>'.localtime($rmtime).
+              '<th>'.&mt('Currently public version').'</th><td>'.localtime($rmtime).
            '</td><td><a href="'.$urldir.$main.'.'.$suffix.'.meta" target=cat>'.
               &mt('Metadata current version').'</a>');           
            if (&Apache::loncommon::fileembstyle($suffix) eq 'ssi') {