[LON-CAPA-cvs] cvs: rat / lonwrapper.pm loncom/interface loncommon.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 04 Apr 2006 15:11:49 -0000


albertel		Tue Apr  4 11:11:49 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
    /rat	lonwrapper.pm 
  Log:
  - start_page work
  - pass throught the args var to startheadtag
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.324 loncom/interface/loncommon.pm:1.325
--- loncom/interface/loncommon.pm:1.324	Wed Mar 29 14:39:55 2006
+++ loncom/interface/loncommon.pm	Tue Apr  4 11:11:26 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.324 2006/03/29 19:39:55 raeburn Exp $
+# $Id: loncommon.pm,v 1.325 2006/04/04 15:11:26 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3051,8 +3051,8 @@
 =cut
 
 sub head {
-    my ($title,$head_extra) = @_;
-    return &headtag($title,$head_extra).&endheadtag();
+    my ($title,$head_extra,$args) = @_;
+    return &headtag($title,$head_extra,$args).&endheadtag();
 }
 
 =pod
Index: rat/lonwrapper.pm
diff -u rat/lonwrapper.pm:1.21 rat/lonwrapper.pm:1.22
--- rat/lonwrapper.pm:1.21	Tue Mar 21 16:50:39 2006
+++ rat/lonwrapper.pm	Tue Apr  4 11:11:48 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Wrapper for external and binary files as standalone resources
 #
-# $Id: lonwrapper.pm,v 1.21 2006/03/21 21:50:39 albertel Exp $
+# $Id: lonwrapper.pm,v 1.22 2006/04/04 15:11:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -40,9 +40,11 @@
 #
 # Producing the menu buttons
 #
-    return '<html><body bgcolor="#FFFFFF">'.
-	&Apache::lonmenu::menubuttons(1,'web',1).'</body></html>';
-
+    return &Apache::loncommon::start_page('Menu',undef,
+					  {'only_body' => 1,
+					   'bgcolor'   => '#FFFFFF',}).
+	&Apache::lonmenu::menubuttons(1,'web',1).
+	&Apache::loncommon::end_page();
 }
 
 
@@ -53,24 +55,22 @@
 #
 # ssi-based rendering for text-based interface
 #
-	return '<html><head>'.
-	    &Apache::lonmenu::registerurl(1).
-	    '</head><body bgcolor="#FFFFFF">'.
-	    &Apache::lonmenu::menubuttons(1).
-	    &Apache::lonnet::ssi_body($bottomurl).'</body></html>';
+	return 
+	    &Apache::loncommon::start_page('Menu',undef,
+					  {'bgcolor'        => '#FFFFFF',
+					   'force_register' => 1,
+				       }).
+	    &Apache::lonnet::ssi_body($bottomurl).
+	    &Apache::loncommon::end_page();
     }
 
     my $events='onLoad="'.&Apache::lonmenu::loadevents.
 	'" onUnload="'.&Apache::lonmenu::unloadevents.'"';
-    my $script=&Apache::lonmenu::registerurl(1,undef);
     
-    my $result = <<ENDDOCUMENTINL;
-<html>
-<head>
-$script
-</head>
-ENDDOCUMENTINL
-
+    my $result = &Apache::lonxml::xmlbegin().
+	&Apache::loncommon::head(undef,undef,
+				 {'force_register' => 1});
+  
     if ($env{'environment.remote'} eq 'off') {
 #
 # This is inline remote