--- loncom/publisher/lonupload.pm 2005/11/08 17:58:35 1.30
+++ 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.30 2005/11/08 17:58:35 albertel Exp $
+# $Id: lonupload.pm,v 1.32 2006/04/10 22:30:31 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -249,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
@@ -267,8 +281,7 @@ function verifyForm() {
function testbankWin() {
newWindow = window.open("","testbankinfo","HEIGHT=400,WIDTH=750,scrollbars=yes")
newWindow.document.open()
- newWindow.document.write("
'Importing a Testbank file into LON-CAPA\\n")
- newWindow.document.write("\\n")
+ newWindow.document.write('$start_page')
newWindow.document.write("\\n")
newWindow.document.write("\\n")
newWindow.document.write(" | | \\n")
@@ -280,7 +293,8 @@ function testbankWin() {
newWindow.document.write("Multiple choice and multiple answer correct questions should consist of (i) the question number followed by (ii) a question stem beginning on the same line and (iii) two or more foils, with each foil beginning on a new line and prefixed by a unique letter, or Roman numeral, listed in alphabetic or numeric order, beginning at a (alphabetic) or i (Roman numeral), followed by a period, or enclosed in parentheses, i.e., a., (a), i., or (i) .")
newWindow.document.write("If fill-in-the-blank or multiple answer questions have more than one correct answer, each answer should appear in a comma-, tab-, space-, or new line-delimited list. ")
newWindow.document.write("
\\n")
- newWindow.document.write("
")
+ newWindow.document.write("")
+ newWindow.document.write('$end_page')
newWindow.document.close()
newWindow.focus()
}
@@ -316,9 +330,11 @@ function testbankWin() {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
- $r->print("LON-CAPA Construction Space\n");
+ $javascript = "\n";
- $r->print(&Apache::loncommon::bodytag('Upload file to Construction Space'));
+ $r->print(&Apache::loncommon::start_page('Upload file to Construction Space',
+ $javascript));
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
$r->print(''.&mt('Co-Author').': '.$uname.
@@ -331,7 +347,7 @@ function testbankWin() {
&phaseone($r,$fn,$uname,$udom);
}
- $r->print('