[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonhtmlcommon.pm lonmsgdisplay.pm lonpreferences.pm
www
www@source.lon-capa.org
Sat, 25 Apr 2009 20:22:07 -0000
www Sat Apr 25 20:22:07 2009 EDT
Modified files:
/loncom/interface loncommon.pm lonhtmlcommon.pm lonmsgdisplay.pm
lonpreferences.pm
Log:
Recycle "success" style
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.795 loncom/interface/loncommon.pm:1.796
--- loncom/interface/loncommon.pm:1.795 Sat Apr 25 16:53:13 2009
+++ loncom/interface/loncommon.pm Sat Apr 25 20:22:07 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.795 2009/04/25 16:53:13 www Exp $
+# $Id: loncommon.pm,v 1.796 2009/04/25 20:22:07 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4679,11 +4679,6 @@
margin: 2px;
}
-.LC_success_confirm {
- font-family: $sans;
- color: darkgreen;
-}
-
table.LC_pastsubmission {
border: 1px solid black;
margin: 2px;
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.208 loncom/interface/lonhtmlcommon.pm:1.209
--- loncom/interface/lonhtmlcommon.pm:1.208 Sat Apr 25 16:53:13 2009
+++ loncom/interface/lonhtmlcommon.pm Sat Apr 25 20:22:07 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.208 2009/04/25 16:53:13 www Exp $
+# $Id: lonhtmlcommon.pm,v 1.209 2009/04/25 20:22:07 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -74,10 +74,16 @@
=cut
sub confirm_success {
- my ($message)=@_;
- return '<span class="LC_success_confirm">'.
+ my ($message,$failure)=@_;
+ if ($failure) {
+ return '<span class="LC_error">'.
+ $message.
+ ' <img src="/adm/lonIcons/navmap.wrong.gif" /></span>';
+ } else {
+ return '<span class="LC_success">'.
$message.
' <img src="/adm/lonIcons/navmap.correct.gif" /></span>';
+ }
}
##############################################
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.121 loncom/interface/lonmsgdisplay.pm:1.122
--- loncom/interface/lonmsgdisplay.pm:1.121 Sat Apr 4 21:47:41 2009
+++ loncom/interface/lonmsgdisplay.pm Sat Apr 25 20:22:07 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.121 2009/04/04 21:47:41 bisitz Exp $
+# $Id: lonmsgdisplay.pm,v 1.122 2009/04/25 20:22:07 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3175,7 +3175,7 @@
&Apache::loncommunicate::menu($r);
}
} else {
- $r->print('<p><span class="LC_error">'.&mt('Could not deliver message').'</span> '.
+ $r->print('<p>'.&Apache::lonhtmlcommon::confirm_success(&mt('Could not deliver message'),1).'<br /> '.
&mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).'</p>');
}
}
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.153 loncom/interface/lonpreferences.pm:1.154
--- loncom/interface/lonpreferences.pm:1.153 Sat Apr 25 17:14:24 2009
+++ loncom/interface/lonpreferences.pm Sat Apr 25 20:22:07 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.153 2009/04/25 17:14:24 www Exp $
+# $Id: lonpreferences.pm,v 1.154 2009/04/25 20:22:07 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -473,7 +473,7 @@
# Unset any roles that were previously frozen but aren't in list
foreach my $role_key (sort(keys(%recent_roles))) {
if (($frozen_roles{$role_key}) && (!exists($freeze{$role_key}))) {
- $message .= "<br />".&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key})."\n";
+ $message .= "<br />".&Apache::lonhtmlcommon::confirm_success(&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key}))."\n";
&Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0);
}
}
@@ -481,7 +481,8 @@
# Freeze selected roles
foreach my $role_key (@freeze_list) {
if (!$frozen_roles{$role_key}) {
- $message .= "<br />".&mt('Freezing '.$role.': [_1]',$role_text{$role_key})."\n";
+ $message .= "<br />".
+ &Apache::lonhtmlcommon::confirm_success(&mt('Freezing '.$role.': [_1]',$role_text{$role_key}))."\n";
&Apache::lonhtmlcommon::store_recent('roles',
$role_key,' ',1);
}
@@ -568,7 +569,7 @@
################################################################
sub iconchanger {
my $r = shift;
- Apache::lonhtmlcommon::add_breadcrumb(
+ &Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changeicons',
text => 'Change Main Menu'});
$r->print(Apache::loncommon::start_page('Page Display Settings'));
@@ -669,7 +670,7 @@
sub domcoordchanger {
my $r = shift;
- Apache::lonhtmlcommon::add_breadcrumb(
+ &Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changedomcoord',
text => 'Restrict Domain Coordinator Access'});
$r->print(Apache::loncommon::start_page('Restrict Domain Coordinator Access'));
@@ -1538,7 +1539,8 @@
}
} else {
# error error: run in circles, scream and shout
- $message = &mt("The password for [_1] was not changed.",$user).' '.&mt('Please make sure your old password was entered correctly.');
+ $message = &Apache::lonhtmlcommon::confirm_success(
+ &mt("The password for [_1] was not changed.",$user).' '.&mt('Please make sure your old password was entered correctly.'),1);
unless ($caller eq 'reset_by_email') {
&print_main_menu($r, $message);
}
@@ -2040,8 +2042,8 @@
}elsif($env{'form.action'} eq 'verify_and_change_coursepage'){
&verify_and_change_coursepage($r);
}elsif($env{'form.action'} eq 'debugtoggle'){
- toggle_debug();
- print_main_menu($r);
+ &toggle_debug();
+ &print_main_menu($r);
}
return OK;
@@ -2322,7 +2324,8 @@
}));
}
- if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) {
+ if (($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/)
+ && ($env{'user.domain'} =~/^(msu|gerd)$/)){
push (@Options,({ action => 'debugtoggle',
printmenu => 'yes',
subroutine => \&toggle_debug,