--- loncom/publisher/lonretrieve.pm 2009/08/13 05:07:55 1.41.2.1 +++ 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.41.2.1 2009/08/13 05:07:55 raeburn Exp $ +# $Id: lonretrieve.pm,v 1.44 2011/10/24 22:10:21 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -204,9 +204,20 @@ sub phaseone { $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 @@ -222,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/; @@ -255,7 +266,7 @@ sub phasetwo { print $logfile "Copy failed: $error\n\n"; } $r->print('' - .'