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

raeburn raeburn at source.lon-capa.org
Mon Jun 7 02:15:55 EDT 2021


raeburn		Mon Jun  7 06:15:55 2021 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - Bug 6907
    In course context menu collection use can impact display of Main Menu.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.398 loncom/interface/lonhtmlcommon.pm:1.399
--- loncom/interface/lonhtmlcommon.pm:1.398	Thu Apr 29 17:45:22 2021
+++ loncom/interface/lonhtmlcommon.pm	Mon Jun  7 06:15:55 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.398 2021/04/29 17:45:22 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.399 2021/06/07 06:15:55 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1917,6 +1917,16 @@
         # The first one should be the course or a menu link
         if (!defined($menulink)) { $menulink=1; }
         if ($menulink) {
+            if ($env{'request.course.id'}) {
+                my ($menucoll,$deeplinkmenu,$menuref) = &Apache::loncommon::menucoll_in_effect();
+                if (($menucoll) && (ref($menuref) eq 'HASH')) {
+                    if ($menuref->{'main'} eq 'n') {
+                       undef($menulink);
+                    }
+                }
+            }
+        }
+        if ($menulink) {
             my $description = 'Menu';
             my $no_mt_descr = 0;
             if ((exists($env{'request.course.id'})) && 




More information about the LON-CAPA-cvs mailing list