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

raeburn raeburn at source.lon-capa.org
Sun Oct 30 14:12:44 EDT 2016


raeburn		Sun Oct 30 18:12:44 2016 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmenu.pm 
  Log:
  - For 2.11
    - Backport 1.458
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.62 loncom/interface/lonmenu.pm:1.369.2.63
--- loncom/interface/lonmenu.pm:1.369.2.62	Sat Oct 29 02:54:04 2016
+++ loncom/interface/lonmenu.pm	Sun Oct 30 18:12:43 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.369.2.62 2016/10/29 02:54:04 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.63 2016/10/30 18:12:43 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -677,7 +677,7 @@
 }
 
 sub innerregister {
-    my ($forcereg,$bread_crumbs,$group) = @_;
+    my ($forcereg,$bread_crumbs,$group,$pagebuttonshide) = @_;
     my $const_space = ($env{'request.state'} eq 'construct');
     my $is_const_dir = 0;
 
@@ -1031,14 +1031,16 @@
 	    my $addremote=0;
 	    foreach (@inlineremote) { if ($_ ne '') { $addremote=1; last;} }
             if ($addremote) {
-                my $countdown;
+                my ($countdown,$buttonshide);
                 if ($env{'request.filename'} =~ /\.page$/) {
                     my %breadcrumb_tools = &Apache::lonhtmlcommon::current_breadcrumb_tools();
                     if (ref($breadcrumb_tools{'tools'}) eq 'ARRAY') {
-                        $countdown = $breadcrumb_tools{'tools'}[0];
+                        $countdown = $breadcrumb_tools{'tools'}->[0];
                     }
+                    $buttonshide = $pagebuttonshide;
                 } else {
                     $countdown = &countdown_timer();
+                    $buttonshide = &hidden_button_check();
                 }
 
                 &Apache::lonhtmlcommon::clear_breadcrumb_tools();
@@ -1046,7 +1048,7 @@
                 &Apache::lonhtmlcommon::add_breadcrumb_tool(
                     'navigation', @inlineremote[21,23]);
 
-                if (&hidden_button_check() eq 'yes') {
+                if ($buttonshide eq 'yes') {
                     if ($countdown) {
                         &Apache::lonhtmlcommon::add_breadcrumb_tool('tools',$countdown);
                     }




More information about the LON-CAPA-cvs mailing list