version 1.93, 2013/12/01 21:29:07
|
version 1.94, 2015/08/05 18:47:12
|
Line 458 sub make_new_child {
|
Line 458 sub make_new_child {
|
$result = &do_inst_dir_search($searchdomain,$arg1,$arg2,$arg3); |
$result = &do_inst_dir_search($searchdomain,$arg1,$arg2,$arg3); |
} elsif ($query eq 'getinstuser') { |
} elsif ($query eq 'getinstuser') { |
$result = &get_inst_user($searchdomain,$arg1,$arg2); |
$result = &get_inst_user($searchdomain,$arg1,$arg2); |
|
} elsif ($query eq 'getmultinstusers') { |
|
$result = &get_multiple_instusers($searchdomain,$arg3); |
} elsif ($query eq 'prepare activity log') { |
} elsif ($query eq 'prepare activity log') { |
my ($cid,$domain) = map {&unescape($_);} ($arg1,$arg2); |
my ($cid,$domain) = map {&unescape($_);} ($arg1,$arg2); |
&logthis('preparing activity log tables for '.$cid); |
&logthis('preparing activity log tables for '.$cid); |
Line 619 sub get_inst_user {
|
Line 621 sub get_inst_user {
|
} |
} |
return $response; |
return $response; |
} |
} |
|
|
|
sub get_multiple_instusers { |
|
my ($domain,$data) = @_; |
|
my ($type,$users) = split(/=/,$data,2); |
|
my $requested = &Apache::lonnet::thaw_unescape($users); |
|
my $response; |
|
if (ref($requested) eq 'HASH') { |
|
my (%instusers,%instids,$result); |
|
eval { |
|
local($SIG{__DIE__})='DEFAULT'; |
|
$result=&localenroll::get_multusersinfo($domain,$type,$requested,\%instusers, |
|
\%instids); |
|
}; |
|
if ($@) { |
|
$response = 'error'; |
|
} elsif ($result eq 'ok') { |
|
if (keys(%instusers)) { |
|
$response = $result.':'.&Apache::lonnet::freeze_escape(\%instusers); |
|
} |
|
} else { |
|
$response = 'unavailable'; |
|
} |
|
} else { |
|
$response = 'invalid'; |
|
} |
|
return $response; |
|
} |
|
|
######################################################## |
######################################################## |
######################################################## |
######################################################## |