--- loncom/interface/lonpreferences.pm 2009/09/16 20:49:18 1.125.6.1 +++ loncom/interface/lonpreferences.pm 2009/09/16 21:04:27 1.125.6.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.125.6.1 2009/09/16 20:49:18 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.125.6.2 2009/09/16 21:04:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1806,7 +1806,8 @@ sub handler { printmenu => 'yes', subroutine => \&verify_and_change_colors, })); - push (@Options,({ action => 'changelanguages', + if ($env{'user.adv'}) { + push (@Options,({ action => 'changelanguages', linktext => 'Change Language Preferences', href => '/adm/preferences', help => 'Prefs_Language', @@ -1822,6 +1823,7 @@ sub handler { printmenu => 'yes', subroutine=>\&verify_and_change_languages, } )); + } push (@Options,({ action => 'changewysiwyg', linktext => 'Change WYSIWYG Editor Preferences', href => '/adm/preferences', @@ -1853,9 +1855,9 @@ sub handler { printmenu => 'yes', subroutine => \&verify_and_change_discussion, } )); - - my $role = ($env{'user.adv'} ? 'Roles' : 'Course'); - push (@Options,({ action => 'changerolespref', + if ($env{'user.adv'}) { + my $role = ($env{'user.adv'} ? 'Roles' : 'Course'); + push (@Options,({ action => 'changerolespref', linktext => 'Change '.$role.' Page Preferences', href => '/adm/preferences', subroutine => \&rolesprefchanger, @@ -1871,7 +1873,7 @@ sub handler { printmenu => 'yes', })); - push (@Options,({ action => 'changetexenginepref', + push (@Options,({ action => 'changetexenginepref', linktext => 'Change How Math Equations Are Displayed', href => '/adm/preferences', subroutine => \&texenginechanger, @@ -1887,16 +1889,17 @@ sub handler { printmenu => 'yes', })); - if ($env{'environment.remote'} eq 'off') { - push (@Options,({ action => 'launch', - linktext => 'Launch Remote Control', - href => '/adm/remote?url=/adm/preferences', - })); - } else { - push (@Options,({ action => 'collapse', + if ($env{'environment.remote'} eq 'off') { + push (@Options,({ action => 'launch', + linktext => 'Launch Remote Control', + href => '/adm/remote?url=/adm/preferences', + })); + } else { + push (@Options,({ action => 'collapse', linktext => 'Collapse Remote Control', href => '/adm/remote?url=/adm/preferences', - })); + })); + } } push (@Options,({ action => 'changeicons', @@ -1914,8 +1917,8 @@ sub handler { text => 'Change Main Menu'}, printmenu => 'yes', })); - - push (@Options,({ action => 'changeclicker', + if ($env{'user.adv'}) { + push (@Options,({ action => 'changeclicker', linktext => 'Register Response Devices ("Clickers")', href => '/adm/preferences', subroutine => \&clickerchanger, @@ -1930,9 +1933,9 @@ sub handler { 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', + my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']); + if (keys(%author_roles) > 0) { + push (@Options,({ action => 'changedomcoord', linktext => 'Restrict Domain Coordinator Access', href => '/adm/preferences', subroutine => \&domcoordchanger, @@ -1947,6 +1950,7 @@ sub handler { text => 'Restrict Domain Coordinator Access'}, printmenu => 'yes', })); + } } push (@Options,({ action => 'lockwarning',