--- loncom/interface/londocs.pm 2012/04/05 15:22:39 1.480 +++ loncom/interface/londocs.pm 2012/05/06 22:09:14 1.483 @@ -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.483 2012/05/06 22:09:14 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -437,7 +437,13 @@ sub log_docs { sub docs_change_log { my ($r)=@_; my $folder=$env{'form.folder'}; - $r->print(&Apache::loncommon::start_page('Course Document Change Log')); + my $js = ''."\n"; + $r->print(&Apache::loncommon::start_page('Course Document Change Log',$js)); $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course Document Change Log')); my %docslog=&Apache::lonnet::dump('nohist_docslog', $env{'course.'.$env{'request.course.id'}.'.domain'}, @@ -461,7 +467,7 @@ sub docs_change_log { 'randomorder' => 'Randomly ordered', 'set' => 'set to', 'del' => 'deleted'); - $r->print(&Apache::loncommon::display_filter(). + $r->print(&Apache::loncommon::display_filter('docslog'). ''. ''); $r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row(). @@ -2432,10 +2438,11 @@ sub handler { my $docuname=$env{'course.'.$env{'request.course.id'}.'.num'}; my $docudom=$env{'course.'.$env{'request.course.id'}.'.domain'}; my ($destination,$dir_root) = &embedded_destination(); - $r->print(&Apache::loncommon::modify_html_refs('coursedoc',$destination, - $docuname,$docudom,undef, - $dir_root). - &return_to_editor()); + my $result = + &Apache::loncommon::modify_html_refs('coursedoc',$destination, + $docuname,$docudom,undef, + $dir_root); + $r->print($result.&return_to_editor()); } elsif ($env{'form.phase'} eq 'decompress_uploaded') { $uploadphase = 'decompress_phase_one'; $r->print(&decompression_phase_one(). @@ -3047,7 +3054,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 +3075,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 +3088,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 +3113,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 +3129,7 @@ sub remove_archive { $delresult. '

'; } - return ($output,$url,$outcome); + return $output; } sub generate_admin_options { @@ -3166,7 +3178,7 @@ sub generate_edit_table { $activetab = $env{'form.active'}; } my $backicon = $iconpath.'clickhere.gif'; - my $backtext = &mt('Back to Overview'); + my $backtext = &mt('To Overview'); $form = '
'. '