--- loncom/interface/lonuserutils.pm 2007/11/06 18:23:14 1.3
+++ loncom/interface/lonuserutils.pm 2007/11/10 22:18:09 1.4
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.3 2007/11/06 18:23:14 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.4 2007/11/10 22:18:09 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1281,12 +1281,16 @@ sub print_userlist {
}
} else {
# Print out the available choices
+ my $usercount;
if ($env{'form.action'} eq 'modifystudent') {
- &show_users_list($r,$context,'view','modify',
- $env{'form.Status'},\%userlist,$keylist);
+ ($usercount) = &show_users_list($r,$context,'view','modify',
+ $env{'form.Status'},\%userlist,$keylist);
} else {
- &show_users_list($r,$context,$env{'form.output'},'aboutme',
- $env{'form.Status'},\%userlist,$keylist);
+ ($usercount) = &show_users_list($r,$context,$env{'form.output'},
+ 'aboutme',$env{'form.Status'},\%userlist,$keylist);
+ }
+ if (!$usercount) {
+ $r->print(' '.&mt('There are no users matching the search criteria.'));
}
}
$r->print('');
@@ -1699,73 +1703,76 @@ END
}
push(@cols,'email');
- my $rolefilter;
+ my $rolefilter = $env{'form.showrole'};
if ($env{'form.showrole'} ne 'Any') {
$rolefilter = &Apache::lonnet::plaintext($env{'form.showrole'});
}
my $results_description = &results_header_row($rolefilter,$statusmode,
$context);
$r->print(''.$results_description.' ');
+ my $output;
if ($mode eq 'html' || $mode eq 'view') {
- if ($linkto eq 'aboutme') {
- $r->print(&mt("Select a user name to view the user's personal page."));
- } elsif ($linkto eq 'modify') {
- $r->print(&mt("Select a user name to modify the user's information"));
- }
$r->print(<
END
- $r->print("\n
\n".
+ if ($linkto eq 'aboutme') {
+ $output = &mt("Select a user name to view the user's personal page.");
+ } elsif ($linkto eq 'modify') {
+ $output = &mt("Select a user name to modify the user's information");
+ }
+ $output .= "\n