--- loncom/interface/londocs.pm 2003/10/22 19:47:52 1.87 +++ loncom/interface/londocs.pm 2003/10/22 21:41:11 1.88 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.87 2003/10/22 19:47:52 www Exp $ +# $Id: londocs.pm,v 1.88 2003/10/22 21:41:11 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -588,6 +588,7 @@ sub checkversions { my $monthsel=''; my $weeksel=''; my $daysel=''; + my $allsel=''; if ($ENV{'form.timerange'}==-1) { $seltext='since start of course'; $startsel='selected'; @@ -603,13 +604,16 @@ sub checkversions { } elsif ($ENV{'form.timerange'}==86400) { $seltext=&mt('since yesterday').' ('.&Apache::lonlocal::locallocaltime($starttime).')'; $daysel='selected'; + } elsif ($ENV{'form.timerange'} eq 'all') { + $allsel='all'; } my %lt=&Apache::lonlocal::texthash - ('st' => 'Since Start of Course', - 'lm' => 'Last Month', - 'lw' => 'Last Week', - 'sy' => 'Since Yesterday', - 'di' => 'Display', + ('st' => 'Version changes since start of Course', + 'lm' => 'Version changes since last Month', + 'lw' => 'Version changes since last Week', + 'sy' => 'Version changes since Yesterday', + 'al' => 'All Resources', + 'sd' => 'Display', 'cc' => 'Content changed', 'fi' => 'File', 'md' => 'Modification Date', @@ -620,12 +624,13 @@ sub checkversions { $r->print(< - +

$lt{'cc'} $seltext

@@ -641,11 +646,23 @@ ENDHEADERS $r->print( '
'.$linkurl. ''. - &Apache::lonlocal::locallocaltime($changes{$_}).''. - $currentversion.''); + &Apache::lonlocal::locallocaltime($changes{$_}). + ''. + $currentversion.''); # Used in course - $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++) { @@ -884,6 +901,10 @@ ENDNEWSCRIPT # ----------------------------------------------------------------------------- if ($allowed) { my $dumpbut=&dumpbutton(); + my %lt=&Apache::lonlocal::texthash( + 'vc' => 'Verify Content', + 'cv' => 'Check/Set Resource Versions', + ); $r->print(< @@ -897,9 +918,9 @@ ENDNEWSCRIPT
- + - + $dumpbut