version 1.61, 2011/01/11 04:28:52
|
version 1.63, 2011/03/06 21:17:15
|
Line 3163 sub print_request_outcome {
|
Line 3163 sub print_request_outcome {
|
$enrollstart = ''; |
$enrollstart = ''; |
$enrollend = ''; |
$enrollend = ''; |
} |
} |
my (%alerts,%rulematch,%inst_results,%curr_rules,%got_rules,%disallowmsg); |
my (%alerts,%rulematch,%inst_results,%curr_rules,%got_rules,%disallowmsg,%skipped); |
for (my $i=0; $i<$env{'form.persontotal'}; $i++) { |
for (my $i=0; $i<$env{'form.persontotal'}; $i++) { |
my $uname = $env{'form.person_'.$i.'_uname'}; |
my $uname = $env{'form.person_'.$i.'_uname'}; |
my $udom = $env{'form.person_'.$i.'_dom'}; |
my $udom = $env{'form.person_'.$i.'_dom'}; |
Line 3175 sub print_request_outcome {
|
Line 3175 sub print_request_outcome {
|
lastname => $env{'form.person_'.$i.'_lastname'}, |
lastname => $env{'form.person_'.$i.'_lastname'}, |
emailaddr => $env{'form.person_'.$i.'_emailaddr'}, |
emailaddr => $env{'form.person_'.$i.'_emailaddr'}, |
}; |
}; |
my $usertype = &get_usertype($udom,$uname,\%curr_rules,\%got_rules); |
if (&Apache::lonnet::homeserver($uname,$udom) eq 'no_host') { |
if (&Apache::lonuserutils::can_create_user($udom,'requestcrs',$usertype)) { |
my $usertype = &get_usertype($udom,$uname,\%curr_rules,\%got_rules); |
my ($allowed,$msg,$authtype,$authparam) = |
if (&Apache::lonuserutils::can_create_user($udom,'requestcrs',$usertype)) { |
&check_newuser_rules($udom,$uname,\%alerts,\%rulematch, |
my ($allowed,$msg,$authtype,$authparam) = |
\%inst_results,\%curr_rules,\%got_rules); |
&check_newuser_rules($udom,$uname,\%alerts,\%rulematch, |
if ($allowed) { |
\%inst_results,\%curr_rules,\%got_rules); |
my %domdefaults = &Apache::lonnet::get_domain_defaults($udom); |
if ($allowed) { |
if ($usertype eq 'official') { |
my %domdefaults = &Apache::lonnet::get_domain_defaults($udom); |
if ($authtype eq '') { |
if ($usertype eq 'official') { |
$authtype = $domdefaults{'auth_def'}; |
if ($authtype eq '') { |
$authparam = $domdefaults{'auth_arg_def'}; |
|
} else { |
|
if ($authtype eq 'loc') { |
|
$authtype = 'localauth'; |
|
} elsif ($authtype eq 'int') { |
|
$authtype = 'internal'; |
|
} |
|
if ($authtype !~ /^(krb4|krb5|internal|localauth)$/) { |
|
$authtype = $domdefaults{'auth_def'}; |
$authtype = $domdefaults{'auth_def'}; |
$authparam = $domdefaults{'auth_arg_def'}; |
$authparam = $domdefaults{'auth_arg_def'}; |
|
} else { |
|
if ($authtype eq 'loc') { |
|
$authtype = 'localauth'; |
|
} elsif ($authtype eq 'int') { |
|
$authtype = 'internal'; |
|
} |
|
if ($authtype !~ /^(krb4|krb5|internal|localauth)$/) { |
|
$authtype = $domdefaults{'auth_def'}; |
|
$authparam = $domdefaults{'auth_arg_def'}; |
|
} |
|
} |
|
} elsif ($usertype eq 'unofficial') { |
|
if ($authtype eq '') { |
|
$authtype = 'internal'; |
|
$authparam = ''; |
} |
} |
|
} else { |
|
$authtype = $domdefaults{'auth_def'}; |
|
$authparam = $domdefaults{'auth_arg_def'}; |
} |
} |
} elsif ($usertype eq 'unofficial') { |
if (($authtype eq '') || |
if ($authtype eq '') { |
(($authtype =~/^krb(4|5)$/) && ($authparam eq '')) || |
$authtype = 'internal'; |
($authtype !~ /^(krb4|krb5|internal|localauth)$/)) { |
$authparam = ''; |
$skipped{$uname.':'.$udom} = 1; |
|
next; |
|
} else { |
|
$personnel{$uname.':'.$udom}{'authtype'} = $authtype; |
|
$personnel{$uname.':'.$udom}{'autharg'} = $authparam; |
} |
} |
} else { |
} else { |
$authtype = $domdefaults{'auth_def'}; |
$skipped{$uname.':'.$udom} = 1; |
$authparam = $domdefaults{'auth_arg_def'}; |
|
} |
|
if (($authtype eq '') || |
|
(($authtype =~/^krb(4|5)$/) && ($authparam eq '')) || |
|
($authtype !~ /^(krb4|krb5|internal|localauth)$/)) { |
|
next; |
next; |
} else { |
|
$personnel{$uname.':'.$udom}{'authtype'} = $authtype; |
|
$personnel{$uname.':'.$udom}{'autharg'} = $authparam; |
|
} |
} |
} else { |
} else { |
|
$skipped{$uname.':'.$udom} = 1; |
next; |
next; |
} |
} |
} else { |
|
next; |
|
} |
} |
} |
} |
my $role = $env{'form.person_'.$i.'_role'}; |
my $role = $env{'form.person_'.$i.'_role'}; |
Line 3265 sub print_request_outcome {
|
Line 3270 sub print_request_outcome {
|
push(@baduname,$uname.':'.$udom); |
push(@baduname,$uname.':'.$udom); |
} |
} |
} |
} |
|
if (keys(%skipped)) { |
|
foreach my $key (keys(%skipped)) { |
|
delete($personnel{$key}); |
|
} |
|
} |
my ($accessstart,$accessend) = &dates_from_form('accessstart','accessend'); |
my ($accessstart,$accessend) = &dates_from_form('accessstart','accessend'); |
my $autodrops = 0; |
my $autodrops = 0; |
if ($env{'form.autodrops'}) { |
if ($env{'form.autodrops'}) { |
Line 3479 sub print_request_outcome {
|
Line 3489 sub print_request_outcome {
|
} |
} |
($storeresult,my $updateresult) = |
($storeresult,my $updateresult) = |
&Apache::loncoursequeueadmin::update_coursereq_status(\%reqhash,$dom, |
&Apache::loncoursequeueadmin::update_coursereq_status(\%reqhash,$dom, |
$cnum,$reqstatus,'request'); |
$cnum,$reqstatus,'request',$env{'user.domain'},$env{'user.name'}); |
if ($modified && $queued && $storeresult eq 'ok') { |
if ($modified && $queued && $storeresult eq 'ok') { |
if ($crstype eq 'community') { |
if ($crstype eq 'community') { |
$output .= '<p>'.&mt('Your community request has been updated').'</p>'; |
$output .= '<p>'.&mt('Your community request has been updated').'</p>'; |