[LON-CAPA-cvs] cvs: loncom /homework grades.pm /interface loncreateuser.pm londocs.pm lonfeedback.pm lonuserutils.pm resetpw.pm /interface/statistics lonstudentassessment.pm
bisitz
bisitz at source.lon-capa.org
Tue Oct 2 14:13:30 EDT 2012
bisitz Tue Oct 2 18:13:30 2012 EDT
Modified files:
/loncom/homework grades.pm
/loncom/interface loncreateuser.pm londocs.pm lonfeedback.pm
lonuserutils.pm resetpw.pm
/loncom/interface/statistics lonstudentassessment.pm
Log:
Use standard styles (info/warning/error):
-------------- next part --------------
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.674 loncom/homework/grades.pm:1.675
--- loncom/homework/grades.pm:1.674 Thu Aug 9 20:06:07 2012
+++ loncom/homework/grades.pm Tue Oct 2 18:03:07 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.674 2012/08/09 20:06:07 raeburn Exp $
+# $Id: grades.pm,v 1.675 2012/10/02 18:03:07 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -7004,7 +7004,13 @@
my @resources=
$navmap->retrieveResources($map,\&scantron_filter_not_exam,1,0);
if (@resources) {
- $r->print("<p>".&mt('Some resources in the sequence currently are not set to exam mode. Grading these resources currently may not work correctly.')."</p>");
+ $r->print(
+ '<p class="LC_warning">'
+ .&mt('Some resources in the sequence currently are not set to'
+ .' exam mode. Grading these resources currently may not'
+ .' work correctly.')
+ .'</p>'
+ );
return (1,$currentphase);
}
}
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.365 loncom/interface/loncreateuser.pm:1.366
--- loncom/interface/loncreateuser.pm:1.365 Tue Aug 21 15:43:27 2012
+++ loncom/interface/loncreateuser.pm Tue Oct 2 18:08:12 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.365 2012/08/21 15:43:27 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.366 2012/10/02 18:08:12 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4259,7 +4259,11 @@
if ($env{'form.phase'} eq 'createnewuser') {
my $response;
if ($env{'form.srchterm'} !~ /^$match_username$/) {
- my $response = &mt('You must specify a valid username. Only the following are allowed: letters numbers - . @');
+ my $response =
+ '<span class="LC_warning">'
+ .&mt('You must specify a valid username. Only the following are allowed:'
+ .' letters numbers - . @')
+ .'</span>';
$env{'form.phase'} = '';
&print_username_entry_form($r,$context,$response,$srch,undef,$crstype,$brcrum);
} else {
@@ -6933,7 +6937,7 @@
my ($visible,$cansetvis,$vismsgs,$visactions) = &visible_in_cat($cdom,$cnum);
if (ref($visactions) eq 'HASH') {
if (!$visible) {
- $r->print('<br />'.$visactions->{'miss'}.'<br />'.$visactions->{'yous'}.
+ $r->print('<br /><span class="LC_warning">'.$visactions->{'miss'}.'</span><br />'.$visactions->{'yous'}.
'<br />');
if (ref($vismsgs) eq 'ARRAY') {
$r->print('<br />'.$visactions->{'take'}.'<ul>');
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.497 loncom/interface/londocs.pm:1.498
--- loncom/interface/londocs.pm:1.497 Mon Oct 1 12:34:18 2012
+++ loncom/interface/londocs.pm Tue Oct 2 18:08:12 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.497 2012/10/01 12:34:18 raeburn Exp $
+# $Id: londocs.pm,v 1.498 2012/10/02 18:08:12 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3983,7 +3983,7 @@
} elsif ($showdoc) {
# -------------------------------------------------------- This is showdoc mode
$r->print("<h1>".&mt('Uploaded Document').' - '.
- &Apache::lonnet::gettitle($r->uri).'</h1><p>'.
+ &Apache::lonnet::gettitle($r->uri).'</h1><p class="LC_warning">'.
&mt('It is recommended that you use an up-to-date virus scanner before handling this file.')."</p><table>".
&entryline(0,&mt("Click to download or use your browser's Save Link function"),$showdoc).'</table>');
}
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.358 loncom/interface/lonfeedback.pm:1.359
--- loncom/interface/lonfeedback.pm:1.358 Fri Jun 22 20:33:15 2012
+++ loncom/interface/lonfeedback.pm Tue Oct 2 18:08:12 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.358 2012/06/22 20:33:15 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.359 2012/10/02 18:08:12 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2698,7 +2698,7 @@
'only_body' => 1,}));
$r->print(<<ENDFAILREDIR);
<img align="right" src="$logo" />
-<b>$lt{'sorr'}</b>
+<p class="LC_warning">$lt{'sorr'}</p>
ENDFAILREDIR
$r->print(&Apache::loncommon::end_page());
}
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.141 loncom/interface/lonuserutils.pm:1.142
--- loncom/interface/lonuserutils.pm:1.141 Tue Aug 21 15:43:27 2012
+++ loncom/interface/lonuserutils.pm Tue Oct 2 18:08:12 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.141 2012/08/21 15:43:27 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.142 2012/10/02 18:08:12 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1691,21 +1691,23 @@
}
}
if (keys(%userlist) == 0) {
+ my $msg = '';
if ($context eq 'author') {
- $r->print(&mt('There are no co-authors to display.')."\n");
+ $msg = &mt('There are no co-authors to display.');
} elsif ($context eq 'domain') {
if ($env{'form.roletype'} eq 'domain') {
- $r->print(&mt('There are no users with domain roles to display.')."\n");
+ $msg = &mt('There are no users with domain roles to display.');
} elsif ($env{'form.roletype'} eq 'author') {
- $r->print(&mt('There are no authors or co-authors to display.')."\n");
+ $msg = &mt('There are no authors or co-authors to display.');
} elsif ($env{'form.roletype'} eq 'course') {
- $r->print(&mt('There are no course users to display')."\n");
+ $msg = &mt('There are no course users to display');
} elsif ($env{'form.roletype'} eq 'community') {
- $r->print(&mt('There are no community users to display')."\n");
+ $msg = &mt('There are no community users to display');
}
} elsif ($context eq 'course') {
$r->print(&mt('There are no course users to display.')."\n");
}
+ $r->print('<p class="LC_info"'.$msg.'</p>'."\n") if $msg;
} else {
# Print out the available choices
my $usercount;
@@ -1717,7 +1719,7 @@
$permission,$env{'form.Status'},\%userlist,$keylist);
}
if (!$usercount) {
- $r->print('<br /><span class="LC_warning">'
+ $r->print('<br /><span class="LC_info">'
.&mt('There are no users matching the search criteria.')
.'</span>'
);
Index: loncom/interface/resetpw.pm
diff -u loncom/interface/resetpw.pm:1.27 loncom/interface/resetpw.pm:1.28
--- loncom/interface/resetpw.pm:1.27 Thu Feb 16 22:18:07 2012
+++ loncom/interface/resetpw.pm Tue Oct 2 18:08:12 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Allow access to password changing via a token sent to user's e-mail.
#
-# $Id: resetpw.pm,v 1.27 2012/02/16 22:18:07 raeburn Exp $
+# $Id: resetpw.pm,v 1.28 2012/10/02 18:08:12 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -228,10 +228,22 @@
if ($result eq 'ok') {
$msg .= &mt("An e-mail sent to the e-mail address associated with your LON-CAPA account includes the web address for the link you should use to complete the reset process.<br /><br />The link included in the message will be valid for the next <b>two</b> hours.");
} else {
- $msg .= &mt("An error occurred when sending a message to the e-mail address associated with your LON-CAPA account. Please contact the [_1] ([_2]) for assistance.",$contact_name,$contact_email);
+ $msg .=
+ '<p class="LC_warning">'
+ .&mt("An error occurred when sending a message to the e-mail address"
+ ." associated with your LON-CAPA account."
+ ." Please contact the [_1] ([_2]) for assistance."
+ ,$contact_name,$contact_email)
+ .'</p>';
}
} else {
- $msg .= &mt("An error occurred creating a token required for the password reset process. Please contact the [_1] ([_2]) for assistance.",$contact_name,$contact_email);
+ $msg .=
+ '<p class="LC_warning">'
+ .&mt("An error occurred creating a token required for the"
+ ." password reset process."
+ ." Please contact the [_1] ([_2]) for assistance."
+ ,$contact_name,$contact_email)
+ .'</p>';
}
return $msg;
}
@@ -317,11 +329,21 @@
my $result = &send_mail($domdesc,$data{'email'},$mailmsg,
$contact_name,$contact_email);
if ($result eq 'ok') {
- $msg .= &mt('An e-mail confirming setting of the password for your LON-CAPA account has been sent to [_1].',$data{'email'});
+ $msg .=
+ '<p class="LC_success">'
+ .&mt('An e-mail confirming setting of the password'
+ .' for your LON-CAPA account has been sent to [_1].'
+ ,$data{'email'})
+ .'</p>';
} else {
- $msg .= &mt('An error occurred when sending e-mail to [_1] confirming setting of your new password.',$data{'email'});
+ $msg .=
+ '<p class="LC_error">'
+ .&mt('An error occurred when sending e-mail to [_1]'
+ .' confirming setting of your new password.'
+ ,$data{'email'})
+ .'</p>';
}
- $msg .= '<br /><br />'
+ $msg .= '<br />'
.'<a href="/adm/login">'.&mt('Go to the login page').'</a>.';
} elsif ($change_failed eq 'invalid_client') {
my $homeserver = &Apache::lonnet::homeserver($data{'username'},$data{'domain'});
@@ -337,7 +359,13 @@
$opentag = '<a href="'.$url.'">';
$closetag = '</a>';
}
- $msg .= &mt('A problem occurred when attempting to reset the password for your account. Please try again from your [_1]home server[_2].',$opentag,$closetag);
+ $msg .=
+ '<p class="LC_warning">'
+ .&mt('A problem occurred when attempting to reset'
+ .' the password for your account.'
+ .' Please try again from your [_1]home server[_2].'
+ ,$opentag,$closetag)
+ .'</p>';
}
} else {
$msg .= &generic_failure_msg($contact_name,$contact_email);
@@ -348,20 +376,30 @@
&Apache::lonpreferences::passwordchanger($r,'','reset_by_email',$token);
}
} else {
- $msg = &mt('Sorry, the token generated when you requested a password reset has expired. Please submit a [_1]new request[_2], and follow the link to the web page included in the new e-mail that will be sent to you, to allow you to enter a new password.'
- ,'<a href="/adm/resetpw">','</a>');
+ $msg =
+ '<p class="LC_warning">'
+ .&mt('Sorry, the token generated when you requested a password reset has expired. Please submit a [_1]new request[_2], and follow the link to the web page included in the new e-mail that will be sent to you, to allow you to enter a new password.'
+ ,'<a href="/adm/resetpw">','</a>')
+ .'</p>';
}
} else {
- $msg .= &mt('Sorry, the URL generated when you requested reset of your password contained incomplete information. Please submit a [_1]new request[_2] for a password reset, and use the new URL that will be sent to your e-mail account to complete the process.'
- ,'<a href="/adm/resetpw">','</a>');
+ $msg .=
+ '<p class="LC_warning">'
+ .&mt('Sorry, the URL generated when you requested reset of your password contained incomplete information. Please submit a [_1]new request[_2] for a password reset, and use the new URL that will be sent to your e-mail account to complete the process.'
+ ,'<a href="/adm/resetpw">','</a>')
+ .'</p>';
}
return $msg;
}
sub generic_failure_msg {
my ($contact_name,$contact_email) = @_;
- return &mt('A problem occurred when attempting to reset the password for your account. Please contact the [_1] - ([_2]) for assistance.',
- $contact_name,'<a href="mailto:'.$contact_email.'">'.$contact_email.'</a>');
+ return
+ '<p class="LC_warning">'
+ .&mt('A problem occurred when attempting to reset the password for your account.'
+ .' Please contact the [_1] - ([_2]) for assistance.',
+ $contact_name,'<a href="mailto:'.$contact_email.'">'.$contact_email.'</a>')
+ .'</p>';
}
sub create_passwd {
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.169 loncom/interface/statistics/lonstudentassessment.pm:1.170
--- loncom/interface/statistics/lonstudentassessment.pm:1.169 Tue Mar 20 16:05:26 2012
+++ loncom/interface/statistics/lonstudentassessment.pm Tue Oct 2 18:13:30 2012
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.169 2012/03/20 16:05:26 bisitz Exp $
+# $Id: lonstudentassessment.pm,v 1.170 2012/10/02 18:13:30 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1120,7 +1120,7 @@
}
my $too_many_cols_error_message =
'<h2>'.&mt('Unable to Complete Request').'</h2>'.$/.
- '<p>'.&mt('LON-CAPA is unable to produce your Excel spreadsheet because your selections will result in more than 255 columns. Excel allows only 255 columns in a spreadsheet.').'</p>'.$/.
+ '<p class="_LC_warning">'.&mt('LON-CAPA is unable to produce your Excel spreadsheet because your selections will result in more than 255 columns. Excel allows only 255 columns in a spreadsheet.').'</p>'.$/.
'<p>'.&mt('You may consider reducing the number of <b>Sequences or Folders</b> you have selected.').'</p>'.$/.
'<p>'.&mt('LON-CAPA can produce <b>CSV</b> files of this data or Excel files of the <b>Scores Summary</b> data.').'</p>'.$/;
if ($chosen_output->{'base'} eq 'tries' && $total_columns > 255) {
@@ -1654,12 +1654,13 @@
# Deal with unimplemented requests
$request_aborted = undef;
if ($chosen_output->{'base'} =~ /final table/) {
- $r->print(<<END);
-<h2>Unable to Complete Request</h2>
-<p>
-The <b>Summary Table (Scores)</b> option is not available for non-HTML output.
-</p>
-END
+ $r->print(
+ '<h2>'.&mt('Unable to Complete Request').'</h2>'
+ .'<p class="LC_warning">'
+ .&mt('The [_1]Summary Table (Scores)[_2] option'
+ .' is not available for non-HTML output.','<b>','</b>')
+ .'</p>'
+ );
$request_aborted = 1;
}
return if ($request_aborted);
More information about the LON-CAPA-cvs
mailing list