--- loncom/interface/lonuserutils.pm 2008/09/12 04:44:13 1.67
+++ loncom/interface/lonuserutils.pm 2008/10/15 13:00:24 1.72
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.67 2008/09/12 04:44:13 droeschl Exp $
+# $Id: lonuserutils.pm,v 1.72 2008/10/15 13:00:24 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1009,7 +1009,7 @@ sub date_setting_table {
}
my $perpetual = '';
if ($mode eq 'create_enrolldates') {
@@ -1295,9 +1295,13 @@ sub print_userlist {
$output_selector .= "\n".$option;
}
$output_selector .= '';
- $r->print(''.(' 'x3));
- }
- $r->print(''.(' 'x3)."\n");
+ $r->print(''.(' 'x3));
+ }
+ $r->print(''.(' 'x3)."\n");
my $roleselected = '';
if ($env{'form.showrole'} eq 'Any') {
$roleselected = ' selected="selected" ';
@@ -1473,7 +1477,10 @@ sub print_userlist {
$permission,$env{'form.Status'},\%userlist,$keylist);
}
if (!$usercount) {
- $r->print('
'.&mt('There are no users matching the search criteria.'));
+ $r->print('
'
+ .&mt('There are no users matching the search criteria.')
+ .''
+ );
}
}
$r->print(''
+ .&mt('Role Type: [_1]',$role_select)
+ .'';
} else {
$role_select = '';
- $output = '';
+ $output = '';
}
return $output;
}
@@ -1893,15 +1904,15 @@ sub aggregate_user_info {
sub process_date_info {
my ($userdata) = @_;
my $now = time;
- $userdata->{'status'} = 'Active';
+ $userdata->{'status'} = &mt('Active');
if ($userdata->{'start'} > 0) {
if ($now < $userdata->{'start'}) {
- $userdata->{'status'} = 'Future';
+ $userdata->{'status'} = &mt('Future');
}
}
if ($userdata->{'end'} > 0) {
if ($now > $userdata->{'end'}) {
- $userdata->{'status'} = 'Expired';
+ $userdata->{'status'} = &mt('Expired');
}
}
return;
@@ -2244,7 +2255,7 @@ END
time.'_'.rand(1000000000).'.csv';
unless ($CSVfile = Apache::File->new('>/home/httpd'.$CSVfilename)) {
$r->log_error("Couldn't open $CSVfilename for output $!");
- $r->print(&mt('Problems occurred in writing the csv file. '
+ $r->print(&mt('Problems occurred in writing the CSV file. '
.'This error has been logged. '
.'Please alert your LON-CAPA administrator.'));
$CSVfile = undef;
@@ -2564,12 +2575,10 @@ END
$r->print(&Apache::loncommon::end_data_table().'
');
} elsif ($mode eq 'excel') {
$excel_workbook->close();
- $r->print('
'. - &mt('Your Excel spreadsheet').' '.&mt('is ready for download').'.
'."\n"); + $r->print(&mt('[_1]Your Excel spreadsheet[_2] is ready for download.', '','')."
\n"); } elsif ($mode eq 'csv') { close($CSVfile); - $r->print(''. - &mt('Your CSV file').' '.&mt('is ready for download').'.
'."\n"); + $r->print(&mt('[_1]Your CSV file[_2] is ready for download.', '','')."
\n"); $r->rflush(); } if ($mode eq 'autoenroll') { @@ -3624,7 +3633,7 @@ sub upfile_drop_add { ''); next; } else { - if ($entries{$fields{'dom'}} + if ($entries{$fields{'domain'}} ne &LONCAPA::clean_domain($entries{$fields{'domain'}})) { $r->print('