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

droeschl droeschl@source.lon-capa.org
Sun, 30 May 2010 18:30:52 -0000


droeschl		Sun May 30 18:30:52 2010 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm lonmenu.pm 
  Log:
  Bugzilla #6246
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.272 loncom/interface/lonhtmlcommon.pm:1.273
--- loncom/interface/lonhtmlcommon.pm:1.272	Sun May 30 12:47:05 2010
+++ loncom/interface/lonhtmlcommon.pm	Sun May 30 18:30:52 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.272 2010/05/30 12:47:05 droeschl Exp $
+# $Id: lonhtmlcommon.pm,v 1.273 2010/05/30 18:30:52 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2392,6 +2392,7 @@
 # \@items, {listattr => { class => 'abc', id => 'xyx' }, itemattr => {class => 'abc', id => 'xyx'}}
 sub list_from_array {
     my ($items, $args) = @_;
+    return unless scalar @$items;
     my ($ul, $li) = inittags( qw(ul li) );
     my $listitems = join '', map { $li->($_, $args->{itemattr}) } @$items;
     return $ul->( $listitems, $args->{listattr} );
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.327 loncom/interface/lonmenu.pm:1.328
--- loncom/interface/lonmenu.pm:1.327	Fri May 28 13:21:13 2010
+++ loncom/interface/lonmenu.pm	Sun May 30 18:30:52 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.327 2010/05/28 13:21:13 droeschl Exp $
+# $Id: lonmenu.pm,v 1.328 2010/05/30 18:30:52 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -364,6 +364,11 @@
 
         &Apache::lonhtmlcommon::clear_breadcrumbs();
         &Apache::lonhtmlcommon::add_breadcrumb(@crumbs);
+    }elsif (! $const_space){
+        #a situation when we're looking at a resource outside of context of a 
+        #course or construction space (e.g. with cumulative rights)
+        &Apache::lonhtmlcommon::clear_breadcrumbs();
+        &Apache::lonhtmlcommon::add_breadcrumb({text => 'View Resource'});
     }
 # =============================================================================
 # ============================ This is for URLs that actually can be registered