--- loncom/publisher/testbankimport.pm 2005/11/08 17:58:35 1.7 +++ loncom/publisher/testbankimport.pm 2006/04/06 19:31:03 1.8 @@ -1,5 +1,5 @@ # Handler for parsing text upload problem descriptions into .problems -# $Id: testbankimport.pm,v 1.7 2005/11/08 17:58:35 albertel Exp $ +# $Id: testbankimport.pm,v 1.8 2006/04/06 19:31:03 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -347,6 +347,14 @@ sub jscript_three { if (exists($env{'form.go'}) ) { $source = $env{'form.go'}; } + + my $start_page = + &Apache::loncommon::start_page('Create IMS import directory',undef, + {'only_body' => 1, + 'add_entries' => "topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'", + 'js_ready' => 1,}); + my $end_page = + &Apache::loncommon::end_page({'js_ready' => 1,}); $$jsref = <<"END_OF_ONE"; function verify() { if ((document.forms.dataForm.newdir.value == '') || (!document.forms.dataForm.newdir.value)) { @@ -371,8 +379,7 @@ function createWin() { document.dataForm.newdir.value = ""; newWindow = window.open("","CreateDir","HEIGHT=400,WIDTH=750,scrollbars=yes") newWindow.document.open() - newWindow.document.write("Create Testbank directory\\n") - newWindow.document.write("\\n") + newWindow.document.write('$start_page') newWindow.document.write("[Author Header]\\n") newWindow.document.write("\\n") newWindow.document.write("\\n") @@ -386,7 +393,8 @@ function createWin() { newWindow.document.write("$fullpath") newWindow.document.write("") newWindow.document.write("\\n") - newWindow.document.write("
  
") + newWindow.document.write("") + newWindow.document.write('$end_page') newWindow.document.close() newWindow.focus() } @@ -1340,8 +1348,6 @@ END_OF_BLOCK - - END_OF_FAIL return; } @@ -1775,12 +1781,15 @@ sub handler { } elsif ($page_name eq 'Confirmation') { &jscript_four(\$javascript,$fullpath); } - } + } + + $javascript = "\n"; + + $r->print(&Apache::loncommon::start_page('Upload testbank questions to Construction Space', + $javascript, + {'add_entries' => $loadentries})); - $r->print("LON-CAPA Construction Space\n"); - - $r->print(&Apache::loncommon::bodytag('Upload testbank questions to Construction Space',undef,$loadentries)); - if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { $r->print('

'.&mt('Co-Author').': '.$uname. &mt(' at ').$udom.'

'); @@ -1805,7 +1814,7 @@ sub handler { } else { &Apache::lonupload::phaseone($r,$fn,$uname,$udom,'testbank'); } - $r->print(''); + $r->print(&Apache::loncommon::end_page()); return OK; } 1;