--- loncom/interface/lonpreferences.pm 2009/10/08 21:15:19 1.125.4.6 +++ loncom/interface/lonpreferences.pm 2009/12/07 01:41:31 1.125.8.5 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.125.4.6 2009/10/08 21:15:19 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.125.8.5 2009/12/07 01:41:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,6 +42,7 @@ use Apache::loncommon(); use Apache::lonhtmlcommon(); use Apache::lonlocal; use Apache::lonnet; +use LONCAPA::lonauthcgi(); use LONCAPA(); # @@ -1863,22 +1864,24 @@ sub handler { printmenu => 'yes', subroutine => \&verify_and_change_colors, })); - push (@Options,({ action => 'changelanguages', - linktext => 'Change Language Preferences', - href => '/adm/preferences', - help => 'Prefs_Language', - breadcrumb=> - { href => '/adm/preferences?action=changelanguages', - text => 'Change Language'}, - subroutine => \&languagechanger, - }, - { action => 'verify_and_change_languages', - breadcrumb=> - {href => '/adm/preferences?action=changelanguages', - text => 'Change Language'}, - printmenu => 'yes', - subroutine=>\&verify_and_change_languages, } + if ($env{'user.adv'}) { + push (@Options,({ action => 'changelanguages', + linktext => 'Change Language Preferences', + href => '/adm/preferences', + help => 'Prefs_Language', + breadcrumb=> + { href => '/adm/preferences?action=changelanguages', + text => 'Change Language'}, + subroutine => \&languagechanger, + }, + { action => 'verify_and_change_languages', + breadcrumb=> + {href => '/adm/preferences?action=changelanguages', + text => 'Change Language'}, + printmenu => 'yes', + subroutine=>\&verify_and_change_languages, } )); + } push (@Options,({ action => 'changewysiwyg', linktext => 'Change WYSIWYG Editor Preferences', href => '/adm/preferences', @@ -1971,22 +1974,23 @@ sub handler { text => 'Change Main Menu'}, printmenu => 'yes', })); - - push (@Options,({ action => 'changeclicker', - linktext => 'Register Response Devices ("Clickers")', - href => '/adm/preferences', - subroutine => \&clickerchanger, - breadcrumb => - { href => '/adm/preferences?action=changeclicker', - text => 'Register Clicker'}, - }, - { action => 'verify_and_change_clicker', - subroutine => \&verify_and_change_clicker, - breadcrumb => - { href => '/adm/preferences?action=changeclicker', - text => 'Register Clicker'}, - printmenu => 'yes', - })); + if ($env{'user.adv'}) { + push (@Options,({ action => 'changeclicker', + linktext => 'Register Response Devices ("Clickers")', + href => '/adm/preferences', + subroutine => \&clickerchanger, + breadcrumb => + { href => '/adm/preferences?action=changeclicker', + text => 'Register Clicker'}, + }, + { action => 'verify_and_change_clicker', + subroutine => \&verify_and_change_clicker, + breadcrumb => + { href => '/adm/preferences?action=changeclicker', + text => 'Register Clicker'}, + printmenu => 'yes', + })); + } my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']); if (keys(%author_roles) > 0) { push (@Options,({ action => 'changedomcoord', @@ -2040,7 +2044,7 @@ sub handler { })); } - if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) { + if (&can_toggle_debug()) { push (@Options,({ action => 'debugtoggle', printmenu => 'yes', subroutine => \&toggle_debug, @@ -2072,13 +2076,11 @@ sub handler { || ($printmenu eq 'not_on_error' && !$error) ) && (!$env{'form.returnurl'})) { my $optionlist = '