--- loncom/interface/londocs.pm 2003/10/22 21:41:11 1.88 +++ loncom/interface/londocs.pm 2003/11/07 23:22:21 1.95 @@ -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.95 2003/11/07 23:22:21 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -402,20 +402,24 @@ sub entryline { $renametitle=~s/\"\;/\\\"/g; my $line='
-![]() |
-![]() |
$lt{'fi'} | $lt{'md'} | $lt{'mr'} | $lt{'ve'} | $lt{'vu'} | $lt{'di'} | |||
---|---|---|---|---|---|---|---|---|
'.$linkurl. - ' | '. - &Apache::lonlocal::locallocaltime($changes{$_}). + foreach (sort keys %changes) { + if ($changes{$_}>$starttime) { + my ($root,$extension)=($_=~/^(.*)\.(\w+)$/); + my $currentversion=&Apache::lonnet::getversion($_); + if ($currentversion<0) { + $currentversion=&mt('Could not be determined.'); + } + my $linkurl=&Apache::lonnet::clutter($_); + $r->print( + ' | |||||||
'.
+ &Apache::lonnet::gettitle($linkurl).
+ ' '.$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) && ($usedversion ne 'mostrecent')) { + $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($setversions{$linkurl}, + 'set_version_'.$linkurl, + ('' => '', + 'mostrecent' => 'most recent', + map {$_,$_} (1..$currentversion)))); + $r->print(' |
|
'.&mt('No content modifications yet.').'
'); - } - &untiehash(); + &Apache::lonnet::clutter($root.'.'.$extension). + '&versionone='.$prevvers. + '">'.&mt('Diffs').''); + } + $r->print(''); + } + $r->print('