--- loncom/publisher/lonupload.pm 2013/07/09 21:35:06 1.65 +++ 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.65 2013/07/09 21:35:06 raeburn Exp $ +# $Id: lonupload.pm,v 1.67 2015/09/11 20:12:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -393,7 +393,7 @@ sub check_extension { if ($pathchg) { if ($mode eq 'testbank') { $returnflag = 'embedded'; - $result .= '
'.&mt('Or [_1]continue[_2] the testbank import without modifying the references(s).','','').'
'; + $result .= ''.&mt('Or [_1]continue[_2] the testbank import without modifying the reference(s).','','').'
'; } } } @@ -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 .= '