[LON-CAPA-cvs] cvs: loncom /publisher testbankimport.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 06 Apr 2006 19:31:03 -0000
albertel Thu Apr 6 15:31:03 2006 EDT
Modified files:
/loncom/publisher testbankimport.pm
Log:
- start_page
Index: loncom/publisher/testbankimport.pm
diff -u loncom/publisher/testbankimport.pm:1.7 loncom/publisher/testbankimport.pm:1.8
--- loncom/publisher/testbankimport.pm:1.7 Tue Nov 8 12:58:35 2005
+++ loncom/publisher/testbankimport.pm Thu Apr 6 15:31:03 2006
@@ -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 @@
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 @@
document.dataForm.newdir.value = "";
newWindow = window.open("","CreateDir","HEIGHT=400,WIDTH=750,scrollbars=yes")
newWindow.document.open()
- newWindow.document.write("<html><head><title>Create Testbank directory</title><meta http-equiv='pragma' content='no-cache'>\\n")
- newWindow.document.write("</head><body bgcolor='#CCFFDD' topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'>\\n")
+ newWindow.document.write('$start_page')
newWindow.document.write("<img border='0' src='/adm/lonInterFace/author.jpg' alt='[Author Header]'>\\n")
newWindow.document.write("<table border='0' cellspacing='0' cellpadding='0' width='430' bgcolor='#CCFFDD'>\\n")
newWindow.document.write("<tr><td width='2'> </td><td width='3'> </td>\\n")
@@ -386,7 +393,8 @@
newWindow.document.write("$fullpath<input type='text' name='newfilename' value=''/>")
newWindow.document.write("<input type='button' value='Go' onClick='document.fileaction.submit();' />")
newWindow.document.write("</td></tr>\\n")
- newWindow.document.write("</table></body></html>")
+ newWindow.document.write("</table>")
+ newWindow.document.write('$end_page')
newWindow.document.close()
newWindow.focus()
}
@@ -1340,8 +1348,6 @@
</tr>
</table>
</form>
-</body>
-</html>
END_OF_FAIL
return;
}
@@ -1775,12 +1781,15 @@
} elsif ($page_name eq 'Confirmation') {
&jscript_four(\$javascript,$fullpath);
}
- }
+ }
+
+ $javascript = "<script type=\"text/javascript\">\n//<!--\n".
+ $javascript."\n// --></script>\n";
+
+ $r->print(&Apache::loncommon::start_page('Upload testbank questions to Construction Space',
+ $javascript,
+ {'add_entries' => $loadentries}));
- $r->print("<html><head><title>LON-CAPA Construction Space</title><script type=\"text/javascript\">\n//<!--\n$javascript\n// --></script>\n</head>");
-
- $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('<h3><font color=red>'.&mt('Co-Author').': '.$uname.
&mt(' at ').$udom.'</font></h3>');
@@ -1805,7 +1814,7 @@
} else {
&Apache::lonupload::phaseone($r,$fn,$uname,$udom,'testbank');
}
- $r->print('</body></html>');
+ $r->print(&Apache::loncommon::end_page());
return OK;
}
1;