--- loncom/publisher/lonupload.pm 2010/02/16 10:26:17 1.49
+++ loncom/publisher/lonupload.pm 2010/10/27 01:04:15 1.50
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Handler to upload files into construction space
#
-# $Id: lonupload.pm,v 1.49 2010/02/16 10:26:17 bisitz Exp $
+# $Id: lonupload.pm,v 1.50 2010/10/27 01:04:15 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -350,19 +350,23 @@ sub check_extension {
my (%allfiles,%codebase);
&Apache::lonnet::extract_embedded_items($target,\%allfiles,\%codebase);
if (keys(%allfiles) > 0) {
+ my ($currentpath) = ($url =~ m{^(.+)/[^/]+$});
my $state = <
".&mt("Completed upload of the file. This file contained references to other files.")."
". - "".&mt("Please select the locations from which the referenced files are to be uploaded.")."
". - &Apache::loncommon::ask_for_embedded_content($action,$state,\%allfiles,\%codebase, + my $embedded = &Apache::loncommon::ask_for_embedded_content($action,$state,\%allfiles,\%codebase, {'error_on_invalid_names' => 1, - 'ignore_remote_references' => 1,}); + 'ignore_remote_references' => 1, + 'current_path' => $currentpath}); + if ($embedded) { + $result .= ''.&mt('Completed upload of the file. This file contained references to other files.').'
'. + ''.&mt('Please select the locations from which the referenced files are to be uploaded.').'
'. + $embedded; + } if ($mode eq 'testbank') { $returnflag = 'embedded'; $result .= ''.&mt('Or [_1]continue[_2] the testbank import without these files','','').'
';