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

raeburn raeburn@source.lon-capa.org
Mon, 08 Dec 2008 23:09:27 -0000


raeburn		Mon Dec  8 23:09:27 2008 EDT

  Modified files:              
    /loncom/interface	lonpreferences.pm 
  Log:
  - Bug 5839. DCs can set availability of User Tools.
  Don't include link to edit "About Me" page if page is unavailable to the user.
  
  
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.130 loncom/interface/lonpreferences.pm:1.131
--- loncom/interface/lonpreferences.pm:1.130	Sat Dec  6 21:13:58 2008
+++ loncom/interface/lonpreferences.pm	Mon Dec  8 23:09:26 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.130 2008/12/06 21:13:58 schafran Exp $
+# $Id: lonpreferences.pm,v 1.131 2008/12/08 23:09:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1799,12 +1799,16 @@
     # build the data structure for menu generation
 my $aboutmeurl='/adm/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/aboutme';
 my $role = ($env{'user.adv'} ? 'Roles' : 'Course');
+my %permissions;
+if (&Apache::lonnet::usertools_access($user,$domain,'aboutme')) {
+    $permissions{'aboutme'} = 'F';
+}
 my @menu=
     ({	categorytitle=>'Personal Data',
 	items =>[
 	    {	linktext => 'About Me',
 		url => $aboutmeurl,
-		permission => 'F',
+		permission => $permissions{'aboutme'},
 		#help => 'Prefs_About_Me',
 		icon => 'system-users.png',
 		linktitle => 'Edit information about yourself that should be displayed on your public profile.'