[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sun, 14 Nov 2004 07:32:20 -0000


albertel		Sun Nov 14 02:32:20 2004 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - gonav uses gopost which needs the 'server' form, so make it available in more places.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.129 loncom/interface/lonmenu.pm:1.130
--- loncom/interface/lonmenu.pm:1.129	Sat Nov 13 16:07:19 2004
+++ loncom/interface/lonmenu.pm	Sun Nov 14 02:32:20 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.129 2004/11/13 21:07:19 albertel Exp $
+# $Id: lonmenu.pm,v 1.130 2004/11/14 07:32:20 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -96,6 +96,7 @@
 ENDRELOAD
             }
         }
+        my $form=&serverform();
         my $utility=&utilityfunctions();
 	my $output=(<<ENDMAINMENU);
 <script type="text/javascript">
@@ -107,6 +108,7 @@
 <script type="text/javascript">
 // END LON-CAPA Internal
 </script>
+$form
 ENDMAINMENU
         if ($registration) { $output.=&innerregister($forcereg,$target); }
 	return $output."<hr />";
@@ -153,6 +155,7 @@
         if ($registration) {
            $reg=&innerregister($forcereg,$target);
         }
+        my $form=&serverform();
 	my $utility=&utilityfunctions();
 	return (<<ENDINLINEMENU);
 <script type="text/javascript">
@@ -172,6 +175,7 @@
 <td bgcolor="$tabbg">
 <img align="right" src="/adm/lonIcons/minilogo.gif" />
 <b>LON-CAPA</b></td>
+$form
 </tr>
 </table>
 </font>
@@ -406,7 +410,6 @@
         }
         if ($textual) {
 # Registered, textual output
-            my $form=&serverform();
 	    my $inlinebuttons='';
 
 	    if ($ENV{'browser.interface'} eq 'textual') {
@@ -430,7 +433,6 @@
 $tablestart
 $inlinebuttons
 $tableend
-$form
 <script type="text/javascript">
 // END LON-CAPA Internal
 </script>
@@ -1057,7 +1059,11 @@
     $r->send_http_header;
     return OK if $r->header_only;
 
-    my $form=&serverform();
+    my $form;
+    if ($ENV{'environment.remote'} ne 'off' &&
+	$ENV{'browser.interface'} ne 'textual') {
+	$form=&serverform();
+    }
     my $bodytag=&Apache::loncommon::bodytag('Main Menu');
     my $function='student';
     if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) {