[LON-CAPA-cvs] cvs: loncom /imspackages imsimport.pm /publisher lonupload.pm testbankimport.pm /xml lontex.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 10 Apr 2006 22:30:31 -0000
albertel Mon Apr 10 18:30:31 2006 EDT
Modified files:
/loncom/xml lontex.pm
/loncom/imspackages imsimport.pm
/loncom/publisher lonupload.pm testbankimport.pm
Log:
- rest of the add_entries conversion
Index: loncom/xml/lontex.pm
diff -u loncom/xml/lontex.pm:1.9 loncom/xml/lontex.pm:1.10
--- loncom/xml/lontex.pm:1.9 Fri Mar 24 13:09:23 2006
+++ loncom/xml/lontex.pm Mon Apr 10 18:30:11 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# TeX Content Handler
#
-# $Id: lontex.pm,v 1.9 2006/03/24 18:09:23 albertel Exp $
+# $Id: lontex.pm,v 1.10 2006/04/10 22:30:11 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -97,13 +97,9 @@
&Apache::lontexconvert::init_tth();
- my $load_items =
- 'onLoad="' .&Apache::lonmenu::loadevents(). '" '.
- 'onUnload="'.&Apache::lonmenu::unloadevents().'" ';
$r->print(&Apache::loncommon::start_page(undef,undef,
- {'add_entries' => $load_items,
- 'bgcolor' => '#FFFFFF',
+ {'bgcolor' => '#FFFFFF',
'force_register' => 1,
'only_body' =>
($env{'form.inhibitmenu'}
Index: loncom/imspackages/imsimport.pm
diff -u loncom/imspackages/imsimport.pm:1.19 loncom/imspackages/imsimport.pm:1.20
--- loncom/imspackages/imsimport.pm:1.19 Tue Apr 4 04:18:33 2006
+++ loncom/imspackages/imsimport.pm Mon Apr 10 18:30:20 2006
@@ -39,10 +39,15 @@
sub jscript_one {
my ($fullpath,$jsref) = @_;
+ my %body_layout = ('rightmargin' => "0",
+ 'leftmargin' => "0",
+ 'marginwidth' => "0",
+ 'topmargin' => "0",
+ 'marginheight' => "0");
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'",
+ 'add_entries' => \%body_layout,
'js_ready' => 1,});
my $end_page =
&Apache::loncommon::end_page({'js_ready' => 1,});
@@ -821,7 +826,6 @@
my $javascript = '';
my $page_name = '';
my $current_page = '';
- my $loadentries = '';
my $qcount = '';
# get personal information for this user
@@ -864,7 +868,6 @@
unless ($pathname eq '/') {
$fullpath .= '/';
}
- my $loadentries = '';
my @areas = ();
my %cmsmap = ();
@@ -886,9 +889,7 @@
$javascript = "<script type=\"text/javascript\">\n//<!--\n$javascript\n// --></script>\n";
my $title = 'Upload IMS package to Construction Space';
- $r->print(&Apache::loncommon::start_page($title, $javascript,
- {'add_entries' =>
- $loadentries,}));
+ $r->print(&Apache::loncommon::start_page($title, $javascript));
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
$r->print('<h3><font color=red>'.&mt('Co-Author').': '.$uname.
Index: loncom/publisher/lonupload.pm
diff -u loncom/publisher/lonupload.pm:1.31 loncom/publisher/lonupload.pm:1.32
--- loncom/publisher/lonupload.pm:1.31 Thu Apr 6 18:15:19 2006
+++ loncom/publisher/lonupload.pm Mon Apr 10 18:30:31 2006
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Handler to upload files into construction space
#
-# $Id: lonupload.pm,v 1.31 2006/04/06 22:15:19 albertel Exp $
+# $Id: lonupload.pm,v 1.32 2006/04/10 22:30:31 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -249,11 +249,16 @@
}
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' => "topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'",
+ 'add_entries' => \%body_layout,
'js_ready' => 1,});
my $end_page =
&Apache::loncommon::end_page({'js_ready' => 1,});
Index: loncom/publisher/testbankimport.pm
diff -u loncom/publisher/testbankimport.pm:1.9 loncom/publisher/testbankimport.pm:1.10
--- loncom/publisher/testbankimport.pm:1.9 Thu Apr 6 18:15:19 2006
+++ loncom/publisher/testbankimport.pm Mon Apr 10 18:30:31 2006
@@ -1,5 +1,5 @@
# Handler for parsing text upload problem descriptions into .problems
-# $Id: testbankimport.pm,v 1.9 2006/04/06 22:15:19 albertel Exp $
+# $Id: testbankimport.pm,v 1.10 2006/04/10 22:30:31 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -348,10 +348,16 @@
$source = $env{'form.go'};
}
+ my %body_layout = ('rightmargin' => "0",
+ 'leftmargin' => "0",
+ 'marginwidth' => "0",
+ 'topmargin' => "0",
+ 'marginheight' => "0");
+
my $start_page =
&Apache::loncommon::start_page('Create Testbank directory',undef,
{'only_body' => 1,
- 'add_entries' => "topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'",
+ 'add_entries' => \%body_layout,
'js_ready' => 1,});
my $end_page =
&Apache::loncommon::end_page({'js_ready' => 1,});
@@ -1705,7 +1711,6 @@
my $javascript = '';
my $page_name = '';
my $current_page = '';
- my $loadentries = '';
my $qcount = '';
#
# phase two: re-attach user
@@ -1747,7 +1752,6 @@
my $dirpath = '/home/'.$uname.'/public_html';
my @text = ();
- my $loadentries = '';
if ($env{'form.phase'} eq 'three') {
if (-e "$dirpath$fn") {
open(TESTBANK,"<$dirpath$fn");
@@ -1762,20 +1766,21 @@
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
+ my %loadentries;
if ($env{'form.phase'} eq 'three') {
$current_page = &display_control();
my @PAGES = ('Welcome','Blocks','Format','Target','Confirmation');
$page_name = $PAGES[$current_page];
if ($page_name eq 'Blocks') {
- $loadentries = 'onLoad= "setElements()"';
+ $loadentries{'onload'} = "setElements()";
&jscript_one(\$javascript);
} elsif ($page_name eq 'Format') {
$qcount = question_count($env{'form.qnumformat'},\@text);
&jscript_two(\$javascript,$qcount);
} elsif ($page_name eq 'Target') {
if ($env{'form.go'} eq "PreviousPage") {
- $loadentries = 'onLoad = "setElements()"';
+ $loadentries{'onload'} = "setElements()";
}
&jscript_three($fullpath,\$javascript);
} elsif ($page_name eq 'Confirmation') {
@@ -1788,7 +1793,7 @@
$r->print(&Apache::loncommon::start_page('Upload testbank questions to Construction Space',
$javascript,
- {'add_entries' => $loadentries}));
+ {'add_entries' => \%loadentries}));
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
$r->print('<h3><font color=red>'.&mt('Co-Author').': '.$uname.