--- loncom/interface/londocs.pm 2003/10/22 21:41:11 1.88 +++ loncom/interface/londocs.pm 2003/10/28 00:31:02 1.89 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.88 2003/10/22 21:41:11 www Exp $ +# $Id: londocs.pm,v 1.89 2003/10/28 00:31:02 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -570,58 +570,68 @@ sub verifycontent { sub checkversions { my $r=shift; - $r->print('
$lt{'fi'} | $lt{'md'} | $lt{'mr'} | $lt{'ve'} | $lt{'vu'} | $lt{'di'} | |||
---|---|---|---|---|---|---|---|---|
'.$linkurl. - ' | '. - &Apache::lonlocal::locallocaltime($changes{$_}). + foreach (keys %changes) { + if ($changes{$_}>$starttime) { + my ($root,$extension)=($_=~/^(.*)\.(\w+)$/); + my $currentversion=&Apache::lonnet::getversion($_); + my $linkurl=&Apache::lonnet::clutter($_); + $r->print( + ' | |||||||
'.$linkurl. + ' | '. + &Apache::lonlocal::locallocaltime($changes{$_}). ' | '. - $currentversion.' | '); + $currentversion.' | '); # Used in course - my $usedversion=$hash{'version_'.$linkurl}; - if ($usedversion) { - $r->print($usedversion); - } else { - $r->print($currentversion); - } - $r->print(' | '); + my $usedversion=$hash{'version_'.$linkurl}; + if ($usedversion) { + $r->print($usedversion); + } else { + $r->print($currentversion); + } + $r->print(' | '); # Set version - $r->print(&Apache::loncommon::select_form($usedversion, - 'set_version_'.$linkurl, - ('' => '', - 'current' => 'current', - map {$_,$_} (1..$currentversion)))); - $r->print(' | '); - my $lastold=1; - for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) { - my $url=$root.'.'.$prevvers.'.'.$extension; - if (&Apache::lonnet::metadata($url,'lastrevisiondate')< - $starttime) { - $lastold=$prevvers; - } - } + $r->print(&Apache::loncommon::select_form($usedversion, + 'set_version_'.$linkurl, + ('' => '', + 'current' => 'current', + map {$_,$_} (1..$currentversion)))); + $r->print(' | ');
+ my $lastold=1;
+ for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) {
+ my $url=$root.'.'.$prevvers.'.'.$extension;
+ if (&Apache::lonnet::metadata($url,'lastrevisiondate')<
+ $starttime) {
+ $lastold=$prevvers;
+ }
+ }
for (my $prevvers=$lastold;$prevvers<$currentversion;$prevvers++) {
- my $url=$root.'.'.$prevvers.'.'.$extension;
- $r->print(''.&mt('Version').' '.$prevvers.' ('.
- &Apache::lonlocal::locallocaltime(&Apache::lonnet::metadata($url,'lastrevisiondate')).
- ')');
- if (&Apache::loncommon::fileembstyle($extension) eq 'ssi') {
+ my $url=$root.'.'.$prevvers.'.'.$extension;
+ $r->print(''.&mt('Version').' '.$prevvers.' ('.
+ &Apache::lonlocal::locallocaltime(&Apache::lonnet::metadata($url,'lastrevisiondate')).
+ ')');
+ if (&Apache::loncommon::fileembstyle($extension) eq 'ssi') {
$r->print(' '.&mt('Diffs').'');
- }
- $r->print(' '); - } - $r->print(' |
'.&mt('No content modifications yet.').'
'); - } - &untiehash(); + &Apache::lonnet::clutter($root.'.'.$extension). + '&versionone='.$prevvers. + '">'.&mt('Diffs').''); + } + $r->print('