Diff for /loncom/publisher/lonretrieve.pm between versions 1.27 and 1.30

version 1.27, 2005/04/07 06:56:27 version 1.30, 2006/04/06 22:15:19
Line 63  sub phaseone { Line 63  sub phaseone {
       &mt('Version').'</th>'.        &mt('Version').'</th>'.
               '<th>'.&mt('Published on ...').'</th>'.                '<th>'.&mt('Published on ...').'</th>'.
               '<th>'.&mt('Metadata').'</th></tr>');                '<th>'.&mt('Metadata').'</th></tr>');
     my $filename;  
     opendir(DIR,$resdir);      opendir(DIR,$resdir);
     while ($filename=readdir(DIR)) {      my @files = grep(/^\Q$main\E\.(\d+)\.\Q$suffix\E$/,readdir(DIR));
       @files = sort {
    my ($aver) = ($a=~/^\Q$main\E\.(\d+)\.\Q$suffix\E$/);
    my ($bver) = ($b=~/^\Q$main\E\.(\d+)\.\Q$suffix\E$/);
    return $aver <=> $bver;
       } (@files);
       closedir(DIR);
   
       foreach my $filename (@files) {
         if ($filename=~/^\Q$main\E\.(\d+)\.\Q$suffix\E$/) {          if ($filename=~/^\Q$main\E\.(\d+)\.\Q$suffix\E$/) {
    my $version=$1;     my $version=$1;
            my $rmtime=&Apache::lonnet::metadata($resdir.'/'.$filename,'lastrevisiondate');             my $rmtime=&Apache::lonnet::metadata($resdir.'/'.$filename,'lastrevisiondate');
Line 87  sub phaseone { Line 95  sub phaseone {
     closedir(DIR);      closedir(DIR);
     my $rmtime=&Apache::lonnet::metadata($resfn,'lastrevisiondate');      my $rmtime=&Apache::lonnet::metadata($resfn,'lastrevisiondate');
     $r->print('<tr><td><input type=radio name=version value="new"></td>'.      $r->print('<tr><td><input type=radio name=version value="new"></td>'.
               '<th>'.&mt('Currently public version').'</th><td>'.localtime($rmtime).                '<th>'.&mt('Currently published version').'</th><td>'.localtime($rmtime).
            '</td><td><a href="'.$urldir.$main.'.'.$suffix.'.meta" target=cat>'.             '</td><td><a href="'.$urldir.$main.'.'.$suffix.'.meta" target=cat>'.
               &mt('Metadata current version').'</a>');                           &mt('Metadata current version').'</a>');           
            if (&Apache::loncommon::fileembstyle($suffix) eq 'ssi') {             if (&Apache::loncommon::fileembstyle($suffix) eq 'ssi') {
Line 197  sub handler { Line 205  sub handler {
   &Apache::loncommon::content_type($r,'text/html');    &Apache::loncommon::content_type($r,'text/html');
   $r->send_http_header;    $r->send_http_header;
   
   $r->print('<html><head><title>LON-CAPA Construction Space</title></head>');    $r->print(&Apache::loncommon::start_page('Retrieve Published Resources'));
   
   $r->print(&Apache::loncommon::bodytag('Retrieve Published Resources'));  
   
       
   $r->print('<h1>'.&mt('Retrieve previous versions of').' <tt>'.$fn.'</tt></h1>');    $r->print('<h1>'.&mt('Retrieve previous versions of').' <tt>'.$fn.'</tt></h1>');
Line 217  sub handler { Line 223  sub handler {
       &phaseone($r,$fn,$uname,$udom);        &phaseone($r,$fn,$uname,$udom);
   }    }
   
   $r->print('</body></html>');    $r->print(&Apache::loncommon::end_page());
   return OK;      return OK;  
 }  }
   

Removed from v.1.27  
changed lines
  Added in v.1.30


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>