[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonpickcode.pm lonpickcourse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 16 Mar 2006 21:54:40 -0000


albertel		Thu Mar 16 16:54:40 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonpickcourse.pm lonpickcode.pm 
  Log:
  - growing the use of $args in start_page, looklike eventually I'll eliminate all bodytag calls for start_page calls
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.310 loncom/interface/loncommon.pm:1.311
--- loncom/interface/loncommon.pm:1.310	Thu Mar 16 16:34:03 2006
+++ loncom/interface/loncommon.pm	Thu Mar 16 16:54:40 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.310 2006/03/16 21:34:03 albertel Exp $
+# $Id: loncommon.pm,v 1.311 2006/03/16 21:54:40 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3038,6 +3038,7 @@
         %args - additional optional args supported are:
                   only_body  -> is true will set &bodytag() onlybodytag arg on
                   no_nav_bar -> is true will set &bodytag() notopbar arg on
+                  add_entries -> additional attributes to add to the  <body>
 
 =back
 
@@ -3048,8 +3049,8 @@
     return 
 	&Apache::lonxml::xmlbegin().
 	&headtag($title,$head_extra).&endheadtag().
-	&bodytag($title,undef,undef,$args->{'only_body'},undef,undef,undef,
-		 $args->{'no_nav_bar'});
+	&bodytag($title,undef,$args->{'add_entries'},$args->{'only_body'},
+		 undef,undef,undef,$args->{'no_nav_bar'});
 }
 
 =pod
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.40 loncom/interface/lonpickcourse.pm:1.41
--- loncom/interface/lonpickcourse.pm:1.40	Wed Mar 15 17:11:04 2006
+++ loncom/interface/lonpickcourse.pm	Thu Mar 16 16:54:40 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.40 2006/03/15 22:11:04 albertel Exp $
+# $Id: lonpickcourse.pm,v 1.41 2006/03/16 21:54:40 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -42,8 +42,6 @@
     return OK if $r->header_only;
 
 # ------------------------------------------------------------ Print the screen
-    $r->print(&Apache::lonxml::xmlbegin().
-	      &Apache::loncommon::head());
 
 # Get parameters from query string
     &Apache::loncommon::get_unprocessed_cgi
@@ -121,7 +119,9 @@
         $jscript = &Apache::loncommon::check_uncheck_jscript();
         $multelement = '<input type="hidden" name="multiple" value="'.$multiple.'" />';
     }
-    $r->print(&Apache::loncommon::bodytag($title,undef,$loaditem,undef,undef,undef,undef,1));
+    $r->print(&Apache::loncommon::start_page($title,undef,
+					     {'add_entries' => $loaditem,
+					      'no_nav_bar'  => 1, }));
     my %lt=&Apache::lonlocal::texthash(
 				       'cac' => 'Course Activity',
 				       'cde' => 'Course Description',
Index: loncom/interface/lonpickcode.pm
diff -u loncom/interface/lonpickcode.pm:1.9 loncom/interface/lonpickcode.pm:1.10
--- loncom/interface/lonpickcode.pm:1.9	Wed Mar 15 17:11:04 2006
+++ loncom/interface/lonpickcode.pm	Thu Mar 16 16:54:40 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a CODE from the list of possible CODEs
 #
-# $Id: lonpickcode.pm,v 1.9 2006/03/15 22:11:04 albertel Exp $
+# $Id: lonpickcode.pm,v 1.10 2006/03/16 21:54:40 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -87,7 +87,8 @@
 sub code_list {
     my ($r,$secondview)=@_;
     if (!$secondview) {
-	$r->print(&Apache::loncommon::start_page("View CODEs"));
+	$r->print(&Apache::loncommon::start_page("View CODEs",undef,
+						 {'no_nav_bar' => 1}));
 	$r->print("<p>".&mt('Select a set of saved CODEs to view.')."</p>");
     } else {
 	$r->print("<p>".&mt('Select another set of saved CODEs to view.')."</p>");
@@ -105,7 +106,8 @@
 
 sub show_codes {
     my ($r)=@_;
-    $r->print(&Apache::loncommon::start_page("View CODEs"));
+    $r->print(&Apache::loncommon::start_page("View CODEs",undef,
+					     {'no_nav_bar' => 1}));
     my %codes=&Apache::grades::get_codes();
     $r->print("<h2>".$env{'form.scantron_CODElist'}."</h2>");
     $r->print('<pre>');
@@ -118,7 +120,8 @@
 
 sub picking_a_code {
     my ($r)=@_;
-    $r->print(&Apache::loncommon::start_page("Selecting a CODE"));
+    $r->print(&Apache::loncommon::start_page("Selecting a CODE",undef,
+					     {'no_nav_bar' => 1}));
     $r->print(<<ENDSCRIPT);
 <script>
 function gochoose(newcode) {