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

raeburn raeburn@source.lon-capa.org
Tue, 08 Dec 2009 05:19:09 -0000


raeburn		Tue Dec  8 05:19:09 2009 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  Customization for GCI_3.
    - early out if menulink is '_nomenu' and there are no other breadcrumbs.
  VS: ----------------------------------------------------------------------
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.253.2.1 loncom/interface/lonhtmlcommon.pm:1.253.2.2
--- loncom/interface/lonhtmlcommon.pm:1.253.2.1	Mon Dec  7 17:30:01 2009
+++ loncom/interface/lonhtmlcommon.pm	Tue Dec  8 05:19:08 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.253.2.1 2009/12/07 17:30:01 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.253.2.2 2009/12/08 05:19:08 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1378,7 +1378,9 @@
         # The first one should be the course or a menu link
         if (!defined($menulink)) { $menulink=1; }
         if ($menulink) {
-            unless ($menulink eq '_nomenu') {
+            if ($menulink eq '_nomenu') {
+                return unless($last);
+            } else {
                 my $description = 'Menu';
                 my $no_mt_descr = 0;
                 $menulink =  {  href   =>'/adm/menu',
@@ -1386,13 +1388,13 @@
                                 target =>'_top',
                                 text   =>$description,
                                 no_mt  =>$no_mt_descr, };
-            }
-            if($last) {
-                #$last set, so we have some crumbs
-                unshift(@Crumbs,$menulink);
-            } else {
-                #only menulink crumb present
-                $last = $menulink;
+                if($last) {
+                    #$last set, so we have some crumbs
+                    unshift(@Crumbs,$menulink);
+                } else {
+                    #only menulink crumb present
+                    $last = $menulink;
+                }
             }
         }
         my $links = join "",