--- loncom/publisher/lonupload.pm 2005/04/07 06:56:27 1.29 +++ loncom/publisher/lonupload.pm 2006/04/10 22:30:31 1.32 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # Handler to upload files into construction space # -# $Id: lonupload.pm,v 1.29 2005/04/07 06:56:27 albertel Exp $ +# $Id: lonupload.pm,v 1.32 2006/04/10 22:30:31 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -37,7 +37,6 @@ use File::Basename; use Apache::Constants qw(:common :http :methods); use Apache::loncacc; use Apache::loncommon(); -use Apache::Log(); use Apache::lonnet; use HTML::Entities(); use Apache::lonlocal; @@ -46,17 +45,10 @@ use Apache::lonnet; my $DEBUG=0; sub Debug { - - # Marshall the parameters. - - my $r = shift; - my $log = $r->log; - my $message = shift; - - # Put out the indicated message butonly if DEBUG is false. - + # Put out the indicated message but only if DEBUG is true. if ($DEBUG) { - $log->debug($message); + my ($r,$message) = @_; + $r->log_reason($message); } } @@ -257,6 +249,20 @@ sub handler { } unless ($env{'form.phase'} eq 'two') { + my %body_layout = ('rightmargin' => "0", + 'leftmargin' => "0", + 'marginwidth' => "0", + 'topmargin' => "0", + 'marginheight' => "0"); + my $start_page = + &Apache::loncommon::start_page('Importing a Testbank file into LON-CAPA', + undef, + {'only_body' => 1, + 'add_entries' => \%body_layout, + 'js_ready' => 1,}); + my $end_page = + &Apache::loncommon::end_page({'js_ready' => 1,}); + $javascript = qq| function verifyForm() { var mode = document.fileupload.filetype.options[document.fileupload.filetype.selectedIndex].value @@ -275,8 +281,7 @@ function verifyForm() { function testbankWin() { newWindow = window.open("","testbankinfo","HEIGHT=400,WIDTH=750,scrollbars=yes") newWindow.document.open() - newWindow.document.write("
\\n") @@ -288,7 +293,8 @@ function testbankWin() { newWindow.document.write(" |