--- loncom/publisher/lonupload.pm 2013/12/04 17:29:44 1.66 +++ loncom/publisher/lonupload.pm 2015/09/11 20:12:30 1.67 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to upload files into construction space # -# $Id: lonupload.pm,v 1.66 2013/12/04 17:29:44 bisitz Exp $ +# $Id: lonupload.pm,v 1.67 2015/09/11 20:12:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -427,6 +427,8 @@ sub phasethree { my $dir_root = $r->dir_config('lonDocRoot').$url_root; my $path = &File::Basename::dirname($fn); $path =~ s{^\Q$url_root\E}{}; + my $dirpath = $url_root.$path.'/'; + $dirpath=~s{/+}{/}g; my $filename = &HTML::Entities::encode($env{'form.filename'},'<>&"'); my $state = &embedded_form_elems('modify_orightml',$filename,$mode). ''; @@ -437,7 +439,7 @@ sub phasethree { if ($mode ne 'imsimport' && $mode ne 'testbank') { $result .= '

'. &mt('View main file').'

'. - '

'. + '

'. &mt('Back to Directory').'


'; } return ($result,$returnflag); @@ -466,13 +468,15 @@ sub phasefour { my $dir_root = $r->dir_config('lonDocRoot').$url_root; my $path = &File::Basename::dirname($fn); $path =~ s{^\Q$url_root\E}{}; + my $dirpath = $url_root.$path.'/'; + $dirpath=~s{/+}{/}g; my $outcome = &Apache::loncommon::modify_html_refs($mode,$path,$uname,$udom,$dir_root); $result .= $outcome; if ($mode ne 'imsimport' && $mode ne 'testbank') { $result .= '

'. &mt('View main file').'

'. - '

'. + '

'. &mt('Back to Directory').'


'; } return $result;