[LON-CAPA-cvs] cvs: loncom /interface lonhelpmenu.pm lonindexer.pm lonnavmaps.pm lonnotify.pm lonparmset.pm lonpickcourse.pm lonsupportreq.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 10 Apr 2006 21:40:09 -0000


albertel		Mon Apr 10 17:40:09 2006 EDT

  Modified files:              
    /loncom/interface	lonhelpmenu.pm lonindexer.pm lonnavmaps.pm 
                     	lonnotify.pm lonparmset.pm lonpickcourse.pm 
                     	lonsupportreq.pm 
  Log:
  - change add_entries to pass the hash
  
  
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.23 loncom/interface/lonhelpmenu.pm:1.24
--- loncom/interface/lonhelpmenu.pm:1.23	Thu Mar 23 17:32:10 2006
+++ loncom/interface/lonhelpmenu.pm	Mon Apr 10 17:40:08 2006
@@ -137,11 +137,16 @@
 SCRIPT_TWO
     }
 
-    my $body_layout = 'rightmargin="0" leftmargin="0" marginwidth="0" topmargin="1" marginheight="1"';
+    my %body_layout = 
+	('rightmargin'  => "0",
+	 'leftmargin'   => "0",
+	 'marginwidth'  => "0",
+	 'topmargin'    => "1",
+	 'marginheight' => "1");
     my $start_page = 
 	&Apache::loncommon::start_page('',$scripttag,
 				       {'function'    => $function,
-					'add_entries' => $body_layout,
+					'add_entries' => \%body_layout,
 					'only_body'   => 1,});
     $r->print($start_page);
 
@@ -243,10 +248,13 @@
         'suim' => ' Suggested improvements may include additional functionality, improved usability, or changes to wording used in LON-CAPA pages, including the embedded help system.'
     );
 
+    my %body_layout = 
+	('topmargin'    => "0",
+	 'marginheight' => "0");
     my $start_page =
 	&Apache::loncommon::start_page('Help Content',undef,
 				       {'function'    => $function,
-					'add_entries' => 'topmargin="0" marginheight="0"',
+					'add_entries' => \%body_layout,
 					'only_body'   => 1,});
     $r->print($start_page);
     $r->print($lt{'chen'});
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.141 loncom/interface/lonindexer.pm:1.142
--- loncom/interface/lonindexer.pm:1.141	Thu Mar 16 17:42:58 2006
+++ loncom/interface/lonindexer.pm	Mon Apr 10 17:40:08 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.141 2006/03/16 22:42:58 albertel Exp $
+# $Id: lonindexer.pm,v 1.142 2006/04/10 21:40:08 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -159,7 +159,8 @@
        $r->print(&Apache::loncommon::start_page(undef,$js,
 						{'only_body'   =>1,
 						 'add_entries' =>
-						     'onLoad="load();"',}).
+						     {'onload' => "load();"},}
+						).
 		 &Apache::loncommon::end_page());
        return OK;
    }
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.375 loncom/interface/lonnavmaps.pm:1.376
--- loncom/interface/lonnavmaps.pm:1.375	Mon Apr 10 15:59:53 2006
+++ loncom/interface/lonnavmaps.pm	Mon Apr 10 17:40:08 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.375 2006/04/10 19:59:53 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.376 2006/04/10 21:40:08 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -207,7 +207,8 @@
 						 {'only_body' => 1,
 						  'bgcolor'   => '#FFFFFF',
 						  'add_entries' => 
-						      'onLoad="submitthis()"',}).
+						      {'onload' =>
+							   "submitthis()"}}).
 		  &Apache::loncommon::end_page());
 
         return OK;
Index: loncom/interface/lonnotify.pm
diff -u loncom/interface/lonnotify.pm:1.15 loncom/interface/lonnotify.pm:1.16
--- loncom/interface/lonnotify.pm:1.15	Thu Mar 23 17:32:10 2006
+++ loncom/interface/lonnotify.pm	Mon Apr 10 17:40:08 2006
@@ -104,10 +104,10 @@
         }
     }
     
-    $loadcode = ' onLoad="'.$loadcode.'" '; 
     my $start_page = 
 	&Apache::loncommon::start_page('Broadcast e-mail to users', $jscript,
-				       {'add_entries' => $loadcode,});
+				       {'add_entries' => 
+					    {'onload' => $loadcode,},});
     my $breadcrumbs =
 	&Apache::lonhtmlcommon::breadcrumbs(undef,$bread_title,
 					    'Broadcast_system_email');
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.281 loncom/interface/lonparmset.pm:1.282
--- loncom/interface/lonparmset.pm:1.281	Thu Mar 23 17:32:10 2006
+++ loncom/interface/lonparmset.pm	Mon Apr 10 17:40:08 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.281 2006/03/23 22:32:10 albertel Exp $
+# $Id: lonparmset.pm,v 1.282 2006/04/10 21:40:08 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -634,13 +634,13 @@
 sub startpage {
     my ($r) = @_;
 
-    my $loaditems = 
-	qq|onUnload="pclose()" onLoad="group_or_section('cgroup')"|;
+    my %loaditems = ('onunload' => "pclose()",
+		     'onload'   => ="group_or_section('cgroup')",);
 
     my $start_page = 
 	&Apache::loncommon::start_page('Set/Modify Course Parameters',
 				       &page_js(),
-				       {'add_entries' => $loaditems,});
+				       {'add_entries' => \%loaditems,});
     my $breadcrumbs = 
 	&Apache::lonhtmlcommon::breadcrumbs(undef,
 					    'Table Mode Parameter Setting');
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.41 loncom/interface/lonpickcourse.pm:1.42
--- loncom/interface/lonpickcourse.pm:1.41	Thu Mar 16 16:54:40 2006
+++ loncom/interface/lonpickcourse.pm	Mon Apr 10 17:40:09 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.41 2006/03/16 21:54:40 albertel Exp $
+# $Id: lonpickcourse.pm,v 1.42 2006/04/10 21:40:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -96,10 +96,10 @@
                       ['-1','86400','604800','2592000','7776000',
 		      '15552000','31104000']));
 # if called from loncreateuser, report sections, then close
-    my ($loaditem,$seclist);
+    my (%loaditem,$seclist);
     my $num_sections = 0;
     if ($env{'form.form'} eq 'cu' && $env{'form.pickedcourse'}) {
-        $loaditem = 'onLoad="setSections()"';
+        $loaditem{'onload'} ="setSections()";
         my ($cdom,$cnum) = split/_/,$env{'form.pickedcourse'};
         my %sections_count = ();
         $num_sections = &Apache::loncommon::get_sections($cdom,$cnum,\%sections_count);
@@ -120,7 +120,7 @@
         $multelement = '<input type="hidden" name="multiple" value="'.$multiple.'" />';
     }
     $r->print(&Apache::loncommon::start_page($title,undef,
-					     {'add_entries' => $loaditem,
+					     {'add_entries' => \%loaditem,
 					      'no_nav_bar'  => 1, }));
     my %lt=&Apache::lonlocal::texthash(
 				       'cac' => 'Course Activity',
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.32 loncom/interface/lonsupportreq.pm:1.33
--- loncom/interface/lonsupportreq.pm:1.32	Thu Mar 23 17:32:11 2006
+++ loncom/interface/lonsupportreq.pm	Mon Apr 10 17:40:09 2006
@@ -1,5 +1,5 @@
 #
-# $Id: lonsupportreq.pm,v 1.32 2006/03/23 22:32:11 albertel Exp $
+# $Id: lonsupportreq.pm,v 1.33 2006/04/10 21:40:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -197,12 +197,14 @@
 	
     my $js = '<script type"text/javascript">'."\n$scripttag\n$jscript\n".
 	'</script>';
-    my $add_entries =
-	'topmargin="0" marginheight="0" onLoad="initialize_codes()"',
+    my %add_entries = (topmargin    => "0",
+		       marginheight => "0",
+		       onLoad       =>"initialize_codes()",);
+
     my $start_page =
 	&Apache::loncommon::start_page('Support Request',$js,
 				       { 'function'    => $function,
-					 'add_entries' => $add_entries,
+					 'add_entries' => \%add_entries,
 					 'only_body'   => 1,});
     $r->print($start_page);
 
@@ -696,10 +698,12 @@
 
     my $start_page = 
 	&Apache::loncommon::start_page('Support request recorded',undef,
-				       {'function'   => $function,
-					'addentries' => 
-					    'topmargin="0" marginheight="0"',
-					'only_body' => 1,});
+				       {'function'    => $function,
+					'add_entries' => {
+					    topmargin    => "0",
+					    marginheight => "0",
+					},
+					'only_body'   => 1,});
 
     $r->print(<<"END");
 $start_page