--- loncom/interface/lonpreferences.pm 2008/05/28 23:50:53 1.123
+++ loncom/interface/lonpreferences.pm 2008/12/23 19:28:07 1.125.2.2
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.123 2008/05/28 23:50:53 bisitz Exp $
+# $Id: lonpreferences.pm,v 1.125.2.2 2008/12/23 19:28:07 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -108,9 +108,14 @@ sub wysiwygchanger {
}
my $switchoff=&mt('Disable WYSIWYG editor');
my $switchon=&mt('Enable WYSIWYG editor');
+ my $warning='';
+ if ($env{'user.adv'}) {
+ $warning.="
".&mt("The WYSIWYG editor only supports simple HTML and is in many cases unsuited for advanced authoring. In a number of cases, it may destroy advanced authoring involving LaTeX and script function calls.")."
";
+ }
$r->print(<
+$warning
@@ -174,6 +179,7 @@ sub verify_and_change_languages {
&Apache::lonnet::delenv('environment\.languages');
$message=&mt('Reset preferred language.');
}
+ &Apache::loncommon::flush_langs_cache($user,$domain);
$r->print(< 'Change Message Forwarding/Notification'},
printmenu => 'no',
subroutine => \&verify_and_change_msgforward }));
- my $aboutmeaction=
- '/adm/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/aboutme';
- push (@Options,{ action => 'none',
- linktext =>
- q{Edit the 'About Me' Personal Information Screen},
- help => 'Prefs_About_Me',
- href => $aboutmeaction});
+ if (&Apache::lonnet::usertools_access($user,$domain,'aboutme')) {
+ my $aboutmeaction = '/adm/'.$domain.'/'.$user.'/aboutme';
+ push (@Options,{ action => 'none',
+ linktext =>
+ q{Edit the 'About Me' Personal Information Screen},
+ help => 'Prefs_About_Me',
+ href => $aboutmeaction});
+ }
push (@Options,({ action => 'changecolors',
linktext => 'Change Color Scheme',
href => '/adm/preferences',
@@ -1924,7 +1931,8 @@ sub handler {
text => 'Register Clicker'},
printmenu => 'yes',
}));
- if ($env{'user.adv'}) {
+ 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',