Diff for /loncom/interface/londocs.pm between versions 1.92 and 1.93

version 1.92, 2003/10/29 21:21:55 version 1.93, 2003/10/29 21:50:41
Line 596  sub checkversions { Line 596  sub checkversions {
  $haschanged=1;   $haschanged=1;
  foreach (keys %hash) {   foreach (keys %hash) {
     if ($_=~/^ids\_(\/res\/.+)$/) {      if ($_=~/^ids\_(\/res\/.+)$/) {
  my $src=$1;   $newsetversions{$1}='mostrecent';
     }      }
  }   }
     } elsif ($ENV{'form.setcurrent'}) {      } elsif ($ENV{'form.setcurrent'}) {
  $haschanged=1;   $haschanged=1;
  foreach (keys %hash) {   foreach (keys %hash) {
     if ($_=~/^ids\_(\/res\/.+)$/) {      if ($_=~/^ids\_(\/res\/.+)$/) {
  my $src=$1;   my $getvers=&Apache::lonnet::getversion($1);
    if ($getvers>0) {
       $newsetversions{$1}=$getvers;
    }
     }      }
  }   }
     } elsif ($ENV{'form.setversions'}) {      } elsif ($ENV{'form.setversions'}) {
Line 714  ENDHEADERS Line 717  ENDHEADERS
  if ($changes{$_}>$starttime) {   if ($changes{$_}>$starttime) {
     my ($root,$extension)=($_=~/^(.*)\.(\w+)$/);      my ($root,$extension)=($_=~/^(.*)\.(\w+)$/);
     my $currentversion=&Apache::lonnet::getversion($_);      my $currentversion=&Apache::lonnet::getversion($_);
       if ($currentversion<0) {
    $currentversion=&mt('Could not be determined.');
       }
     my $linkurl=&Apache::lonnet::clutter($_);      my $linkurl=&Apache::lonnet::clutter($_);
     $r->print(      $r->print(
       '<tr><td><b>'.        '<tr><td><b>'.
Line 725  ENDHEADERS Line 731  ENDHEADERS
       $currentversion.'</font></td><td><font size="+2">');        $currentversion.'</font></td><td><font size="+2">');
 # Used in course  # Used in course
     my $usedversion=$hash{'version_'.$linkurl};      my $usedversion=$hash{'version_'.$linkurl};
     if ($usedversion) {      if (($usedversion) && ($usedversion ne 'mostrecent')) {
  $r->print($usedversion);   $r->print($usedversion);
     } else {      } else {
  $r->print($currentversion);   $r->print($currentversion);
Line 735  ENDHEADERS Line 741  ENDHEADERS
     $r->print(&Apache::loncommon::select_form($setversions{$linkurl},      $r->print(&Apache::loncommon::select_form($setversions{$linkurl},
       'set_version_'.$linkurl,        'set_version_'.$linkurl,
       ('' => '',        ('' => '',
        'current' => 'most recent',         'mostrecent' => 'most recent',
        map {$_,$_} (1..$currentversion))));         map {$_,$_} (1..$currentversion))));
     $r->print('</td><td><font size="1"><ul>');      $r->print('</td><td><font size="1"><ul>');
     my $lastold=1;      my $lastold=1;

Removed from v.1.92  
changed lines
  Added in v.1.93


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