[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Mon Oct 7 17:20:09 EDT 2024


raeburn		Mon Oct  7 21:20:09 2024 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	loncommon.pm 
  Log:
  - For 2.11
    Backport 1.1438, 1.1439, 1.1440 and one more case of (Remote Control is on) 
    "BEGIN LON-CAPA Internal" should be balanced by an "END LON-CAPA Internal" 
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.171 loncom/interface/loncommon.pm:1.1075.2.172
--- loncom/interface/loncommon.pm:1.1075.2.171	Sun Oct  6 00:30:26 2024
+++ loncom/interface/loncommon.pm	Mon Oct  7 21:20:09 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1075.2.171 2024/10/06 00:30:26 raeburn Exp $
+# $Id: loncommon.pm,v 1.1075.2.172 2024/10/07 21:20:09 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5820,14 +5820,19 @@
         unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') {
             $funclist = $forbodytag;
         }
+        $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
     } else {
 
         #    if ($env{'request.state'} eq 'construct') {
         #        $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls
         #    }
 
-        $bodytag .= Apache::lonhtmlcommon::scripttag(
-            Apache::lonmenu::utilityfunctions($httphost), 'start');
+        my $need_endlcint;
+        unless ($args->{'switchserver'}) {
+            $bodytag .= Apache::lonhtmlcommon::scripttag(
+                Apache::lonmenu::utilityfunctions($httphost), 'start');
+            $need_endlcint = 1;
+        }
 
         if (($env{'environment.remote'} eq 'on') && ($env{'request.state'} eq 'construct')) {
             unless ($env{'form.inhibitmenu'}) {
@@ -5842,7 +5847,9 @@
                 }
                 $bodytag .= qq|<div id="LC_nav_bar">$left $role<br />
                                <em>$realm</em> $dc_info</div>|;
-        
+                if ($need_endlcint) {
+                    $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
+                }
                 return $bodytag;
             }
 
@@ -5860,6 +5867,9 @@
 
         #if directed to not display the secondary menu, don't.
         if ($args->{'no_secondary_menu'}) {
+            if ($need_endlcint) {
+                $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
+            }
             return $bodytag;
         }
         #don't show menus for public users
@@ -5869,7 +5879,9 @@
                 $bodytag .= Apache::lonmenu::secondary_menu($httphost,$args->{'links_disabled'});
             }
             $bodytag .= Apache::lonmenu::serverform();
-            $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
+            if ($need_endlcint) {
+                $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
+            }
             if ($env{'request.state'} eq 'construct') {
                 $bodytag .= &Apache::lonmenu::innerregister($forcereg,
                                 $args->{'bread_crumbs'},'','',$hostname);
@@ -5889,11 +5901,13 @@
                     $bodytag .= $forbodytag;
                 }
             }
-        }else{
-            # this is to seperate menu from content when there's no secondary
+        } else {
+            # this is to separate menu from content when there's no secondary
             # menu. Especially needed for public accessible ressources.
             $bodytag .= '<hr style="clear:both" />';
-            $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); 
+            if ($need_endlcint) {
+                $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
+            }
         }
 
         return $bodytag;
@@ -8122,7 +8136,7 @@
         $inhibitprint = &print_suppression();
     }
 
-    if (!$args->{'frameset'}) {
+    if (!$args->{'frameset'} && !$args->{'switchserver'}) {
 	$result .= &Apache::lonhtmlcommon::htmlareaheaders();
     }
     if ($args->{'force_register'}) {
@@ -8130,7 +8144,8 @@
     }
     if (!$args->{'no_nav_bar'} 
 	&& !$args->{'only_body'}
-	&& !$args->{'frameset'}) {
+	&& !$args->{'frameset'}
+	&& !$args->{'switchserver'}) {
 	$result .= &help_menu_js($httphost);
         $result.=&modal_window();
         $result.=&togglebox_script();




More information about the LON-CAPA-cvs mailing list