--- loncom/interface/lonpreferences.pm 2009/02/17 21:18:05 1.138 +++ loncom/interface/lonpreferences.pm 2009/05/05 16:01:50 1.158 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.138 2009/02/17 21:18:05 schafran Exp $ +# $Id: lonpreferences.pm,v 1.158 2009/05/05 16:01:50 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 @@ -135,9 +135,9 @@ 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).'
'); + my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('WYSIWYG Editor').'',''.&mt($newsetting).'')); + $message=&Apache::loncommon::confirmwrapper($message); + &print_main_menu($r,$message); } ################################################################ @@ -149,7 +149,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'}; @@ -187,17 +187,15 @@ sub verify_and_change_languages { if ($newlanguage) { &Apache::lonnet::put('environment',{'languages' => $newlanguage}); &Apache::lonnet::appenv({'environment.languages' => $newlanguage}); - $message=&mt('Set new preferred languages to ').'"'.$newlanguage.'".'; + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Preferred language').'','"'.$newlanguage.'".')); } else { &Apache::lonnet::del('environment',['languages']); - &Apache::lonnet::delenv('environment\.languages'); - $message=&mt('Reset preferred language.'); + &Apache::lonnet::delenv('environment.languages'); + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.&mt('Preferred language').'')); } + $message=&Apache::loncommon::confirmwrapper($message); &Apache::loncommon::flush_langs_cache($user,$domain); - print_main_menu($r, $message); -# $r->print(<
$jsMath_start
-');
+ $r->print('');
}
}
@@ -304,18 +302,14 @@ 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 [_1] to [_2]',''.&mt('Preferred method to display Math').'','"'.$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 [_1]',''.&mt('Preferred method to display Math').''));
}
-
-
-# $r->print(< '
.&mt('Change the name that is displayed in your posts.')
@@ -528,10 +519,10 @@ sub screennamechanger {
$r->print('
".&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key})."\n";
+ $message .= "
".&Apache::lonhtmlcommon::confirm_success(&mt('Unfreezing '.$role.': [_1]',''.$role_text{$role_key}.''));
&Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0);
}
}
@@ -490,17 +484,14 @@ sub verify_and_change_rolespref {
# Freeze selected roles
foreach my $role_key (@freeze_list) {
if (!$frozen_roles{$role_key}) {
- $message .= "
".&mt('Freezing '.$role.': [_1]',$role_text{$role_key})."\n";
+ $message .= "
".
+ &Apache::lonhtmlcommon::confirm_success(&mt('Freezing '.$role.': [_1]',''.$role_text{$role_key}.''));
&Apache::lonhtmlcommon::store_recent('roles',
$role_key,' ',1);
}
}
- $message .= "
\n";
-
-# $r->print(<