--- loncom/interface/lonpreferences.pm 2009/02/10 09:30:16 1.135
+++ loncom/interface/lonpreferences.pm 2009/05/05 11:40:51 1.157
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.135 2009/02/10 09:30:16 schafran Exp $
+# $Id: lonpreferences.pm,v 1.157 2009/05/05 11:40:51 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -101,7 +101,7 @@ sub wysiwygchanger {
Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changewysiwyg',
text => 'Change WYSIWYG Preferences'});
- $r->print(Apache::loncommon::start_page('Change WYSIWYG Preferences'));
+ $r->print(Apache::loncommon::start_page('Content Display Settings'));
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change WYSIWYG Preferences'));
my %userenv = &Apache::lonnet::get
@@ -126,7 +126,7 @@ $warning
ENDLSCREEN
- $r->print('
');
+ $r->print('
');
}
@@ -135,9 +135,8 @@ sub verify_and_change_wysiwyg {
my $newsetting=$env{'form.wysiwyg'};
&Apache::lonnet::put('environment',{'wysiwygeditor' => $newsetting});
&Apache::lonnet::appenv({'environment.wysiwygeditor' => $newsetting});
-# $r->print('
'.&mt('Setting WYSIWYG editor to:').' '.&mt($newsetting).'
'); - print_main_menu($r,''.&mt('Setting WYSIWYG editor to:').' ' - .&mt($newsetting).'
'); + &print_main_menu($r,''.&Apache::lonhtmlcommon::confirm_success(&mt('Setting WYSIWYG editor to:').' ' + .&mt($newsetting)).'
'); } ################################################################ @@ -149,7 +148,7 @@ sub languagechanger { Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changelanguages', text => 'Change Language'}); - $r->print(Apache::loncommon::start_page('Change Language')); + $r->print(Apache::loncommon::start_page('Content Display Settings')); $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language')); my $user = $env{'user.name'}; my $domain = $env{'user.domain'}; @@ -172,7 +171,7 @@ sub languagechanger {
$jsMath_start
-');
+ $r->print('');
}
}
@@ -303,18 +300,13 @@ sub verify_and_change_texengine {
if ($newtexengine) {
&Apache::lonnet::put('environment',{'texengine' => $newtexengine});
&Apache::lonnet::appenv({'environment.texengine' => $newtexengine});
- $message=&mt('Set new preferred math display to ').'"'.$newtexengine.'".';
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set new preferred math display to ').'"'.$newtexengine.'".');
} else {
&Apache::lonnet::del('environment',['texengine']);
- &Apache::lonnet::delenv('environment\.texengine');
- $message=&mt('Reset preferred math display.');
+ &Apache::lonnet::delenv('environment.texengine');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset preferred math display.'));
}
-
-
-# $r->print(<
'
.&mt('Change the name that is displayed in your posts.')
@@ -552,11 +541,11 @@ sub verify_and_change_screenname {
if ($newscreen) {
&Apache::lonnet::put('environment',{'screenname' => $newscreen});
&Apache::lonnet::appenv({'environment.screenname' => $newscreen});
- $message=&mt('Set new screenname to ').'"'.$newscreen.'.".';
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set new screenname to ').'"'.$newscreen.'.".');
} else {
&Apache::lonnet::del('environment',['screenname']);
- &Apache::lonnet::delenv('environment\.screenname');
- $message=&mt('Reset screenname.');
+ &Apache::lonnet::delenv('environment.screenname');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset screenname.'));
}
# Nickname
$message.='
';
@@ -565,17 +554,14 @@ sub verify_and_change_screenname {
if ($newscreen) {
&Apache::lonnet::put('environment',{'nickname' => $newscreen});
&Apache::lonnet::appenv({'environment.nickname' => $newscreen});
- $message.=&mt('Set new nickname to ').'"'.$newscreen.'".';
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set new nickname to ').'"'.$newscreen.'".');
} else {
&Apache::lonnet::del('environment',['nickname']);
- &Apache::lonnet::delenv('environment\.nickname');
- $message.=&mt('Reset nickname.');
+ &Apache::lonnet::delenv('environment.nickname');
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset nickname.'));
}
&Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain);
-# $r->print(<