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

raeburn raeburn@source.lon-capa.org
Sat, 25 Dec 2010 00:32:05 -0000


raeburn		Sat Dec 25 00:32:05 2010 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/interface	lonmenu.pm 
  Log:
  - Backport 1.340.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.315.2.4 loncom/interface/lonmenu.pm:1.315.2.5
--- loncom/interface/lonmenu.pm:1.315.2.4	Tue Sep 14 03:16:04 2010
+++ loncom/interface/lonmenu.pm	Sat Dec 25 00:32:05 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.315.2.4 2010/09/14 03:16:04 raeburn Exp $
+# $Id: lonmenu.pm,v 1.315.2.5 2010/12/25 00:32:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -245,7 +245,18 @@
 
 
         if ($$menuitem[3] eq 'Help') { # special treatment for helplink
-            $menu .= '<li>'.&Apache::loncommon::top_nav_help('Help').'</li>';
+            if ($public) {
+                my $origmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
+                my $defdom = &Apache::lonnet::default_login_domain();
+                my $to = &Apache::loncommon::build_recipient_list(undef,
+                                                                  'helpdeskmail',
+                                                                  $defdom,$origmail);
+                if ($to ne '') {
+                    $menu .= &prep_menuitem($menuitem);
+                }
+            } else {
+                $menu .= '<li>'.&Apache::loncommon::top_nav_help('Help').'</li>';
+            }
         } else {
             my @items = @{$menuitem};
             $items[0] = 'javascript:'.$menuitem->[0].';';