version 1.88, 2007/09/12 03:40:29
|
version 1.90, 2008/03/11 01:45:47
|
Line 447 sub make_new_child {
|
Line 447 sub make_new_child {
|
($arg2 =~ /\%\%/)) { |
($arg2 =~ /\%\%/)) { |
($srchby,$srchtype) = |
($srchby,$srchtype) = |
map {&unescape($_);} (split(/\%\%/,$arg2)); |
map {&unescape($_);} (split(/\%\%/,$arg2)); |
my $srchterm = &unescape($arg3); |
$srchterm = &unescape($arg3); |
} else { |
} else { |
($srchby,$srchtype,$srchterm) = |
($srchby,$srchtype,$srchterm) = |
map {&unescape($_);} ($arg1,$arg2,$arg3); |
map {&unescape($_);} ($arg1,$arg2,$arg3); |
Line 456 sub make_new_child {
|
Line 456 sub make_new_child {
|
$srchtype,$srchterm); |
$srchtype,$srchterm); |
} elsif ($query eq 'instdirsearch') { |
} elsif ($query eq 'instdirsearch') { |
$result = &do_inst_dir_search($searchdomain,$arg1,$arg2,$arg3); |
$result = &do_inst_dir_search($searchdomain,$arg1,$arg2,$arg3); |
|
} elsif ($query eq 'getinstuser') { |
|
$result = &get_inst_user($searchdomain,$arg1,$arg2); |
} 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 588 sub do_inst_dir_search {
|
Line 590 sub do_inst_dir_search {
|
} |
} |
} |
} |
$response=~s/\&$//; |
$response=~s/\&$//; |
|
} else { |
|
$response = 'unavailable'; |
|
} |
|
return $response; |
|
} |
|
|
|
sub get_inst_user { |
|
my ($domain,$uname,$id) = @_; |
|
$uname = &unescape($uname); |
|
$id = &unescape($id); |
|
my (%instusers,%instids,$result,$response); |
|
eval { |
|
local($SIG{__DIE__})='DEFAULT'; |
|
$result=&localenroll::get_userinfo($domain,$uname,$id,\%instusers, |
|
\%instids); |
|
}; |
|
if ($result eq 'ok') { |
|
if (keys(%instusers) > 0) { |
|
foreach my $key (keys(%instusers)) { |
|
my $usrstr = &Apache::lonnet::freeze_escape($instusers{$key}); |
|
$response .= &escape(&escape($key).'='.$usrstr).'&'; |
|
} |
|
} |
|
$response=~s/\&$//; |
} else { |
} else { |
$response = 'unavailable'; |
$response = 'unavailable'; |
} |
} |