version 1.188, 2007/10/09 17:33:57
|
version 1.189, 2007/10/11 02:16:25
|
Line 2408 sub handler {
|
Line 2408 sub handler {
|
|
|
my $phase = $env{'form.phase'}; |
my $phase = $env{'form.phase'}; |
my @search = ('srchterm','srchby','srchin','srchtype','srchdomain'); |
my @search = ('srchterm','srchby','srchin','srchtype','srchdomain'); |
|
|
|
&Apache::loncreateuser::restore_prev_selections(); |
|
my $srch; |
|
foreach my $item (@search) { |
|
$srch->{$item} = $env{'form.'.$item}; |
|
} |
|
|
if (($phase eq 'get_user_info') || ($phase eq 'userpicked')) { |
if (($phase eq 'get_user_info') || ($phase eq 'userpicked')) { |
my $srch; |
|
foreach my $item (@search) { |
|
$srch->{$item} = $env{'form.'.$item}; |
|
} |
|
if ($env{'form.phase'} eq 'get_user_info') { |
if ($env{'form.phase'} eq 'get_user_info') { |
my ($currstate,$response,$forcenewuser,$results) = |
my ($currstate,$response,$forcenewuser,$results) = |
&user_search_result($srch); |
&user_search_result($srch); |
Line 2456 sub handler {
|
Line 2459 sub handler {
|
} elsif ($env{'form.phase'} eq 'set_custom_roles') { |
} elsif ($env{'form.phase'} eq 'set_custom_roles') { |
&set_custom_role($r); |
&set_custom_role($r); |
} else { |
} else { |
&print_username_entry_form($r); |
&print_username_entry_form($r,undef,$srch); |
} |
} |
} else { |
} else { |
$env{'user.error.msg'}= |
$env{'user.error.msg'}= |
Line 2466 sub handler {
|
Line 2469 sub handler {
|
return OK; |
return OK; |
} |
} |
|
|
|
sub restore_prev_selections { |
|
my %saveable_parameters = ('srchby' => 'scalar', |
|
'srchin' => 'scalar', |
|
'srchtype' => 'scalar', |
|
); |
|
&Apache::loncommon::store_settings('user','user_picker', |
|
\%saveable_parameters); |
|
&Apache::loncommon::restore_settings('user','user_picker', |
|
\%saveable_parameters); |
|
} |
|
|
#-------------------------------------------------- functions for &phase_two |
#-------------------------------------------------- functions for &phase_two |
sub user_search_result { |
sub user_search_result { |
my ($srch) = @_; |
my ($srch) = @_; |