--- loncom/interface/londocs.pm 2004/01/15 03:18:19 1.99 +++ loncom/interface/londocs.pm 2004/02/05 15:19:41 1.103 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.99 2004/01/15 03:18:19 www Exp $ +# $Id: londocs.pm,v 1.103 2004/02/05 15:19:41 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -535,7 +535,11 @@ sub checkonthis { } elsif ($result==HTTP_SERVICE_UNAVAILABLE) { $r->print(''.&mt('connection down').''); } elsif ($result==HTTP_NOT_FOUND) { - $r->print(''.&mt('not found').''); + unless ($url=~/\$/) { + $r->print(''.&mt('not found').''); + } else { + $r->print(''.&mt('unable to verify variable URL').''); + } } else { $r->print(''.&mt('access denied').''); } @@ -705,10 +709,7 @@ sub checkversions {
$lt{'fi'} | $lt{'md'} | $lt{'mr'} | -$lt{'ve'} | $lt{'vu'} | $lt{'di'} |
---|
'.
+ ' '. &Apache::lonnet::gettitle($linkurl). - ' '.$linkurl. - ' '.
- &Apache::lonlocal::locallocaltime($changes{$_}).
- ' | '.
- $currentversion.' | ');
+ ' | | '.
+ ''.
+ ''.$linkurl.
+ ' | '.
+ ' | '.
+ &Apache::lonlocal::locallocaltime(
+ &Apache::lonnet::metadata($root.'.'.$extension,
+ 'lastrevisiondate')
+ ).
+ ' | '.
+ ' | '.
+ '');
+ $r->print(' | '.
+ ' |
');
my $lastold=1;
for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) {
my $url=$root.'.'.$prevvers.'.'.$extension;
@@ -749,11 +763,27 @@ ENDHEADERS
$lastold=$prevvers;
}
}
+ #
+ # Code to figure out how many version entries should go in
+ # each of the four columns
+ my $entries_per_col = 0;
+ my $num_entries = ($currentversion-$lastold);
+ if ($num_entries % 4 == 0) {
+ $entries_per_col = $num_entries/4;
+ } else {
+ $entries_per_col = $num_entries/4 + 1;
+ }
+ my $entries_count = 0;
+ $r->print(' | ');
+ my $cols_output = 1;
for (my $prevvers=$lastold;$prevvers<$currentversion;$prevvers++) {
my $url=$root.'.'.$prevvers.'.'.$extension;
- $r->print(' | ');
+ if ($cols_output != 4) {
+ $r->print(''); + if (++$entries_count % $entries_per_col == 0) { + $r->print(' ');
+ $cols_output++;
+ }
+ }
}
- $r->print(' | | ') + } + $r->print(' |