[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /interface lonuserutils.pm
raeburn
raeburn@source.lon-capa.org
Sat, 21 Mar 2009 06:21:55 -0000
raeburn Sat Mar 21 06:21:55 2009 EDT
Modified files: (Branch: version_2_8_X)
/loncom/interface lonuserutils.pm
Log:
- Backport 1.83.
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.73.2.2 loncom/interface/lonuserutils.pm:1.73.2.3
--- loncom/interface/lonuserutils.pm:1.73.2.2 Mon Jan 5 17:03:13 2009
+++ loncom/interface/lonuserutils.pm Sat Mar 21 06:21:55 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.73.2.2 2009/01/05 17:03:13 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.73.2.3 2009/03/21 06:21:55 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1914,15 +1914,15 @@
sub process_date_info {
my ($userdata) = @_;
my $now = time;
- $userdata->{'status'} = &mt('Active');
+ $userdata->{'status'} = 'Active';
if ($userdata->{'start'} > 0) {
if ($now < $userdata->{'start'}) {
- $userdata->{'status'} = &mt('Future');
+ $userdata->{'status'} = 'Future';
}
}
if ($userdata->{'end'} > 0) {
if ($now > $userdata->{'end'}) {
- $userdata->{'status'} = &mt('Expired');
+ $userdata->{'status'} = 'Expired';
}
}
return;
@@ -2309,6 +2309,11 @@
$grpfilter = 'all';
}
}
+ my %ltstatus = &Apache::lonlocal::texthash(
+ Active => 'Active',
+ Future => 'Future',
+ Expired => 'Expired',
+ );
# Get groups, role, permanent e-mail so we can sort on them if
# necessary.
foreach my $user (keys(%{$userlist})) {
@@ -2521,6 +2526,12 @@
$r->print('<td>'.&print_username_link($mode,\%in).'</td>');
} elsif (($item eq 'start' || $item eq 'end') && ($actionselect)) {
$r->print('<td>'.$in{$item}.'<input type="hidden" name="'.$checkval.'_'.$item.'" value="'.$sdata->[$index{$item}].'" /></td>'."\n");
+ } elsif ($item eq 'status') {
+ my $showitem = $in{$item};
+ if (defined($ltstatus{$in{$item}})) {
+ $showitem = $ltstatus{$in{$item}};
+ }
+ $r->print('<td>'.$showitem.'</td>'."\n");
} else {
$r->print('<td>'.$in{$item}.'</td>'."\n");
}