--- loncom/interface/lonpreferences.pm 2009/12/07 04:23:32 1.179.2.1
+++ loncom/interface/lonpreferences.pm 2009/12/15 13:15:32 1.180
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.179.2.1 2009/12/07 04:23:32 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.180 2009/12/15 13:15:32 wenzelju Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -455,19 +455,15 @@ sub verify_and_change_rolespref {
if ($hotlist_flag) {
&Apache::lonnet::put('environment',{'recentroles' => $hotlist_flag});
&Apache::lonnet::appenv({'environment.recentroles' => $hotlist_flag});
- $message=&mt('Recent '.$role.'s Hotlist is Enabled');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Recent '.$role.'s Hotlist is Enabled.')." ".&mt('Display [_1] Most Recent '.$role.'s.',$hotlist_n));
} else {
&Apache::lonnet::del('environment',['recentroles']);
&Apache::lonnet::delenv('environment.recentroles');
- $message=&mt('Recent '.$role.'s Hotlist is Disabled');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Recent '.$role.'s Hotlist is Disabled'));
}
if ($hotlist_n) {
&Apache::lonnet::put('environment',{'recentrolesn' => $hotlist_n});
&Apache::lonnet::appenv({'environment.recentrolesn' => $hotlist_n});
- if ($hotlist_flag) {
- $message.="
".
- &mt('Display [_1] Most Recent '.$role.'s',$hotlist_n)."\n";
- }
}
# Get list of froze roles and list of recent roles
@@ -1011,12 +1007,11 @@ sub verify_and_change_msgforward {
if ($newscreen) {
&Apache::lonnet::put('environment',{'msgforward' => $newscreen});
&Apache::lonnet::appenv({'environment.msgforward' => $newscreen});
- $message .= &mt('Set message forwarding to ').'"'.$newscreen.'".'
- .'
';
+ $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Set message forwarding to ').'"'.$newscreen.'".
');
} else {
&Apache::lonnet::del('environment',['msgforward']);
&Apache::lonnet::delenv('environment.msgforward');
- $message.= &mt("Set message forwarding to 'off'.").'
';
+ $message.= &Apache::lonhtmlcommon::confirm_success(&mt("Set message forwarding to 'off'.").'
');
}
my $critnotification;
my $notification;
@@ -1052,43 +1047,41 @@ sub verify_and_change_msgforward {
if ($notification) {
&Apache::lonnet::put('environment',{'notification' => $notification});
&Apache::lonnet::appenv({'environment.notification' => $notification});
- $message.=&mt('Set non-critical message notification address(es) to ').'"'.$notification.'".
';
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set non-critical message notification address(es) to ').'"'.$notification.'".
');
} else {
&Apache::lonnet::del('environment',['notification']);
&Apache::lonnet::delenv('environment.notification');
- $message.=&mt("Set non-critical message notification to 'off'.").'
';
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt("Set non-critical message notification to 'off'.").'
');
}
if ($critnotification) {
&Apache::lonnet::put('environment',{'critnotification' => $critnotification});
&Apache::lonnet::appenv({'environment.critnotification' => $critnotification});
- $message.=&mt('Set critical message notification address(es) to ').'"'.$critnotification.'".
';
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set critical message notification address(es) to ').'"'.$critnotification.'".
');
} else {
&Apache::lonnet::del('environment',['critnotification']);
&Apache::lonnet::delenv('environment.critnotification');
- $message.=&mt("Set critical message notification to 'off'.").'
';
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt("Set critical message notification to 'off'.").'
');
}
if ($critnotification || $notification) {
if ($notify_with_html) {
&Apache::lonnet::put('environment',{'notifywithhtml' => $notify_with_html});
&Apache::lonnet::appenv({'environment.notifywithhtml' => $notify_with_html});
- $message.=&mt('Set address(es) to receive excerpts with html retained ').'"'.$notify_with_html.'".';
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set address(es) to receive excerpts with html retained ').'"'.$notify_with_html.'".');
} else {
&Apache::lonnet::del('environment',['notifywithhtml']);
&Apache::lonnet::delenv('environment.notifywithhtml');
if ($totaladdresses == 1) {
- $message.=&mt("Set notification address to receive excerpts with html stripped.");
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt("Set notification address to receive excerpts with html stripped."));
} else {
- $message.=&mt("Set all notification addresses to receive excerpts with html stripped.");
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt("Set all notification addresses to receive excerpts with html stripped."));
}
}
} else {
&Apache::lonnet::del('environment',['notifywithhtml']);
&Apache::lonnet::delenv('environment.notifywithhtml');
}
- if ($message) {
- $message .= '