--- loncom/interface/lonpreferences.pm 2009/12/07 04:23:32 1.179.2.1 +++ loncom/interface/lonpreferences.pm 2010/01/05 22:54:46 1.179.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.179.2.1 2009/12/07 04:23:32 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.179.2.2 2010/01/05 22:54:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1845,23 +1845,8 @@ if (&Apache::lonnet::usertools_access($u } my @menu= ({ categorytitle=>'Personal Data', - items =>[ - { linktext => 'Personal Information Page', - url => $aboutmeurl, - permission => $permissions{'aboutme'}, - #help => 'Prefs_About_Me', - icon => 'system-users.png', - linktitle => 'Edit information about yourself that should be displayed on your public profile.' - }, - { linktext => 'Screen Name', - url => '/adm/preferences?action=changescreenname', - permission => 'F', - #help => 'Prefs_Screen_Name_Nickname', - icon => 'preferences-desktop-font.png', - linktitle => 'Change the name that is displayed in your posts.' - }, - ] - }, + items =>[] + }, { categorytitle=>'Page Display Settings', items =>[ { linktext => 'Color Scheme', @@ -1871,14 +1856,6 @@ my @menu= icon => 'preferences-desktop-theme.png', linktitle => 'Change LON-CAPA default colors.' }, - { linktext => 'Menu Display', - url => '/adm/preferences?action=changeicons', - permission => 'F', - #help => '', - icon => 'preferences-system-windows.png', - linktitle => 'Change whether the menus are displayed with buttons, icons or icons and text.' - } - ] }, { categorytitle=>'Content Display Settings', @@ -1908,13 +1885,6 @@ my @menu= icon => 'mail-reply-all.png', linktitle => 'Change messageforwarding or notifications settings.' }, - { linktext => 'Discussion Display', - url => '/adm/preferences?action=changediscussions', - permission => 'F', - #help => 'Change_Discussion_Display', - icon => 'mail-message-new.png', - linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.' - }, ] }, { categorytitle=>'Other', @@ -1922,6 +1892,29 @@ my @menu= }, ); + if (&Apache::lonnet::usertools_access($env{'user.name'}, + $env{'user.domain'},'aboutme')) { + push(@{ $menu[0]->{items} }, + { linktext => 'Personal Information Page', + url => $aboutmeurl, + permission => $permissions{'aboutme'}, + #help => 'Prefs_About_Me', + icon => 'system-users.png', + linktitle => 'Edit information about yourself that should be displayed on your public profile.' + }); + } + + unless ($env{'user.domain'} eq 'gcitest') { + push(@{ $menu[0]->{items} }, + { linktext => 'Screen Name', + url => '/adm/preferences?action=changescreenname', + permission => 'F', + #help => 'Prefs_Screen_Name_Nickname', + icon => 'preferences-desktop-font.png', + linktitle => 'Change the name that is displayed in your posts.' + }); + } + if ($currentauth =~ /^(unix|internal):/) { push(@{ $menu[0]->{items} }, { linktext => 'Password', @@ -1932,6 +1925,29 @@ push(@{ $menu[0]->{items} }, { linktitle => 'Change your password.', }); } + + unless ((&Apache::loncommon::needs_gci_custom()) || ($env{'user.domain'} eq 'gcitest')) { + push(@{ $menu[1]->{items} }, + { linktext => 'Menu Display', + url => '/adm/preferences?action=changeicons', + permission => 'F', + #help => '', + icon => 'preferences-system-windows.png', + linktitle => 'Change whether the menus are displayed with buttons, icons or icons and text.' + }); + } + + unless ($env{'user.domain'} eq 'gcitest') { + push(@{ $menu[3]->{items} }, + { linktext => 'Discussion Display', + url => '/adm/preferences?action=changediscussions', + permission => 'F', + #help => 'Change_Discussion_Display', + icon => 'mail-message-new.png', + linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.' + }); + } + my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']); if (keys(%author_roles) > 0) { push(@{ $menu[4]->{items} }, { @@ -1944,9 +1960,10 @@ push(@{ $menu[4]->{items} }, { }); } - if (&Apache::lonnet::allowed('whn',$env{'request.course.id'}) - || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/' - .$env{'request.course.sec'})) { + unless ((&Apache::loncommon::needs_gci_custom()) || ($env{'user.domain'} eq 'gcitest')) { + if (&Apache::lonnet::allowed('whn',$env{'request.course.id'}) + || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/' + .$env{'request.course.sec'})) { push(@{ $menu[4]->{items} }, { linktext => 'Course Initialization', url => '/adm/preferences?action=changecourseinit', @@ -1956,6 +1973,7 @@ push(@{ $menu[4]->{items} }, { linktitle => 'Set the default page to be displayed when you select a course role.', }); + } } if (&can_toggle_debug()) { push(@{ $menu[4]->{items} }, { @@ -1966,7 +1984,7 @@ push(@{ $menu[4]->{items} }, { icon => 'blog.png', linktitle => 'Toggle Debug Messages.', }); - } + } $r->print(&Apache::loncommon::start_page('My Space')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Preferences'));