'.
&Apache::loncommon::end_data_table_row()."\n";
- }
}
return $output;
}
@@ -670,10 +666,8 @@ sub print_username_entry_form {
$helpitem = 'Course_Editing_Custom_Roles';
} elsif ($env{'form.action'} eq 'singlestudent') {
$helpitem = 'Course_Add_Student';
- } elsif ($env{'form.action'} eq 'accesslogs') {
- $helpitem = 'Domain_User_Access_Logs';
}
- my %breadcrumb_text = &singleuser_breadcrumb($crstype,$context,$defdom);
+ my %breadcrumb_text = &singleuser_breadcrumb($crstype);
if ($env{'form.action'} eq 'custom') {
push(@{$brcrum},
{href=>"javascript:backPage(document.crtuser)",
@@ -701,8 +695,6 @@ sub print_username_entry_form {
'srst' => 'Search for a user and enroll as a student',
'srme' => 'Search for a user and enroll as a member',
'srad' => 'Search for a user and modify/add user information or roles',
- 'srvu' => 'Search for a user and view user information and roles',
- 'srva' => 'Search for a user and view access log information',
'usr' => "Username",
'dom' => "Domain",
'ecrp' => "Define or Edit Custom Role",
@@ -755,20 +747,12 @@ sub print_username_entry_form {
} else {
$actiontext = $lt{'srst'};
}
- } elsif ($env{'form.action'} eq 'accesslogs') {
- $actiontext = $lt{'srva'};
- } elsif (($env{'form.action'} eq 'singleuser') &&
- ($context eq 'domain') && (!&Apache::lonnet::allowed('mau',$defdom))) {
- $actiontext = $lt{'srvu'};
}
$r->print("
$actiontext
");
if ($env{'form.origform'} ne 'crtusername') {
- if ($response) {
- $r->print("\n
$response
".
- ' ');
- }
+ $r->print("\n".$response);
}
- $r->print(&entry_form($defdom,$srch,$forcenewuser,$context,$response,$crstype,1));
+ $r->print(&entry_form($defdom,$srch,$forcenewuser,$context,$response,$crstype));
}
}
@@ -811,7 +795,7 @@ END
}
sub entry_form {
- my ($dom,$srch,$forcenewuser,$context,$responsemsg,$crstype,$fixeddom) = @_;
+ my ($dom,$srch,$forcenewuser,$context,$responsemsg,$crstype) = @_;
my ($usertype,$inexact);
if (ref($srch) eq 'HASH') {
if (($srch->{'srchin'} eq 'dom') &&
@@ -829,20 +813,16 @@ sub entry_form {
}
my $cancreate =
&Apache::lonuserutils::can_create_user($dom,$context,$usertype);
- my ($userpicker,$cansearch) =
+ my $userpicker =
&Apache::loncommon::user_picker($dom,$srch,$forcenewuser,
- 'document.crtuser',$cancreate,$usertype,$context,$fixeddom);
+ 'document.crtuser',$cancreate,$usertype);
my $srchbutton = &mt('Search');
if ($env{'form.action'} eq 'singlestudent') {
$srchbutton = &mt('Search and Enroll');
- } elsif ($env{'form.action'} eq 'accesslogs') {
- $srchbutton = &mt('Search');
} elsif ($cancreate && $responsemsg ne '' && $inexact) {
$srchbutton = &mt('Search or Add New User');
}
- my $output;
- if ($cansearch) {
- $output = <<"ENDBLOCK";
+ my $output = <<"ENDBLOCK";
ENDBLOCK
- } else {
- $output = '
'.$userpicker.'
';
- }
- if (($env{'form.phase'} eq '') && ($env{'form.action'} ne 'accesslogs') &&
- (!(($env{'form.action'} eq 'singleuser') && ($context eq 'domain') &&
- (!&Apache::lonnet::allowed('mau',$env{'request.role.domain'}))))) {
+ if ($env{'form.phase'} eq '') {
my $defdom=$env{'request.role.domain'};
my $domform = &Apache::loncommon::select_dom_form($defdom,'srchdomain');
my %lt=&Apache::lonlocal::texthash(
@@ -971,13 +946,9 @@ ENDSCRIPT
'usrch' => "User Search to add/modify roles",
'stusrch' => "User Search to enroll student",
'memsrch' => "User Search to enroll member",
- 'srcva' => "Search for a user and view access log information",
- 'usrvu' => "User Search to view user roles",
'usel' => "Select a user to add/modify roles",
- 'suvr' => "Select a user to view roles",
'stusel' => "Select a user to enroll as a student",
'memsel' => "Select a user to enroll as a member",
- 'vacsel' => "Select a user to view access log",
'username' => "username",
'domain' => "domain",
'lastname' => "last name",
@@ -987,7 +958,7 @@ ENDSCRIPT
if ($context eq 'requestcrs') {
$r->print('
');
} else {
- my %breadcrumb_text = &singleuser_breadcrumb($crstype,$context,$srch->{'srchdomain'});
+ my %breadcrumb_text = &singleuser_breadcrumb($crstype);
my $helpitem;
if ($env{'form.action'} eq 'singleuser') {
$helpitem = 'Course_Change_Privileges';
@@ -1007,19 +978,9 @@ ENDSCRIPT
);
$r->print(&Apache::loncommon::start_page('User Management',$jscript,{bread_crumbs => $brcrum}));
if ($env{'form.action'} eq 'singleuser') {
- my $readonly;
- if (($context eq 'domain') && (!&Apache::lonnet::allowed('mau',$srch->{'srchdomain'}))) {
- $readonly = 1;
- $r->print("$lt{'usrvu'} ");
- } else {
- $r->print("$lt{'usrch'} ");
- }
+ $r->print("$lt{'usrch'} ");
$r->print(&entry_form($srch->{'srchdomain'},$srch,undef,$context,undef,$crstype));
- if ($readonly) {
- $r->print('