[LON-CAPA-cvs] cvs: loncom /interface lonannounce.pm lonchatfetch.pm lonhelpmenu.pm lonmodifycourse.pm lonnavmaps.pm lonnotify.pm lonparmset.pm lonprintout.pm lonrss.pm lonsimplepage.pm lonspeller.pm lonsupportreq.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 23 Mar 2006 22:32:19 -0000


This is a MIME encoded message

--albertel1143153139
Content-Type: text/plain

albertel		Thu Mar 23 17:32:19 2006 EDT

  Modified files:              
    /loncom/interface	lonannounce.pm lonchatfetch.pm lonhelpmenu.pm 
                     	lonmodifycourse.pm lonnavmaps.pm lonnotify.pm 
                     	lonparmset.pm lonprintout.pm lonrss.pm 
                     	lonsimplepage.pm lonspeller.pm lonsupportreq.pm 
  Log:
  -start_page
  -eliminate calls to bodytag in favor of start_page
  - elimintate call to xmlbegin
  
  
--albertel1143153139
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060323173219.txt"

Index: loncom/interface/lonannounce.pm
diff -u loncom/interface/lonannounce.pm:1.47 loncom/interface/lonannounce.pm:1.48
--- loncom/interface/lonannounce.pm:1.47	Tue Mar 21 15:45:35 2006
+++ loncom/interface/lonannounce.pm	Thu Mar 23 17:32:10 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Announce
 #
-# $Id: lonannounce.pm,v 1.47 2006/03/21 20:45:35 albertel Exp $
+# $Id: lonannounce.pm,v 1.48 2006/03/23 22:32:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -366,7 +366,6 @@
                                      'dlsav' => -1 ));
     my $weekday=$firstday{'weekday'};
 # ------------------------------------------------------------ Print the screen
-    my $html=&Apache::lonxml::xmlbegin();
     my $js = <<ENDDOCUMENT;
 <script type="text/javascript">
 
Index: loncom/interface/lonchatfetch.pm
diff -u loncom/interface/lonchatfetch.pm:1.19 loncom/interface/lonchatfetch.pm:1.20
--- loncom/interface/lonchatfetch.pm:1.19	Sun Mar 19 17:48:53 2006
+++ loncom/interface/lonchatfetch.pm	Thu Mar 23 17:32:10 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Chat Fetching
 #
-# $Id: lonchatfetch.pm,v 1.19 2006/03/19 22:48:53 albertel Exp $
+# $Id: lonchatfetch.pm,v 1.20 2006/03/23 22:32:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -85,9 +85,12 @@
     my $newstuff='';
     my $bottomid='';
     unless ($env{'form.lastid'}) { 
-       $include=1; 
-       my $html=&Apache::lonxml::xmlbegin();
-       $newstuff=$html.'<head></head><body bgcolor="#FFFFFF">';
+	$include=1; 
+	$newstuff .=
+	    &Apache::loncommon::start_page(undef,undef,
+					   {'only_body' => 1,
+					    'bgcolor'   => '#FFFFFF',
+					    'js_ready'  => 1,});
     }
     my @participants=();
     foreach (@entries) {
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.22 loncom/interface/lonhelpmenu.pm:1.23
--- loncom/interface/lonhelpmenu.pm:1.22	Tue Mar 21 13:37:51 2006
+++ loncom/interface/lonhelpmenu.pm	Thu Mar 23 17:32:10 2006
@@ -137,7 +137,6 @@
 SCRIPT_TWO
     }
 
-    my $html=&Apache::lonxml::xmlbegin();
     my $body_layout = 'rightmargin="0" leftmargin="0" marginwidth="0" topmargin="1" marginheight="1"';
     my $start_page = 
 	&Apache::loncommon::start_page('',$scripttag,
Index: loncom/interface/lonmodifycourse.pm
diff -u loncom/interface/lonmodifycourse.pm:1.23 loncom/interface/lonmodifycourse.pm:1.24
--- loncom/interface/lonmodifycourse.pm:1.23	Thu Mar 16 16:39:26 2006
+++ loncom/interface/lonmodifycourse.pm	Thu Mar 23 17:32:10 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # automated enrollment course setup handler
 #
-# $Id: lonmodifycourse.pm,v 1.23 2006/03/16 21:39:26 albertel Exp $
+# $Id: lonmodifycourse.pm,v 1.24 2006/03/23 22:32:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -259,7 +259,7 @@
         }
     }
     my $numlocalcc = @local_ccs;
-    my $bodytag=&Apache::loncommon::bodytag(&mt("Modify Course Settings"));
+
     my $helplink=&Apache::loncommon::help_open_topic('Modify_Course',&mt("Help on Modifying Courses"));
     my ($krbdef,$krbdefdom)=&Apache::loncommon::get_kerberos_defaults($dom);
     my $curr_authtype = '';
@@ -648,7 +648,6 @@
 sub print_header {
     my ($r,$tasklongref,$description,$javascriptref) = @_;
     my %lt =&Apache::lonlocal::texthash(
-             'vmcs' => 'View/Modify Course Settings',
              'chco' => 'Choose a course',
              'main' => 'Main Menu',
              'comg' => 'Course Manager',
@@ -661,7 +660,7 @@
         $description = $lt{'comg'};
     }
     my $page = '';
-    my $bodytag=&Apache::loncommon::bodytag($lt{'vmcs'});
+
     if ($action eq 'start') {  
         $page = "<b>$lt{'chco'}</b>";
     } else {
@@ -673,7 +672,7 @@
             $page .=  " -&gt; <b>".$$tasklongref{$action}."</b>";
         }
     }
-    my $html=&Apache::lonxml::xmlbegin();
+
     my $js;
     if ($action eq 'display') {
 	$js = '<script  type="text/javascript">
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.373 loncom/interface/lonnavmaps.pm:1.374
--- loncom/interface/lonnavmaps.pm:1.373	Sun Mar 19 14:50:40 2006
+++ loncom/interface/lonnavmaps.pm	Thu Mar 23 17:32:10 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.373 2006/03/19 19:50:40 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.374 2006/03/23 22:32:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -203,10 +203,12 @@
 	
   	  </script>
 ENDSUBM
-        $r->print(&Apache::lonxml::xmlbegin().
-		  &Apache::loncommon::head(undef,$js).
-		  '<body bgcolor="#FFFFFF" onLoad="submitthis()">'.
-		  &Apache::loncommon::end_page(undef,$js));
+        $r->print(&Apache::loncommon::start_page(undef,$js,
+						 {'only_body' => 1,
+						  'bgcolor'   => '#FFFFFF',
+						  'add_entries' => 
+						      'onLoad="submitthis()"',}).
+		  &Apache::loncommon::end_page());
 
         return OK;
     }
@@ -267,19 +269,20 @@
     }
 
     # Header
-    $r->print(&Apache::lonxml::xmlbegin().
-	      &Apache::loncommon::head('Navigate Course Contents',$js).
-              &Apache::loncommon::bodytag('Navigate Course Contents','',
-					  $addentries,$body_only,'',
-					  $env{'form.register'}));
-    $r->print('<script>window.focus();</script>');
+    $r->print(&Apache::loncommon::start_page('Navigate Course Contents',$js,
+					     {'add_entries'     => $addentries,
+					      'only_body'       => $body_only,
+					      'force_resgister' =>
+						  $env{'form.register'},}));
+    $r->print('<script type="text/javascript">window.focus();</script>');
      
     $r->rflush();
 
     # Check that it's defined
     if (!($navmap->courseMapDefined())) {
 	$r->print(&Apache::loncommon::help_open_menu('','Navigation Screen','Navigation_Screen','',undef,'RAT'));
-        $r->print('<font size="+2" color="red">Coursemap undefined.</font>' .
+        $r->print('<font size="+2" color="red">'.&mt('Coursemap undefined.').
+		  '</font>' .
                   &Apache::loncommon::end_page());
         return OK;
     }
Index: loncom/interface/lonnotify.pm
diff -u loncom/interface/lonnotify.pm:1.14 loncom/interface/lonnotify.pm:1.15
--- loncom/interface/lonnotify.pm:1.14	Thu Mar 16 15:27:26 2006
+++ loncom/interface/lonnotify.pm	Thu Mar 23 17:32:10 2006
@@ -87,10 +87,6 @@
 sub start_page {
     my ($jscript,$bread_title,$formname) = @_;
 
-    my $html = &Apache::lonxml::xmlbegin();
-
-    my $head = &Apache::loncommon::head('Notification E-mail',$jscript);
-
     my $loadcode;
     if ((defined($env{'form.origin'})) 
 	&& ($env{'form.command'} eq 'compose' 
@@ -109,17 +105,14 @@
     }
     
     $loadcode = ' onLoad="'.$loadcode.'" '; 
-    my $bodytag = 
-	&Apache::loncommon::bodytag('Broadcast e-mail to users', undef,
-				    $loadcode);
-
+    my $start_page = 
+	&Apache::loncommon::start_page('Broadcast e-mail to users', $jscript,
+				       {'add_entries' => $loadcode,});
     my $breadcrumbs =
 	&Apache::lonhtmlcommon::breadcrumbs(undef,$bread_title,
 					    'Broadcast_system_email');
     my $output = <<"ENDONE";
-$html
-$head
-$bodytag
+$start_page
 $breadcrumbs
 <br />
 <form name="$formname" method="POST">
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.280 loncom/interface/lonparmset.pm:1.281
--- loncom/interface/lonparmset.pm:1.280	Thu Mar 16 15:38:19 2006
+++ loncom/interface/lonparmset.pm	Thu Mar 23 17:32:10 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.280 2006/03/16 20:38:19 albertel Exp $
+# $Id: lonparmset.pm,v 1.281 2006/03/23 22:32:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -633,21 +633,19 @@
 }
 sub startpage {
     my ($r) = @_;
-    my $html = &Apache::lonxml::xmlbegin();
-    my $head = &Apache::loncommon::head('LON-CAPA Course Parameters',
-					&page_js());
+
     my $loaditems = 
 	qq|onUnload="pclose()" onLoad="group_or_section('cgroup')"|;
 
-    my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','',
-                                            $loaditems);
+    my $start_page = 
+	&Apache::loncommon::start_page('Set/Modify Course Parameters',
+				       &page_js(),
+				       {'add_entries' => $loaditems,});
     my $breadcrumbs = 
 	&Apache::lonhtmlcommon::breadcrumbs(undef,
 					    'Table Mode Parameter Setting');
     $r->print(<<ENDHEAD);
-$html
-$head
-$bodytag
+$start_page
 $breadcrumbs
 <form method="post" action="/adm/parmset?action=settable" name="parmform">
 <input type="hidden" value='' name="pres_value" />
@@ -2297,7 +2295,6 @@
 	&Apache::loncommon::browser_and_searcher_javascript('parmset').
 	'</script>';
     
-    my $html=&Apache::lonxml::xmlbegin();
     my $start_page = 
 	&Apache::loncommon::start_page('Set Course Environment Parameters',
 				       $browse_js);
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.432 loncom/interface/lonprintout.pm:1.433
--- loncom/interface/lonprintout.pm:1.432	Tue Mar 21 13:43:49 2006
+++ loncom/interface/lonprintout.pm	Thu Mar 23 17:32:10 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.432 2006/03/21 18:43:49 albertel Exp $
+# $Id: lonprintout.pm,v 1.433 2006/03/23 22:32:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1022,14 +1022,8 @@
     my ($r,$helper,$rparmhash) = @_;
     my %parmhash = %$rparmhash;
     my $resources_printed = '';
-    my $html=&Apache::lonxml::xmlbegin();
-    my $headtag     = &Apache::loncommon::headtag('Preparing Printout');
-    my $end_headtag = &Apache::loncommon::endheadtag();
-    my $bodytag     = &Apache::loncommon::bodytag('Preparing Printout');
-    $r->print(<<ENDPART);
-$html
-$headtag
-<script type="text/javascript" language="Javascript">
+    my $js = <<ENDPART;
+<script type="text/javascript">
     var editbrowser;
     function openbrowser(formname,elementname,only,omit) {
         var url = '/res/?';
@@ -1053,14 +1047,12 @@
         editbrowser.focus();
     }
 </script>
-$end_headtag
-$bodytag
-<p>
-Please stand by while processing your print request, this may take some time ...
-</p>
 ENDPART
 
+    my $start_page  = &Apache::loncommon::start_page('Preparing Printout',$js);
+    my $msg = &mt('Please stand by while processing your print request, this may take some time ...');
 
+    $r->print($start_page."\n<p>\n$msg\n</p>\n");
 
     # fetch the pagebreaks and store them in the course environment
     # The page breaks will be pulled into the hash %page_breaks which is
Index: loncom/interface/lonrss.pm
diff -u loncom/interface/lonrss.pm:1.12 loncom/interface/lonrss.pm:1.13
--- loncom/interface/lonrss.pm:1.12	Tue Mar 21 16:25:33 2006
+++ loncom/interface/lonrss.pm	Thu Mar 23 17:32:11 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # RSS Feeder
 #
-# $Id: lonrss.pm,v 1.12 2006/03/21 21:25:33 albertel Exp $
+# $Id: lonrss.pm,v 1.13 2006/03/23 22:32:11 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -181,10 +181,10 @@
     my $feedname=&feedname($filename);
     my $displayfeedname=&displayfeedname($filename,$uname,$udom);
     if ($html) {
-	$r->print(&Apache::lonxml::xmlbegin().
-		  &Apache::loncommon::head($displayfeedname).
-		  &Apache::loncommon::bodytag($displayfeedname,'','','',$udom,
-					      $env{'form.register'}).
+	$r->print(&Apache::loncommon::start_page($displayfeedname,undef,
+						 {'domain'         => $udom,
+						  'force_register' =>
+						      $env{'form.register'}}).
 		  &changed_js());
 
     } else {
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.34 loncom/interface/lonsimplepage.pm:1.35
--- loncom/interface/lonsimplepage.pm:1.34	Tue Mar 21 16:07:31 2006
+++ loncom/interface/lonsimplepage.pm	Thu Mar 23 17:32:11 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.34 2006/03/21 21:07:31 albertel Exp $
+# $Id: lonsimplepage.pm,v 1.35 2006/03/23 22:32:11 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -104,7 +104,6 @@
     if ($env{'form.register'}) {
        $addentries=' onLoad="'.&Apache::lonmenu::loadevents().
 	   '" onUnload="'.&Apache::lonmenu::unloadevents().'"';
-       $r->print(&Apache::lonmenu::registerurl(1));
     }
 # --------------------------------------------------------------- Force Student
     my $forcestudent='';
@@ -122,10 +121,14 @@
         if ($caller eq 'grppg') {
             $title = 'Group Page';
         }
-	$r->print(&Apache::lonhtmlcommon::htmlareaheaders().
-		  &Apache::loncommon::endheadtag().
-		  &Apache::loncommon::bodytag($title,$forcestudent,$addentries,
-					      '',$dom,$env{'form.register'}));
+	my $start_page = 
+	    &Apache::loncommon::start_page($title,undef,
+					   {'function'       => $forcestudent,
+					    'add_entries'    => $addentries,
+					    'domain'         => $dom,
+					    'force_register' =>
+						$env{'form.register'},});
+	$r->print($start_page);
     }
 
     if ($caller eq 'grppg') {
@@ -137,15 +140,15 @@
                 return OK;
             }
         } else {
+	    my $msg = 
+		&mt('You do not currently have rights to view this group.');
             if ($target ne 'tex') {
-                $r->print(&Apache::loncommon::endheadtag().
-			  &Apache::loncommon::bodytag().
-			  'You do not currently have rights to view this group.'.
+                $r->print("<p>$msg</p>".
 			  &Apache::loncommon::end_page());
-                return OK;
             } else {
-                $r->print('\textbf{You do not currently have rights to view this group}\end{document}');
+                $r->print('\textbf{'.$msg.'}\end{document}');
             }
+	    return OK;
         }
     }
 
Index: loncom/interface/lonspeller.pm
diff -u loncom/interface/lonspeller.pm:1.13 loncom/interface/lonspeller.pm:1.14
--- loncom/interface/lonspeller.pm:1.13	Tue Mar 21 15:19:41 2006
+++ loncom/interface/lonspeller.pm	Thu Mar 23 17:32:11 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Interface routines for Aspell
 #
-# $Id: lonspeller.pm,v 1.13 2006/03/21 20:19:41 albertel Exp $
+# $Id: lonspeller.pm,v 1.14 2006/03/23 22:32:11 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -134,9 +134,11 @@
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});
 
     &initspeller();
-    my $html = &Apache::lonxml::xmlbegin();
-    my $head = &Apache::loncommon::head('Spell Checker');
-    $r->print($html.$head.'<body bgcolor="#DDDDDD">'.
+    my $start_page = 
+	&Apache::loncommon::start_page('Spell Checker',undef,
+				       {'only_body' => 1,
+					'bgcolor'   => '#DDDDDD'});
+    $r->print($start_page.
 	      &Apache::lontexconvert::msgtexconverted(
 				     &markeduptext($env{'form.text'})).
 	      &Apache::loncommon::end_page());
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.31 loncom/interface/lonsupportreq.pm:1.32
--- loncom/interface/lonsupportreq.pm:1.31	Thu Mar 23 17:01:57 2006
+++ loncom/interface/lonsupportreq.pm	Thu Mar 23 17:32:11 2006
@@ -1,5 +1,5 @@
 #
-# $Id: lonsupportreq.pm,v 1.31 2006/03/23 22:01:57 albertel Exp $
+# $Id: lonsupportreq.pm,v 1.32 2006/03/23 22:32:11 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -643,7 +643,6 @@
     my @loncvars = ('user.name','user.domain','request.course.sec','request.course.id');
     my @cookievars = ('lonID');
 
-    my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1);
     my $admin = $Apache::lonnet::perlvar{'lonAdminMail'};
     my $to =  $Apache::lonnet::perlvar{'lonSupportEMail'};
     my $from = $admin;
@@ -694,12 +693,16 @@
 <font color="$fontcolor">URL: </font><font color="$vlinkcolor">$env{'form.sourceurl'}</font><br />
 <font color="$fontcolor">Date/Time: </font><font color="$vlinkcolor">$reporttime</font><br />
     |;
-    my $html=&Apache::lonxml::xmlbegin();
-    my $head = &Apache::loncommon::head('LON-CAPA support request recorded');
+
+    my $start_page = 
+	&Apache::loncommon::start_page('Support request recorded',undef,
+				       {'function'   => $function,
+					'addentries' => 
+					    'topmargin="0" marginheight="0"',
+					'only_body' => 1,});
+
     $r->print(<<"END");
-$html
-$head
-$bodytag
+$start_page
 <form name="logproblem">
 <input type="hidden" name="action" value="result" />
 </form>

--albertel1143153139--