version 1.83, 2007/07/30 23:52:06
|
version 1.84, 2007/08/08 22:24:36
|
Line 387 sub make_new_child {
|
Line 387 sub make_new_child {
|
print $client "$queryid\n"; |
print $client "$queryid\n"; |
# |
# |
# &logthis("QUERY: $query - $arg1 - $arg2 - $arg3 - $queryid"); |
# &logthis("QUERY: $query - $arg1 - $arg2 - $arg3 - $queryid"); |
sleep 1; |
# sleep 1; |
# |
# |
my $result=''; |
my $result=''; |
# |
# |
Line 492 sub make_new_child {
|
Line 492 sub make_new_child {
|
'WARNING: Could not retrieve from database:'. |
'WARNING: Could not retrieve from database:'. |
$sth->errstr().'</font>'); |
$sth->errstr().'</font>'); |
} |
} |
|
} elsif ($query eq 'instdirsearch') { |
|
$result = &do_inst_dir_search($searchdomain,$arg1,$arg2,$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 543 sub make_new_child {
|
Line 545 sub make_new_child {
|
} |
} |
} |
} |
|
|
|
sub do_inst_dir_search { |
|
my ($domain,$srchby,$srchterm,$srchtype) = @_; |
|
$srchby = &unescape($srchby); |
|
$srchterm = &unescape($srchterm); |
|
$srchtype = &unescape($srchtype); |
|
my (%instusers,%instids,$result,$response); |
|
eval { |
|
local($SIG{__DIE__})='DEFAULT'; |
|
$result=&localenroll::get_userinfo($domain,undef,undef,\%instusers, |
|
\%instids,undef,$srchby,$srchterm, |
|
$srchtype); |
|
}; |
|
if ($result eq 'ok') { |
|
if (%instusers) { |
|
foreach my $key (keys(%instusers)) { |
|
my $usrstr = &Apache::lonnet::freeze_escape($instusers{$key}); |
|
$response .=&escape(&escape($key).'='.$usrstr).'&'; |
|
} |
|
} |
|
$response=~s/\&$//; |
|
} |
|
return $response; |
|
} |
|
|
######################################################## |
######################################################## |
######################################################## |
######################################################## |
|
|