version 1.171, 2007/08/14 16:53:15
|
version 1.174, 2007/08/16 21:36:13
|
Line 216 sub print_username_entry_form {
|
Line 216 sub print_username_entry_form {
|
$jscript,{'add_entries' => \%loaditems,}); |
$jscript,{'add_entries' => \%loaditems,}); |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"javascript:backPage(document.crtuser)", |
({href=>"javascript:backPage(document.crtuser)", |
text=>"User modify/custom role", |
text=>"User modify/custom role edit", |
faq=>282,bug=>'Instructor Interface',}); |
faq=>282,bug=>'Instructor Interface',}); |
|
|
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('User Management'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('User Management'); |
Line 329 $jsback
|
Line 329 $jsback
|
ENDSCRIPT |
ENDSCRIPT |
|
|
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'srch' => "User Search to add/modify roles of", |
'srch' => "User Search to add/modify roles", |
'username' => "username", |
'username' => "username", |
'domain' => "domain", |
'domain' => "domain", |
'lastname' => "last name", |
'lastname' => "last name", |
Line 347 ENDSCRIPT
|
Line 347 ENDSCRIPT
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management')); |
$r->print("<b>$lt{'srch'}</b><br />"); |
$r->print("<b>$lt{'srch'}</b><br />"); |
$r->print(&entry_form($srch->{'srchdomain'},$srch)); |
$r->print(&entry_form($srch->{'srchdomain'},$srch)); |
$r->print('<h3>'.&mt('Select a user to add/modify roles of').'</h3>'); |
$r->print('<h3>'.&mt('Select a user to add/modify roles').'</h3>'); |
$r->print('<form name="usersrchform" method="post">'. |
$r->print('<form name="usersrchform" method="post">'. |
&Apache::loncommon::start_data_table()."\n". |
&Apache::loncommon::start_data_table()."\n". |
&Apache::loncommon::start_data_table_header_row()."\n". |
&Apache::loncommon::start_data_table_header_row()."\n". |
Line 783 ENDCHANGEUSER
|
Line 783 ENDCHANGEUSER
|
'<th>'.$lt{'fn'}.'</th><th>'.$lt{'mn'}.'</th><th>'.$lt{'ln'}.'</th><th>'.$lt{'gen'}.'</th><th>'.$lt{'email'}.'</th>'. |
'<th>'.$lt{'fn'}.'</th><th>'.$lt{'mn'}.'</th><th>'.$lt{'ln'}.'</th><th>'.$lt{'gen'}.'</th><th>'.$lt{'email'}.'</th>'. |
&Apache::loncommon::end_data_table_header_row(). |
&Apache::loncommon::end_data_table_header_row(). |
&Apache::loncommon::start_data_table_row()); |
&Apache::loncommon::start_data_table_row()); |
foreach my $item ('firstname','middlename','lastname','generation','permenanentemail') { |
foreach my $item ('firstname','middlename','lastname','generation','permanentemail') { |
if (&Apache::lonnet::allowed('mau',$ccdomain)) { |
if (&Apache::lonnet::allowed('mau',$ccdomain)) { |
$r->print(<<"END"); |
$r->print(<<"END"); |
<td><input type="text" name="c$item" value="$userenv{$item}" size="15" /></td> |
<td><input type="text" name="c$item" value="$userenv{$item}" size="15" /></td> |
Line 1446 sub update_user_data {
|
Line 1446 sub update_user_data {
|
$changeHash{'middlename'} = $env{'form.cmiddlename'}; |
$changeHash{'middlename'} = $env{'form.cmiddlename'}; |
$changeHash{'lastname'} = $env{'form.clastname'}; |
$changeHash{'lastname'} = $env{'form.clastname'}; |
$changeHash{'generation'} = $env{'form.cgeneration'}; |
$changeHash{'generation'} = $env{'form.cgeneration'}; |
$changeHash{'permanentemail'} = $env{'form.permanentemail'}; |
$changeHash{'permanentemail'} = $env{'form.cpermanentemail'}; |
my $putresult = &Apache::lonnet::put |
my $putresult = &Apache::lonnet::put |
('environment',\%changeHash, |
('environment',\%changeHash, |
$env{'form.ccdomain'},$env{'form.ccuname'}); |
$env{'form.ccdomain'},$env{'form.ccuname'}); |
Line 1471 sub update_user_data {
|
Line 1471 sub update_user_data {
|
<th>$lt{'mddl'}</th> |
<th>$lt{'mddl'}</th> |
<th>$lt{'lst'}</th> |
<th>$lt{'lst'}</th> |
<th>$lt{'gen'}</th> |
<th>$lt{'gen'}</th> |
|
<th>$lt{'mail'}</th> |
<th>$lt{'disk'}<th></tr> |
<th>$lt{'disk'}<th></tr> |
<tr><td>$lt{'prvs'}</td> |
<tr><td>$lt{'prvs'}</td> |
<td>$userenv{'firstname'} </td> |
<td>$userenv{'firstname'} </td> |
Line 2391 sub directorysrch_check {
|
Line 2392 sub directorysrch_check {
|
uname => 'username', |
uname => 'username', |
lastfirst => 'last name, first name', |
lastfirst => 'last name, first name', |
lastname => 'last name', |
lastname => 'last name', |
contains => 'is contained in', |
contains => 'contains', |
exact => 'as exact match to' |
exact => 'as exact match to' |
); |
); |
if ($can_search) { |
if ($can_search) { |
if (ref($dom_inst_srch{'directorysrch'}{'searchby'}) eq 'ARRAY') { |
if (ref($dom_inst_srch{'directorysrch'}{'searchby'}) eq 'ARRAY') { |
if (!grep(/^\Q$srch->{'srchby'}\E$/,@{$dom_inst_srch{'directorysrch'}{'searchby'}})) { |
if (!grep(/^\Q$srch->{'srchby'}\E$/,@{$dom_inst_srch{'directorysrch'}{'searchby'}})) { |
return &mt('Directory search in domain: [_1] is not available for searching by [_2]',$srch->{'srchdomain'},$longtext{$srch->{'srchby'}}); |
return &mt('Directory search in domain: [_1] is not available for searching by "[_2]"',$srch->{'srchdomain'},$longtext{$srch->{'srchby'}}); |
} |
} |
} else { |
} else { |
return &mt('Directory search in domain: [_1] is not available.', $srch->{'srchdomain'}); |
return &mt('Directory search in domain: [_1] is not available.', $srch->{'srchdomain'}); |
Line 2408 sub directorysrch_check {
|
Line 2409 sub directorysrch_check {
|
($dom_inst_srch{'directorysrch'}{'searchtypes'} eq $srch->{'srchtype'})) { |
($dom_inst_srch{'directorysrch'}{'searchtypes'} eq $srch->{'srchtype'})) { |
return 'ok'; |
return 'ok'; |
} else { |
} else { |
return &mt('Directory search in domain [_1] is not available for the requested search type: [_2]',$srch->{'srchdomain'},$longtext{$srch->{'srchtype'}}); |
return &mt('Directory search in domain [_1] is not available for the requested search type: "[_2]"',$srch->{'srchdomain'},$longtext{$srch->{'srchtype'}}); |
} |
} |
} |
} |
} |
} |
Line 2487 sub crumb_utilities {
|
Line 2488 sub crumb_utilities {
|
my %elements = ( |
my %elements = ( |
crtuser => { |
crtuser => { |
srchterm => 'text', |
srchterm => 'text', |
srchin => 'radio', |
srchin => 'selectbox', |
srchby => 'selectbox', |
srchby => 'selectbox', |
srchtype => 'selectbox', |
srchtype => 'selectbox', |
srchdomain => 'selectbox', |
srchdomain => 'selectbox', |