--- loncom/interface/londocs.pm 2003/10/04 20:49:40 1.85 +++ 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.85 2003/10/04 20:49:40 www Exp $ +# $Id: londocs.pm,v 1.95 2003/11/07 23:22:21 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -138,7 +138,7 @@ sub dumpcourse { # Do the dumping unless ($outhash{'home_'.$ENV{'form.authorspace'}}) { return ''; } my ($ca,$cd)=split(/\@/,$ENV{'form.authorspace'}); - $r->print('
- |
- |
$lt{'fi'} | $lt{'md'} | -$lt{'ve'} | $lt{'di'} | $lt{'fi'} | $lt{'md'} | $lt{'mr'} | +$lt{'ve'} | $lt{'vu'} | $lt{'di'} | ENDHEADERS - 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.' | '. - ''); - my $lastold=1; - for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) { - my $url=$root.'.'.$prevvers.'.'.$extension; - if (&Apache::lonnet::metadata($url,'lastrevisiondate')< - $starttime) { - $lastold=$prevvers; - } - } + 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.' | '); +# Used in course + 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($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('