[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm lonsimplepage.pm lonsource.pm lonspeller.pm lonstatistics.pm lonsupportreq.pm lonsyllabus.pm lontest.pm lontrackstudent.pm lonviewclasslist.pm lonwhatsnew.pm portfolio.pm slotrequest.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 15 Mar 2006 19:41:30 -0000


This is a MIME encoded message

--albertel1142451690
Content-Type: text/plain

albertel		Wed Mar 15 14:41:30 2006 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm lonsimplepage.pm lonsource.pm 
                     	lonspeller.pm lonstatistics.pm lonsupportreq.pm 
                     	lonsyllabus.pm lontest.pm lontrackstudent.pm 
                     	lonviewclasslist.pm lonwhatsnew.pm portfolio.pm 
                     	slotrequest.pm 
  Log:
  - converting some interface pages to stop generating </body> <head> </head> </html> and use the helper functions instead
  
  
--albertel1142451690
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060315144130.txt"

Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.183 loncom/interface/lonfeedback.pm:1.184
--- loncom/interface/lonfeedback.pm:1.183	Mon Mar  6 14:21:22 2006
+++ loncom/interface/lonfeedback.pm	Wed Mar 15 14:41:26 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.183 2006/03/06 19:21:22 www Exp $
+# $Id: lonfeedback.pm,v 1.184 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2541,7 +2541,6 @@
     }
     if (($symb) && ($email)) {
         if ($env{'form.editdisc'}) {
-            my %newcontrib = ();
             $contrib{'ip'}=$ENV{'REMOTE_ADDR'};
             $contrib{'host'}=$Apache::lonnet::perlvar{'lonHostID'};
             $contrib{'timestamp'} = time;
@@ -2584,10 +2583,6 @@
                 }
             }
             $contrib{'history'} .= $oldcontrib{$oldidx.':timestamp'};
-            foreach (keys %contrib) {
-                my $key = $oldidx.':'.&Apache::lonnet::escape($oldsymb).':'.$_;                                                                               
-                $newcontrib{$key} = $contrib{$_};
-            }
             my $put_reply = &Apache::lonnet::putstore($env{'request.course.id'},
                   $oldsymb,$oldidx,\%contrib,
                   $env{'course.'.$env{'request.course.id'}.'.domain'},
@@ -3498,30 +3493,25 @@
     my $cid = $env{'request.course.id'};
     my $role = (split(/\./,$env{'request.role'}))[0];
     my $section = $env{'request.course.sec'};
-    my $allow_editing_config = $env{'course.'.$env{'request.course.id'}.
-                               '.allow_discussion_post_editing'};
+    my $allow_editing_config = 
+	$env{'course.'.$cid.'.allow_discussion_post_editing'};
     if ($allow_editing_config =~ m/^\s*yes\s*$/i) {
         $can_edit = 1;
     } else {
-        my @editor_roles = split(/,/,$allow_editing_config);
-        if (@editor_roles > 0) {
-            foreach my $editor (@editor_roles) {
-                my ($editor_role,$editor_sec) = split(/:/,$editor);
-                if ($editor_role eq $role) {
-                    if (defined($editor_sec)) {
-                        if (defined($section)) {
-                            if ($editor_sec eq $section) {
-                                $can_edit = 1;
-                                last;
-                            }
-                        }
-                    } else {
-                        $can_edit = 1;
-                        last;
-                    }
-                }
-            }
-        }
+	foreach my $editor (split(/,/,$allow_editing_config)) {
+	    my ($editor_role,$editor_sec) = split(/:/,$editor);
+	    if ($editor_role eq $role
+		&& defined($editor_sec)
+		&& defined($section)
+		&& $editor_sec eq $section) {
+		$can_edit = 1;
+		last;
+	    }
+	    if ($editor_role eq $role
+		&& !defined($editor_sec)) {
+		$can_edit = 1;
+	    }
+	}
     }
     return $can_edit;
 }
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.31 loncom/interface/lonsimplepage.pm:1.32
--- loncom/interface/lonsimplepage.pm:1.31	Mon Nov 21 19:01:41 2005
+++ loncom/interface/lonsimplepage.pm	Wed Mar 15 14:41:26 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.31 2005/11/22 00:01:41 raeburn Exp $
+# $Id: lonsimplepage.pm,v 1.32 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -38,6 +38,15 @@
 use Apache::lonprintout;
 use Apache::lonxml;
 
+sub error {
+    my ($r,$msg) = @_;
+    $r->print(&Apache::loncommon::endheadtag().
+	      &Apache::loncommon::bodytag().
+	      &mt($msg).
+	      &Apache::loncommon::end_page());
+    return OK;
+}
+
 sub handler {
     my $r = shift;
     &Apache::loncommon::content_type($r,'text/html');
@@ -46,12 +55,10 @@
     my $target=$env{'form.grade_target'};
 # ------------------------------------------------------------ Print the screen
     if ($target ne 'tex') {
+	my $html=
 	my $html=&Apache::lonxml::xmlbegin();
-	$r->print(<<ENDDOCUMENT);
-$html
-<head>
-<title>The LearningOnline Network with CAPA</title>
-ENDDOCUMENT
+	$r->print(&Apache::lonxml::xmlbegin().
+		  &Apache::loncommon::headtag());
     } else {
 	$r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'}));
     } 
@@ -59,8 +66,7 @@
 # Is this even in a course?
     unless ($env{'request.course.id'}) {
 	if ($target ne 'tex') {
-	    $r->print('</head><body>Not in a course</body></html>');
-	    return OK;
+	    return &error($r,'Not in a course');
 	} else {
 	    $r->print('\textbf{Not in a course}\end{document}');
 	}
@@ -79,8 +85,7 @@
         $namespace = 'grppage_'.$marker;
         my %curr_groups;
         if (!&Apache::loncommon::coursegroups(\%curr_groups,$dom,$crs,$marker)) {
-            $r->print('<body>Invalid group name</body>');
-            return OK;
+	    return &error($r,'Invalid group name');
         }
         %groupinfo = &Apache::loncommon::get_group_settings($curr_groups{$marker});
     } else {  
@@ -88,9 +93,8 @@
         $namespace = 'smppage_'.$marker;
     }
 
-    unless ($marker) {
-	$r->print('<body>Invalid call</body>');
-        return OK;
+    if (!$marker) {
+	return &error($r,'Invalid call');
     }
 
 # --------------------------------------------------------- The syllabus fields
@@ -130,8 +134,9 @@
             $title = 'Group Page';
         }
 	$r->print(&Apache::lonhtmlcommon::htmlareaheaders().
-		  '</head>'.&Apache::loncommon::bodytag
-		  ($title,$forcestudent,$addentries,'',$dom,$env{'form.register'}));
+		  &Apache::loncommon::endheadtag().
+		  &Apache::loncommon::bodytag($title,$forcestudent,$addentries,
+					      '',$dom,$env{'form.register'}));
     }
 
     if ($caller eq 'grppg') {
@@ -144,9 +149,10 @@
             }
         } else {
             if ($target ne 'tex') {
-                $r->print('</head><body>You do not currently have rights to
-                                        view this group.
-                           </body></html>');
+                $r->print(&Apache::loncommon::endheadtag().
+			  &Apache::loncommon::bodytag().
+			  'You do not currently have rights to view this group.'.
+			  &Apache::loncommon::end_page());
                 return OK;
             } else {
                 $r->print('\textbf{You do not currently have rights to view this group}\end{document}');
@@ -302,7 +308,7 @@
 	$r->print('<p>No page information provided.</p>');
     }
     if ($env{'form.grade_target'} ne 'tex') {
-	$r->print('</body></html>');
+	$r->print(&Apache::loncommon::end_page());
     } else {
 	$r->print('\end{document}');
     }
Index: loncom/interface/lonsource.pm
diff -u loncom/interface/lonsource.pm:1.15 loncom/interface/lonsource.pm:1.16
--- loncom/interface/lonsource.pm:1.15	Fri Jul  8 06:39:49 2005
+++ loncom/interface/lonsource.pm	Wed Mar 15 14:41:26 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Souce Code handler
 #
-# $Id: lonsource.pm,v 1.15 2005/07/08 10:39:49 www Exp $
+# $Id: lonsource.pm,v 1.16 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -54,9 +54,7 @@
     &Apache::loncommon::content_type($r,'text/html');
     my ($uname, $udom) = &Apache::loncacc::constructaccess('/~'.$author.'/',$r->dir_config('lonDefDomain'));
     $r->send_http_header;
-    my $html=&Apache::lonxml::xmlbegin();
-    $r->print($html.'<head><title>LON-CAPA Move source to construction space</title>');
-    $r->print(&Apache::loncommon::bodytag('Problem source code moving operation'));
+    $r->print(&Apache::loncommon::start_page('Problem source code moving operation'));
     $r->print("Please enter the directory that you would like the source code to go into, a default has also been 			provided <br />");
     $r->print("Also note, the path is in reference to the root of your construction space, and new directories will be 			automatically created. <br /><br />");
     $r->print('<form name="copy" action="/adm/source" target="_parent" method="post">
@@ -94,9 +92,7 @@
     }
     &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
-    my $html=&Apache::lonxml::xmlbegin();
-    $r->print($html.'<head><title>LON-CAPA Move source to construction space</title>');
-    $r->print(&Apache::loncommon::bodytag('Copying Source'));
+    $r->print(&Apache::loncommon::start_page('Copying Source'));
     my $result = &Apache::loncfile::exists($uname, $udom, $path_to_new_file);
     $r->print($result);
     if(($result) && ($result =~ m|published|) ) {
Index: loncom/interface/lonspeller.pm
diff -u loncom/interface/lonspeller.pm:1.11 loncom/interface/lonspeller.pm:1.12
--- loncom/interface/lonspeller.pm:1.11	Thu Apr  7 02:56:23 2005
+++ loncom/interface/lonspeller.pm	Wed Mar 15 14:41:26 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Interface routines for Aspell
 #
-# $Id: lonspeller.pm,v 1.11 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonspeller.pm,v 1.12 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -128,13 +128,12 @@
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});
 
     &initspeller();
-    my $html=&Apache::lonxml::xmlbegin();
-    $r->print($html.'<head><title>'.
-	      &mt('Spell Checker').
-	      '</title></head><body bgcolor="#DDDDDD">'.
+    my $html = &Apache::lonxml::xmlbegin();
+    my $head = &Apache::loncommon::head('Spell Checker');
+    $r->print($html.$head.'<body bgcolor="#DDDDDD">'.
 	      &Apache::lontexconvert::msgtexconverted(
 				     &markeduptext($env{'form.text'})).
-	      '</body></html>');
+	      &Apache::loncommon::end_page());
     return OK;
 }
 
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.128 loncom/interface/lonstatistics.pm:1.129
--- loncom/interface/lonstatistics.pm:1.128	Tue Feb 14 11:05:37 2006
+++ loncom/interface/lonstatistics.pm	Wed Mar 15 14:41:26 2006
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstatistics.pm,v 1.128 2006/02/14 16:05:37 albertel Exp $
+# $Id: lonstatistics.pm,v 1.129 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -990,12 +990,9 @@
     td.essay          { border: 1px solid gray; }
 </style>
 ENDSTYLE
-    my $html=&Apache::lonxml::xmlbegin();
-    $r->print($html.'<head><title>'.
-              &mt('Course Statistics and Charts').
-              '</title>'.$style.
-              "</head>\n".
-              &Apache::loncommon::bodytag('Course Statistics and Charts'));
+      
+    $r->print(&Apache::loncommon::start_page('Course Statistics and Charts',
+					     $style));
     $r->rflush();
     # 
     # Either print out a menu for them or send them to a report
@@ -1025,7 +1022,7 @@
                           'retrieved until the database is restarted.  '.
                           'Your data is intact but cannot be displayed '.
                           'at this time.').'</p>');
-            $r->print('</body></html>');
+            $r->print(&Apache::loncommon::end_page());
             return;
         }
         #
@@ -1093,7 +1090,7 @@
         #
         $r->print("</form>\n");
     }
-    $r->print("</body>\n</html>\n");
+    $r->print(&Apache::loncommon::end_page());
     $r->rflush();
     #
     return OK;
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.29 loncom/interface/lonsupportreq.pm:1.30
--- loncom/interface/lonsupportreq.pm:1.29	Thu Oct 13 13:18:14 2005
+++ loncom/interface/lonsupportreq.pm	Wed Mar 15 14:41:26 2006
@@ -1,5 +1,5 @@
 #
-# $Id: lonsupportreq.pm,v 1.29 2005/10/13 17:18:14 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.30 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -195,16 +195,18 @@
             }
         }
     }
+	
     my $html=&Apache::lonxml::xmlbegin();
+    my $head = &Apache::loncommon::headtag('LON-CAPA support request');
+    my $end_head = &Apache::loncommon::endheadtag();
     $r->print(<<ENDHEAD);
 $html
-<head>
- <title>LON-CAPA support request</title>
+$head
 <script type"text/javascript">
 $scripttag
 $jscript
 </script>
-</head>
+$end_head
 $bodytag
 ENDHEAD
     if ($r->uri eq '/adm/helpdesk') {
@@ -595,6 +597,7 @@
            </tr>
 END
     }
+
     $r->print(<<END);
            <tr>
             <td width="140" bgcolor="$tablecolor">
@@ -631,9 +634,8 @@
   </tr>
  </table>
 </form>
-</body>
-</html>
 END
+    $r->print(&Apache::loncommon::end_page());
     return;
 }
 
@@ -696,11 +698,10 @@
 <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');
     $r->print(<<"END");
 $html
-<head>
- <title>LON-CAPA support request recorded</title>
-</head>
+$head
 $bodytag
 <form name="logproblem">
 <input type="hidden" name="action" value="result" />
@@ -891,9 +892,8 @@
    </td>
   </tr>
  </table>
-</body>
-</html>
     ");
+    $r->print(&Apache::loncommon::end_page());
 }
 
 sub print_header {
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.47 loncom/interface/lonsyllabus.pm:1.48
--- loncom/interface/lonsyllabus.pm:1.47	Tue Mar  7 16:36:20 2006
+++ loncom/interface/lonsyllabus.pm	Wed Mar 15 14:41:26 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.47 2006/03/07 21:36:20 www Exp $
+# $Id: lonsyllabus.pm,v 1.48 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -56,7 +56,9 @@
     if ($homeserver eq 'no_host') {
         &Apache::loncommon::content_type($r,'text/html');
         $r->send_http_header;
-        $r->print('<html><body>'.&mt('No syllabus available').'</body></html>');
+        $r->print(&Apache::loncommon::startpage('No syllabus available').
+		  &mt('No syllabus available').
+		  &Apache::loncommon::end_page());
         return OK;
     }
 # ------------------------------------- There is such a course, get environment
@@ -66,10 +68,10 @@
     my $feedurl='http://'.$ENV{'HTTP_HOST'}.'/public/'.$cdom.'/'.$cnum.'/Course_Announcements.rss';
     if ($target ne 'tex') {
 	my $html=&Apache::lonxml::xmlbegin();
+	my $head=&Apache::loncommon::headtag('The LearningOnline Network with CAPA');
 	$r->print(<<ENDDOCUMENT);
 $html
-<head>
-<title>The LearningOnline Network with CAPA</title>
+$head
 <link rel="alternate" type="application/rss+xml" title="Course Announcements" href="$feedurl" />
 ENDDOCUMENT
     } else {
@@ -85,27 +87,29 @@
 # -------------------------------------------------- Let's see who handles this
     my $externalsyllabus=$courseenv{'externalsyllabus'};
     if ($externalsyllabus=~/\w/) {
-       $r->print('</head>');
+       $r->print(&Apache::loncommon::endheadtag());
        if ($env{'form.wrapperdisplay'} eq 'menu') {
 #
 # Producing the menu buttons
 #
            $r->print('<body bgcolor="#FFFFFF">'.
-                &Apache::lonmenu::menubuttons(1,'web',1).'</body></html>');
+		     &Apache::lonmenu::menubuttons(1,'web',1).
+		     &Apache::loncommon::end_page());
         } else {
            if ($env{'browser.interface'} eq 'textual') {
 #
 # ssi-based rendering for text-based interface
 #
                $r->print('<body bgcolor="#FFFFFF">'.
-                        &Apache::lonmenu::menubuttons(1).
-                        &Apache::lonnet::ssi_body($externalsyllabus).'</body></html>');
+			 &Apache::lonmenu::menubuttons(1).
+			 &Apache::lonnet::ssi_body($externalsyllabus).
+			 &Apache::loncommon::end_page());
            } elsif ($env{'environment.remote'} eq 'off') {
 #
 # This is inline remote
 # 
                $r->print(<<ENDDOCUMENTINL);
-<frameset rows="180,*" border=0 $addentries>
+<frameset rows="180,*" border="0" $addentries>
 <frame src="/public/$cdom/$cnum/syllabus?wrapperdisplay=menu">
 <frame src="$externalsyllabus">
 </frameset>
@@ -116,7 +120,7 @@
 # frame-based rendering for graphical interface
 #
                $r->print(<<ENDDOCUMENT);
-<frameset rows="1,*" border=0 $addentries>
+<frameset rows="1,*" border="0" $addentries>
 <frame src="/adm/rat/empty.html">
 <frame src="$externalsyllabus">
 </frameset>
@@ -154,8 +158,8 @@
 # ----------------------------------------------------------------- Make header 
     if ($target ne 'tex') {
 	$r->print(&Apache::lonhtmlcommon::htmlareaheaders().
-		  '</head>'.&Apache::loncommon::bodytag
-            ("Syllabus",$forcestudent,$addentries,'',$cdom,$env{'form.register'}));
+		  &Apache::loncommon::endheadtag().
+		  &Apache::loncommon::bodytag("Syllabus",$forcestudent,$addentries,'',$cdom,$env{'form.register'}));
 	$r->print('<h1>'.$courseenv{'description'}.'</h1><h3>'.
                  $Apache::lonnet::domaindescription{$cdom}.'</h3>');
     } else {
@@ -373,7 +377,11 @@
 	$r->print('No syllabus information provided.');
 	if ($target ne 'tex') {$r->print('</p>');}
     }
-    if ($target ne 'tex') {$r->print('</body></html>');} else {$r->print('\end{document}');}
+    if ($target ne 'tex') {
+	$r->print(&Apache::loncommon::end_page());
+    } else {
+	$r->print('\end{document}');
+    }
     return OK;
 } 
 
Index: loncom/interface/lontest.pm
diff -u loncom/interface/lontest.pm:1.17 loncom/interface/lontest.pm:1.18
--- loncom/interface/lontest.pm:1.17	Thu Apr  7 04:15:41 2005
+++ loncom/interface/lontest.pm	Wed Mar 15 14:41:26 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # A debugging harness.
 #
-# $Id: lontest.pm,v 1.17 2005/04/07 08:15:41 albertel Exp $
+# $Id: lontest.pm,v 1.18 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -86,7 +86,7 @@
 
     my $html=&Apache::lonxml::xmlbegin();
     my $bodytag=&Apache::loncommon::bodytag("List Environment","admin");
-    $r->print($html.'<head></head>'.$bodytag);
+    $r->print($html.&Apache::loncommon::head().$bodytag);
 
     $r->print("<hr /><h1>Debugging</h1><hr />\n");
     $r->print("<font face='Courier'>");
@@ -146,7 +146,7 @@
     }
  
 # ------------------------------------------------------------------- End Debug
-     $r->print('</body></html>');    
+     $r->print(&Apache::loncommon::end_page());    
      return OK;
  }
 
Index: loncom/interface/lontrackstudent.pm
diff -u loncom/interface/lontrackstudent.pm:1.17 loncom/interface/lontrackstudent.pm:1.18
--- loncom/interface/lontrackstudent.pm:1.17	Mon Jan 16 12:34:15 2006
+++ loncom/interface/lontrackstudent.pm	Wed Mar 15 14:41:26 2006
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lontrackstudent.pm,v 1.17 2006/01/16 17:34:15 www Exp $
+# $Id: lontrackstudent.pm,v 1.18 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -510,11 +510,7 @@
                                             bug=>'instructor interface'});
     #
     # Give the LON-CAPA page header
-    my $html=&Apache::lonxml::xmlbegin();
-    $r->print($html.'<head>'.&styles().'<title>'.
-              &mt('Student Activity').
-              "</title></head>\n".
-              &Apache::loncommon::bodytag('Student Activity').
+    $r->print(&Apache::loncommon::start_page('Student Activity',&styles()).
               &Apache::lonhtmlcommon::breadcrumbs(undef,'Student Activity'));
     $r->rflush();
     #
@@ -562,7 +558,7 @@
     &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
     #
     $r->print("</form>\n");
-    $r->print("</body>\n</html>\n");
+    $r->print(&Apache::loncommon::end_page());
     $r->rflush();
     #
     return OK;
Index: loncom/interface/lonviewclasslist.pm
diff -u loncom/interface/lonviewclasslist.pm:1.5 loncom/interface/lonviewclasslist.pm:1.6
--- loncom/interface/lonviewclasslist.pm:1.5	Thu Apr  7 02:56:23 2005
+++ loncom/interface/lonviewclasslist.pm	Wed Mar 15 14:41:26 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to display the classlist 
 #
-# $Id: lonviewclasslist.pm,v 1.5 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonviewclasslist.pm,v 1.6 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -76,16 +76,11 @@
     &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     #
-    my $bodytag=&Apache::loncommon::bodytag('Classlist');
-    my $breadcrumbs=&Apache::lonhtmlcommon::breadcrumbs(undef,
-                                                        'Enrollment Manager');
-    my $html=&Apache::lonxml::xmlbegin();
+    my $start      = &Apache::loncommon::start_page('Classlist');
+    my $breadcrumbs= &Apache::lonhtmlcommon::breadcrumbs(undef,
+							 'Enrollment Manager');
     $r->print(<<ENDHEADER);
-$html
-<head>
-<title>Classlist</title>
-</head>
-$bodytag
+$start_page
 $breadcrumbs
 ENDHEADER
     #
@@ -101,7 +96,7 @@
     }
     #
     # Finish up
-    $r->print('</body></html>');
+    $r->print(&Apache::loncommon::end_page());
     return OK;
 }
 
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.51 loncom/interface/lonwhatsnew.pm:1.52
--- loncom/interface/lonwhatsnew.pm:1.51	Sat Mar  4 00:59:01 2006
+++ loncom/interface/lonwhatsnew.pm	Wed Mar 15 14:41:26 2006
@@ -1,5 +1,5 @@
 #
-# $Id: lonwhatsnew.pm,v 1.51 2006/03/04 05:59:01 albertel Exp $
+# $Id: lonwhatsnew.pm,v 1.52 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -183,12 +183,12 @@
         &display_actions_box($r,$tabbg,$command,$refpage,\%threshold_titles,
                         \%interval_titles,\%initpage,$cdom,$crs,$checkallowed);
     }
+    my $end_page = &Apache::loncommon::end_page();
     $r->print(<<END_OF_BLOCK);
   </td>
  </tr>
 </table><br />
-</body>
-</html>
+$end_page
 END_OF_BLOCK
 }
 
@@ -201,8 +201,7 @@
 
 sub display_header {
     my ($command,$checkallowed) = @_;
-    my $html=&Apache::lonxml::xmlbegin();
-    my $bodytag=&Apache::loncommon::bodytag('Course Action Items');
+    
     my $scripttag;
     unless ($command eq 'chgthreshold' || $command eq 'chginterval') {
        $scripttag = <<"END";
@@ -226,14 +225,7 @@
 </script>
 ';
     }
-    return(<<ENDHEAD);
-$html
-<head>
-<title>Course Action Items</title>
-$scripttag
-</head>
-$bodytag
-ENDHEAD
+    return &Apache::loncommon::start_page('Course Action Items',$scripttag); 
 }
 
 #-------------------------------
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.94 loncom/interface/portfolio.pm:1.95
--- loncom/interface/portfolio.pm:1.94	Fri Mar  3 18:27:25 2006
+++ loncom/interface/portfolio.pm	Wed Mar 15 14:41:26 2006
@@ -681,7 +681,7 @@
     $r->send_http_header;
     # Give the LON-CAPA page header
     my $html=&Apache::lonxml::xmlbegin();
-    $r->print($html.'<head><title>'.$title."</title></head>\n");
+    $r->print($html.&Apache::loncommon::head($title)."\n");
     if ($env{"form.mode"} eq 'selectfile'){
         $r->print(&Apache::loncommon::bodytag($title,undef,undef,1));
     } else {
@@ -749,7 +749,7 @@
 	my $is_empty=(@dir_list == 2);
 	&display_common($r,$url,$current_path,$is_empty,\@dir_list,$group);
         &display_directory($r,$url,$current_path,$is_empty,\@dir_list,$group);
-	$r->print("</body>\n</html>\n");
+	$r->print(&Apache::loncommon::end_page());
     }
     return OK;
 }
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.51 loncom/interface/slotrequest.pm:1.52
--- loncom/interface/slotrequest.pm:1.51	Tue Mar  7 16:47:06 2006
+++ loncom/interface/slotrequest.pm	Wed Mar 15 14:41:26 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler for requesting to have slots added to a students record
 #
-# $Id: slotrequest.pm,v 1.51 2006/03/07 21:47:06 albertel Exp $
+# $Id: slotrequest.pm,v 1.52 2006/03/15 19:41:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -54,14 +54,12 @@
 
 sub start_page {
     my ($r,$title)=@_;
-    my $html=&Apache::lonxml::xmlbegin();
-    $r->print($html.'<head><title>'.&mt($title).'</title></head>');
-    $r->print(&Apache::loncommon::bodytag($title));
+    $r->print(&Apache::loncommon::start_page($title));
 }
 
 sub end_page {
     my ($r)=@_;
-    $r->print(&Apache::loncommon::endbodytag().'</html>');
+    $r->print(&Apache::loncommon::end_page());
 }
 
 =pod

--albertel1142451690--