version 1.358.4.1, 2012/02/06 04:50:52
|
version 1.359, 2011/12/08 22:10:18
|
Line 674 $userpicker
|
Line 674 $userpicker
|
ENDBLOCK |
ENDBLOCK |
if ($env{'form.phase'} eq '') { |
if ($env{'form.phase'} eq '') { |
my $defdom=$env{'request.role.domain'}; |
my $defdom=$env{'request.role.domain'}; |
my $domform = &Apache::loncommon::select_dom_form($defdom,'srchdomain','',1); |
my $domform = &Apache::loncommon::select_dom_form($defdom,'srchdomain'); |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'enro' => 'Enroll one student', |
'enro' => 'Enroll one student', |
'enrm' => 'Enroll one member', |
'enrm' => 'Enroll one member', |
Line 723 $showresponse
|
Line 723 $showresponse
|
<table> |
<table> |
<tr> |
<tr> |
<td>$lt{'usr'}:</td> |
<td>$lt{'usr'}:</td> |
<td><input type="text" size="25" name="srchterm" /></td> |
<td><input type="text" size="15" name="srchterm" /></td> |
<td> $lt{'dom'}:</td><td>$domform</td> |
<td> $lt{'dom'}:</td><td>$domform</td> |
<td> $sellink </td> |
<td> $sellink </td> |
<td> <input name="userrole" type="submit" value="$buttontext" /></td> |
<td> <input name="userrole" type="submit" value="$buttontext" /></td> |
Line 742 sub user_modification_js {
|
Line 742 sub user_modification_js {
|
<script type="text/javascript" language="Javascript"> |
<script type="text/javascript" language="Javascript"> |
// <![CDATA[ |
// <![CDATA[ |
|
|
function pclose() { |
|
parmwin=window.open("/adm/rat/empty.html","LONCAPAparms", |
|
"height=350,width=350,scrollbars=no,menubar=no"); |
|
parmwin.close(); |
|
} |
|
|
|
$pjump_def |
$pjump_def |
$dc_setcourse_code |
$dc_setcourse_code |
|
|
function dateset() { |
function dateset() { |
eval("document.cu."+document.cu.pres_marker.value+ |
eval("document.cu."+document.cu.pres_marker.value+ |
".value=document.cu.pres_value.value"); |
".value=document.cu.pres_value.value"); |
pclose(); |
modalWindow.close(); |
} |
} |
|
|
$nondc_setsection_code |
$nondc_setsection_code |
Line 938 sub print_user_modification_page {
|
Line 932 sub print_user_modification_page {
|
my (%rulematch,%inst_results,$newuser,%alerts,%curr_rules,%got_rules); |
my (%rulematch,%inst_results,$newuser,%alerts,%curr_rules,%got_rules); |
my $uhome=&Apache::lonnet::homeserver($ccuname,$ccdomain); |
my $uhome=&Apache::lonnet::homeserver($ccuname,$ccdomain); |
if ($uhome eq 'no_host') { |
if ($uhome eq 'no_host') { |
my $lc_ccuname = lc($ccuname); |
my $usertype; |
if ($lc_ccuname ne $ccuname) { |
|
$uhome = &Apache::lonnet::homeserver($lc_ccuname,$ccdomain); |
|
$ccuname = $lc_ccuname; |
|
} |
|
} |
|
if ($uhome eq 'no_host') { |
|
my ($rules,$ruleorder) = |
my ($rules,$ruleorder) = |
&Apache::lonnet::inst_userrules($ccdomain,'username'); |
&Apache::lonnet::inst_userrules($ccdomain,'username'); |
my $usertype = |
$usertype = |
&Apache::lonuserutils::check_usertype($ccdomain,$ccuname,$rules, |
&Apache::lonuserutils::check_usertype($ccdomain,$ccuname,$rules, |
\%curr_rules,\%got_rules); |
\%curr_rules,\%got_rules); |
my $cancreate = |
my $cancreate = |
&Apache::lonuserutils::can_create_user($ccdomain,$context, |
&Apache::lonuserutils::can_create_user($ccdomain,$context, |
$usertype); |
$usertype); |
Line 4106 sub handler {
|
Line 4094 sub handler {
|
if ($env{'form.phase'} eq 'createnewuser') { |
if ($env{'form.phase'} eq 'createnewuser') { |
my $response; |
my $response; |
if ($env{'form.srchterm'} !~ /^$match_username$/) { |
if ($env{'form.srchterm'} !~ /^$match_username$/) { |
my $response = '<p class="LC_warning">'. |
my $response = &mt('You must specify a valid username. Only the following are allowed: letters numbers - . @'); |
&mt('You must specify a valid username. Only the following are allowed: letters numbers - . @'). |
|
'</p>'; |
|
$env{'form.phase'} = ''; |
$env{'form.phase'} = ''; |
&print_username_entry_form($r,$context,$response,$srch,undef,$crstype,$brcrum); |
&print_username_entry_form($r,$context,$response,$srch,undef,$crstype,$brcrum); |
} else { |
} else { |
Line 5622 sub user_search_result {
|
Line 5608 sub user_search_result {
|
if (($srch->{'srchin'} eq 'dom') || ($srch->{'srchin'} eq 'instd')) { |
if (($srch->{'srchin'} eq 'dom') || ($srch->{'srchin'} eq 'instd')) { |
if (($srch->{'srchdomain'} eq '') || |
if (($srch->{'srchdomain'} eq '') || |
! (&Apache::lonnet::domain($srch->{'srchdomain'}))) { |
! (&Apache::lonnet::domain($srch->{'srchdomain'}))) { |
$response = '<p class="LC_warning">'. |
$response = &mt('You must specify a valid domain when searching in a domain or institutional directory.') |
&mt('You must specify a valid domain when searching in a domain or institutional directory.'). |
|
'</p>'; |
|
} |
} |
} |
} |
if (($srch->{'srchin'} eq 'dom') || ($srch->{'srchin'} eq 'crs') || |
if (($srch->{'srchin'} eq 'dom') || ($srch->{'srchin'} eq 'crs') || |
Line 5637 sub user_search_result {
|
Line 5621 sub user_search_result {
|
} |
} |
} |
} |
if ($unamecheck !~ /^$match_username$/) { |
if ($unamecheck !~ /^$match_username$/) { |
$response = '<p class="LC_warning">'. |
$response = &mt('You must specify a valid username. Only the following are allowed: letters numbers - . @'); |
&mt('You must specify a valid username. Only the following are allowed: letters numbers - . @'). |
|
'</p>'; |
|
} |
} |
} |
} |
} |
} |
Line 5814 sub user_search_result {
|
Line 5796 sub user_search_result {
|
($currstate,$response,$forcenewuser) = |
($currstate,$response,$forcenewuser) = |
&build_search_response($context,$srch,%srch_results); |
&build_search_response($context,$srch,%srch_results); |
} else { |
} else { |
my $showdom = &display_domain_info($srch->{'srchdomain'}); |
my $showdom = &display_domain_info($srch->{'srchdomain'}); $response = '<span class="LC_warning">'. |
$response = '<span class="LC_warning">'. |
|
&mt('Institutional directory search is not available in domain: [_1]',$showdom). |
&mt('Institutional directory search is not available in domain: [_1]',$showdom). |
'</span><br />'. |
'</span><br />'. |
&mt('You may want to search in the LON-CAPA domain instead of the institutional directory.'). |
&mt('You may want to search in the LON-CAPA domain instead of the institutional directory.'). |