[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm lonsupportreq.pm mydesk.tab

raeburn raeburn@source.lon-capa.org
Thu, 02 Dec 2010 06:00:12 -0000


raeburn		Thu Dec  2 06:00:12 2010 EDT

  Modified files:              
    /loncom/interface	lonsupportreq.pm mydesk.tab lonmenu.pm 
  Log:
  - Help Link to support form for public pages, if support mail recipient defined.
    For: /adm/createaccount, /adm/coursecatalog, /adm/resetpw, and syllabus pages.
  
  
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.58 loncom/interface/lonsupportreq.pm:1.59
--- loncom/interface/lonsupportreq.pm:1.58	Wed Nov 10 14:44:50 2010
+++ loncom/interface/lonsupportreq.pm	Thu Dec  2 06:00:12 2010
@@ -1,5 +1,5 @@
 #
-# $Id: lonsupportreq.pm,v 1.58 2010/11/10 14:44:50 bisitz Exp $
+# $Id: lonsupportreq.pm,v 1.59 2010/12/02 06:00:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -842,6 +842,9 @@
     } else {
         $reviewtext = &mt('Please review the information in "Log-in help" if you are unable to log-in.');
     }
+    if ($origurl eq '') {
+        $origurl = 'javascript:history.go(-1)';
+    }
     $r->print(<<END);
 <table width="620" border="0" cellspacing="0" cellpadding="0" height="55">   <tr height="50">    <td width='5'>&nbsp;</td>
    <td>
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.139 loncom/interface/mydesk.tab:1.140
--- loncom/interface/mydesk.tab:1.139	Thu Dec  2 01:42:46 2010
+++ loncom/interface/mydesk.tab	Thu Dec  2 06:00:12 2010
@@ -24,6 +24,7 @@
 prim:/adm/[domain]/[user]/_rss.html:::Feeds:
 prim:/adm/roles:::Roles:roles
 prim:/adm/roles:::Courses:courses
+prim:/adm/helpdesk:::Help:onlypublic
 prim:/adm/roles:::Log In:onlypublic
 prim::::Help:
 prim:/adm/logout:::Logout:
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.339 loncom/interface/lonmenu.pm:1.340
--- loncom/interface/lonmenu.pm:1.339	Thu Sep  9 19:33:18 2010
+++ loncom/interface/lonmenu.pm	Thu Dec  2 06:00:12 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.339 2010/09/09 19:33:18 raeburn Exp $
+# $Id: lonmenu.pm,v 1.340 2010/12/02 06:00:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -214,7 +214,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 {
             $menu .= prep_menuitem($menuitem);
         }