--- loncom/interface/londocs.pm 2007/05/02 01:33:48 1.272 +++ loncom/interface/londocs.pm 2007/06/11 21:27:23 1.275 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.272 2007/05/02 01:33:48 albertel Exp $ +# $Id: londocs.pm,v 1.275 2007/06/11 21:27:23 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -936,8 +936,8 @@ sub group_import { $LONCAPA::map::order[$#LONCAPA::map::order+1]=$idx; my $ext = 'false'; if ($url=~m{^http://} || $url=~m{^https://}) { $ext = 'true'; } - $url =~ &LONCAPA::map::qtunescape($url); - $name =~ &LONCAPA::map::qtunescape($name); + $url = &LONCAPA::map::qtunescape($url); + $name = &LONCAPA::map::qtunescape($name); $LONCAPA::map::resources[$idx] = join ':', ($name, $url, $ext, 'normal', 'res'); } @@ -1586,11 +1586,16 @@ sub ask_for_embedded_content { foreach my $embed_file (keys(%{$allfiles})) { $upload_output .= &Apache::loncommon::start_data_table_row(). ''.$embed_file.''; - if ($args->{'error_on_invalid_names'} + if ($args->{'ignore_remote_references'} + && $embed_file =~ m{^\w+://}) { + $upload_output.=''.&mt("URL points to other server.").''; + } elsif ($args->{'error_on_invalid_names'} && $embed_file ne &Apache::lonnet::clean_filename($embed_file,{'keep_path' => 1,})) { $upload_output.=''.&mt("Invalid characters").''; + } else { + $upload_output .=' '; @@ -1611,7 +1616,8 @@ sub ask_for_embedded_content { } $upload_output .= &Apache::loncommon::end_data_table().'
- + + '.&mt('(only files for which a location has been provided will be uploaded)').' '; return $upload_output; }