--- loncom/publisher/lonretrieve.pm 2008/12/19 03:55:25 1.37 +++ loncom/publisher/lonretrieve.pm 2011/10/24 22:10:21 1.44 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to retrieve an old version of a file # -# $Id: lonretrieve.pm,v 1.37 2008/12/19 03:55:25 raeburn Exp $ +# $Id: lonretrieve.pm,v 1.44 2011/10/24 22:10:21 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -120,7 +120,7 @@ sub phaseone { my ($main,$suffix,$is_meta) = &get_file_info($fn); if (-e $resfn) { - $r->print('
'); + $r->print(''); } else { $r->print(''.&mt('No previous versions published.').'
'); } - $r->print('' - .&mt('Back to [_1]',''.$fn.'') - .'
'); + + my $dir = &Apache::loncommon::authorspace() + .&File::Basename::dirname($fn) + .'/'; + $r->print(&Apache::lonhtmlcommon::start_funclist() + .&Apache::lonhtmlcommon::add_item_funclist( + '' + .&mt('Back to Resource') + .'') + .&Apache::lonhtmlcommon::add_item_funclist( + '' + .&mt('Back to Directory') + .'') + .&Apache::lonhtmlcommon::end_funclist() + ); } # ---------------------------------- Interface for presenting specified version @@ -220,7 +233,7 @@ sub phasetwo { my ($main,$suffix,$is_meta) = &get_file_info($fn); my $logfile; - my $ctarget='/home/'.$uname.'/public_html'.$fn; + my $ctarget=$r->dir_config('lonDocRoot').'/priv/'.$udom.'/'.$uname.$fn; my $vfn=$fn; if ($version ne 'new') { $vfn=~s/\.(\Q$suffix\E)$/\.$version\.$1/; @@ -253,8 +266,8 @@ sub phasetwo { print $logfile "Copy failed: $error\n\n"; } $r->print('' - .''
- .&mt('Back to [_1]',$fn)
+ .' '
+ .&mt('Back to Resource')
.' '.&mt('Please pick a version to retrieve:').' '
.&mt('Retrieve previous versions of [_1]'
,''.$fn.'')
- .'');
+ .' '
+ .&mt('Co-Author [_1]'
+ ,&Apache::loncommon::plainname($uname,$udom)
+ .' ('.$uname.':'.$udom.')')
+ .''
+ $r->print('
');
+ $r->print('