version 1.480, 2012/04/05 15:22:39
|
version 1.481, 2012/04/08 22:34:58
|
Line 3047 sub decompression_phase_one {
|
Line 3047 sub decompression_phase_one {
|
$error = &mt('Archive file "[_1]" not in the expected location.',$env{'form.archiveurl'}); |
$error = &mt('Archive file "[_1]" not in the expected location.',$env{'form.archiveurl'}); |
} else { |
} else { |
my $file = $1; |
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) { |
if ($error) { |
$output .= '<p class="LC_error">'.&mt('Not extracted.').'<br />'. |
$output .= '<p class="LC_error">'.&mt('Not extracted.').'<br />'. |
Line 3062 sub decompression_phase_one {
|
Line 3068 sub decompression_phase_one {
|
sub decompression_phase_two { |
sub decompression_phase_two { |
my ($destination,$dir_root,$londocroot,$docudom,$docuname,$container,$hiddenelem)= |
my ($destination,$dir_root,$londocroot,$docudom,$docuname,$container,$hiddenelem)= |
&decompression_info(); |
&decompression_info(); |
my ($output,$url); |
my $output; |
if ($env{'form.archivedelete'}) { |
if ($env{'form.archivedelete'}) { |
($output,$url) = &remove_archive($docudom,$docuname,$container); |
$output = &remove_archive($docudom,$docuname,$container); |
} |
} |
$output .= |
$output .= |
&Apache::loncommon::process_extracted_files('coursedocs',$docudom,$docuname,$url, |
&Apache::loncommon::process_extracted_files('coursedocs',$docudom,$docuname, |
$destination,$dir_root,$hiddenelem); |
$destination,$dir_root,$hiddenelem); |
return $output; |
return $output; |
} |
} |
Line 3075 sub decompression_phase_two {
|
Line 3081 sub decompression_phase_two {
|
sub remove_archive { |
sub remove_archive { |
my ($docudom,$docuname,$container) = @_; |
my ($docudom,$docuname,$container) = @_; |
my $map = $env{'form.folder'}.'.'.$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); |
my ($errtext,$fatal) = &mapread($docuname,$docudom,$map); |
if ($fatal) { |
if ($fatal) { |
if ($container eq 'page') { |
if ($container eq 'page') { |
Line 3100 sub remove_archive {
|
Line 3106 sub remove_archive {
|
$delwarning = &mt('An error occurred updating the contents of the current folder.'); |
$delwarning = &mt('An error occurred updating the contents of the current folder.'); |
} |
} |
} else { |
} else { |
$outcome = 'ok'; |
$delresult = &mt('Archive file removed.'); |
} |
} |
$delresult = &mt('Archive file removed.'); |
|
} |
} |
} |
} |
$env{'form.cmd'} = $currcmd; |
$env{'form.cmd'} = $currcmd; |
Line 3117 sub remove_archive {
|
Line 3122 sub remove_archive {
|
$delresult. |
$delresult. |
'</p>'; |
'</p>'; |
} |
} |
return ($output,$url,$outcome); |
return $output; |
} |
} |
|
|
sub generate_admin_options { |
sub generate_admin_options { |
Line 3166 sub generate_edit_table {
|
Line 3171 sub generate_edit_table {
|
$activetab = $env{'form.active'}; |
$activetab = $env{'form.active'}; |
} |
} |
my $backicon = $iconpath.'clickhere.gif'; |
my $backicon = $iconpath.'clickhere.gif'; |
my $backtext = &mt('Back to Overview'); |
my $backtext = &mt('To Overview'); |
$form = '<div class="LC_Box" style="margin:0;">'. |
$form = '<div class="LC_Box" style="margin:0;">'. |
'<ul id="navigation'.$tid.'" class="LC_TabContent">'. |
'<ul id="navigation'.$tid.'" class="LC_TabContent">'. |
'<li class="goback">'. |
'<li class="goback">'. |