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

raeburn raeburn at source.lon-capa.org
Wed Aug 10 00:10:03 EDT 2016


raeburn		Wed Aug 10 04:10:03 2016 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmenu.pm 
  Log:
  - For 2.11
    - Backport 1.436
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.55 loncom/interface/lonmenu.pm:1.369.2.56
--- loncom/interface/lonmenu.pm:1.369.2.55	Thu May 28 12:49:30 2015
+++ loncom/interface/lonmenu.pm	Wed Aug 10 04:10:03 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.369.2.55 2015/05/28 12:49:30 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.56 2016/08/10 04:10:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -660,9 +660,19 @@
                                                        && $maptitle ne 'default.sequence' 
                                                        && $maptitle ne $coursetitle);
 
-            push @crumbs, {text => $restitle, no_mt => 1} if $restitle; 
+            push @crumbs, {text => $restitle, no_mt => 1} if $restitle;
+            my @tools;
+            if ($env{'request.filename'} =~ /\.page$/) {
+                my %breadcrumb_tools = &Apache::lonhtmlcommon::current_breadcrumb_tools();
+                if (ref($breadcrumb_tools{'tools'}) eq 'ARRAY') {
+                    @tools = @{$breadcrumb_tools{'tools'}};
+                }
+            }
             &Apache::lonhtmlcommon::clear_breadcrumbs();
             &Apache::lonhtmlcommon::add_breadcrumb(@crumbs);
+            if (@tools) {
+                &Apache::lonhtmlcommon::add_breadcrumb_tool('tools', at tools);
+            }
         } else {
             $resurl = $env{'request.noversionuri'};
             my $courseurl = &Apache::lonnet::courseid_to_courseurl($env{'request.course.id'});
@@ -958,7 +968,15 @@
                 &Apache::lonhtmlcommon::add_breadcrumb_tool(
                     'navigation', @inlineremote[21,23]);
 
-                my $countdown = &countdown_timer();
+                my $countdown;
+                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];
+                    }
+                } else {
+                    $countdown = &countdown_timer();
+                }
                 if (&hidden_button_check() eq 'yes') {
                     if ($countdown) {
                         &Apache::lonhtmlcommon::add_breadcrumb_tool('tools',$countdown);




More information about the LON-CAPA-cvs mailing list