version 1.49, 2010/02/16 10:26:17
|
version 1.50, 2010/10/27 01:04:15
|
Line 350 sub check_extension {
|
Line 350 sub check_extension {
|
my (%allfiles,%codebase); |
my (%allfiles,%codebase); |
&Apache::lonnet::extract_embedded_items($target,\%allfiles,\%codebase); |
&Apache::lonnet::extract_embedded_items($target,\%allfiles,\%codebase); |
if (keys(%allfiles) > 0) { |
if (keys(%allfiles) > 0) { |
|
my ($currentpath) = ($url =~ m{^(.+)/[^/]+$}); |
my $state = <<STATE; |
my $state = <<STATE; |
<input type="hidden" name="action" value="upload_embedded" /> |
<input type="hidden" name="action" value="upload_embedded" /> |
<input type="hidden" name="currentpath" value="$env{'form.currentpath'}" /> |
|
<input type="hidden" name="mode" value="$mode" /> |
<input type="hidden" name="mode" value="$mode" /> |
<input type="hidden" name="phase" value="three" /> |
<input type="hidden" name="phase" value="three" /> |
<input type="hidden" name="filename" value="$url" /> |
<input type="hidden" name="filename" value="$url" /> |
STATE |
STATE |
$result .= "<h3>".&mt("Reference Warning")."</h3>". |
my $embedded = &Apache::loncommon::ask_for_embedded_content($action,$state,\%allfiles,\%codebase, |
"<p>".&mt("Completed upload of the file. This file contained references to other files.")."</p>". |
|
"<p>".&mt("Please select the locations from which the referenced files are to be uploaded.")."</p>". |
|
&Apache::loncommon::ask_for_embedded_content($action,$state,\%allfiles,\%codebase, |
|
{'error_on_invalid_names' => 1, |
{'error_on_invalid_names' => 1, |
'ignore_remote_references' => 1,}); |
'ignore_remote_references' => 1, |
|
'current_path' => $currentpath}); |
|
if ($embedded) { |
|
$result .= '<h3>'.&mt('Reference Warning').'</h3>'. |
|
'<p>'.&mt('Completed upload of the file. This file contained references to other files.').'</p>'. |
|
'<p>'.&mt('Please select the locations from which the referenced files are to be uploaded.').'</p>'. |
|
$embedded; |
|
} |
if ($mode eq 'testbank') { |
if ($mode eq 'testbank') { |
$returnflag = 'embedded'; |
$returnflag = 'embedded'; |
$result .= '<p>'.&mt('Or [_1]continue[_2] the testbank import without these files','<a href="javascript:document.testbankForm.submit();">','</a>').'</p>'; |
$result .= '<p>'.&mt('Or [_1]continue[_2] the testbank import without these files','<a href="javascript:document.testbankForm.submit();">','</a>').'</p>'; |