--- loncom/interface/lonpreferences.pm 2009/04/05 17:18:29 1.150
+++ loncom/interface/lonpreferences.pm 2009/05/04 19:35:31 1.156
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.150 2009/04/05 17:18:29 droeschl Exp $
+# $Id: lonpreferences.pm,v 1.156 2009/05/04 19:35:31 tempelho Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -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)).'
');
}
################################################################
@@ -187,17 +186,14 @@ 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 new preferred languages to ').'"'.$newlanguage.'".');
} else {
&Apache::lonnet::del('environment',['languages']);
&Apache::lonnet::delenv('environment.languages');
- $message=&mt('Reset preferred language.');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset preferred language.'));
}
&Apache::loncommon::flush_langs_cache($user,$domain);
- print_main_menu($r, $message);
-# $r->print(< $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.');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset preferred math display.'));
}
-
-
-# $r->print(<print(< $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.');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset screenname.'));
}
# Nickname
$message.='
';
@@ -566,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.');
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset nickname.'));
}
&Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain);
-# $r->print(< '/adm/preferences?action=changeicons',
text => 'Change Main Menu'});
$r->print(Apache::loncommon::start_page('Page Display Settings'));
@@ -628,8 +613,7 @@ sub verify_and_change_icons {
&Apache::lonnet::put('environment',{'icons' => $newicons});
&Apache::lonnet::appenv({'environment.icons' => $newicons});
-# $r->print(&mt('Set menu mode to [_1].',$newicons));
- print_main_menu($r, &mt('Set menu mode to [_1].',$newicons));
+ &print_main_menu($r, &Apache::lonhtmlcommon::confirm_success(&mt('Set menu mode to [_1].',$newicons)));
}
################################################################
@@ -638,7 +622,7 @@ sub verify_and_change_icons {
sub clickerchanger {
my $r = shift;
- Apache::lonhtmlcommon::add_breadcrumb(
+ &Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changeclicker',
text => 'Register Clicker'});
$r->print(Apache::loncommon::start_page('Other'));
@@ -650,14 +634,15 @@ sub clickerchanger {
my $clickers=$userenv{'clickers'};
$clickers=~s/\,/\n/gs;
my $text=&mt('Enter response device ("clicker") numbers');
- my $change=&mt('Register');
+ my $change=&mt('Save');
my $helplink=&Apache::loncommon::help_open_topic('Clicker_Registration',&mt('Locating your clicker ID'));
$r->print(<
-