--- loncom/interface/londocs.pm 2012/04/05 15:22:39 1.480 +++ loncom/interface/londocs.pm 2012/04/08 22:34:58 1.481 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.480 2012/04/05 15:22:39 raeburn Exp $ +# $Id: londocs.pm,v 1.481 2012/04/08 22:34:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3047,7 +3047,13 @@ sub decompression_phase_one { $error = &mt('Archive file "[_1]" not in the expected location.',$env{'form.archiveurl'}); } else { my $file = $1; - $output = &Apache::loncommon::process_decompression($docudom,$docuname,$file,$destination,$dir_root,$hiddenelem); + $output = + &Apache::loncommon::process_decompression($docudom,$docuname,$file, + $destination,$dir_root, + $hiddenelem); + if ($env{'form.autoextract_camtasia'}) { + $output .= &remove_archive($docudom,$docuname,$container); + } } if ($error) { $output .= '
'.&mt('Not extracted.').'
'.
@@ -3062,12 +3068,12 @@ sub decompression_phase_one {
sub decompression_phase_two {
my ($destination,$dir_root,$londocroot,$docudom,$docuname,$container,$hiddenelem)=
&decompression_info();
- my ($output,$url);
+ my $output;
if ($env{'form.archivedelete'}) {
- ($output,$url) = &remove_archive($docudom,$docuname,$container);
+ $output = &remove_archive($docudom,$docuname,$container);
}
$output .=
- &Apache::loncommon::process_extracted_files('coursedocs',$docudom,$docuname,$url,
+ &Apache::loncommon::process_extracted_files('coursedocs',$docudom,$docuname,
$destination,$dir_root,$hiddenelem);
return $output;
}
@@ -3075,7 +3081,7 @@ sub decompression_phase_two {
sub remove_archive {
my ($docudom,$docuname,$container) = @_;
my $map = $env{'form.folder'}.'.'.$container;
- my ($output,$delwarning,$delresult,$url,$outcome);
+ my ($output,$delwarning,$delresult,$url);
my ($errtext,$fatal) = &mapread($docuname,$docudom,$map);
if ($fatal) {
if ($container eq 'page') {
@@ -3100,9 +3106,8 @@ sub remove_archive {
$delwarning = &mt('An error occurred updating the contents of the current folder.');
}
} else {
- $outcome = 'ok';
+ $delresult = &mt('Archive file removed.');
}
- $delresult = &mt('Archive file removed.');
}
}
$env{'form.cmd'} = $currcmd;
@@ -3117,7 +3122,7 @@ sub remove_archive {
$delresult.
'