version 1.443, 2010/06/10 19:21:32
|
version 1.446.2.1, 2010/11/13 02:21:06
|
Line 3127 sub dump_with_regexp {
|
Line 3127 sub dump_with_regexp {
|
my $count=0; |
my $count=0; |
while (my ($key,$value) = each(%$hashref)) { |
while (my ($key,$value) = each(%$hashref)) { |
if ($namespace eq 'roles') { |
if ($namespace eq 'roles') { |
if ($key =~ /^($LONCAPA::match_domain)_($LONCAPA::match_community)_(cc|co|in|ta|ep|ad|st|cr)/) { |
if ($key =~ m{^/($LONCAPA::match_domain)/($LONCAPA::match_community)_(cc|co|in|ta|ep|ad|st|cr)}) { |
if ($clientversion =~ /^(\d+)\.(\d+)$/) { |
my $cdom = $1; |
|
my $cnum = $2; |
|
if ($clientversion =~ /^['"]?(\d+)\.(\d+)[.\d\-]+['"]?$/) { |
my $major = $1; |
my $major = $1; |
my $minor = $2; |
my $minor = $2; |
next if (($major < 2) || (($major == 2) && ($minor < 9))); |
next if (($major < 2) || (($major == 2) && ($minor < 9))); |
|
} else { |
|
my $homeserver = &Apache::lonnet::homeserver($cnum,$cdom); |
|
next unless ($currenthostid eq $homeserver); |
} |
} |
} |
} |
} |
} |
Line 3728 sub put_course_id_hash_handler {
|
Line 3733 sub put_course_id_hash_handler {
|
# createdafter - include courses for which creation date followed this date. |
# createdafter - include courses for which creation date followed this date. |
# creationcontext - include courses created in specified context |
# creationcontext - include courses created in specified context |
# |
# |
|
# domcloner - flag to indicate if user can create CCs in course's domain. |
|
# If so, ability to clone course is automatic. |
|
# |
# $client - The socket open on the client. |
# $client - The socket open on the client. |
# Returns: |
# Returns: |
# 1 - Continue processing. |
# 1 - Continue processing. |
Line 3740 sub dump_course_id_handler {
|
Line 3748 sub dump_course_id_handler {
|
my ($udom,$since,$description,$instcodefilter,$ownerfilter,$coursefilter, |
my ($udom,$since,$description,$instcodefilter,$ownerfilter,$coursefilter, |
$typefilter,$regexp_ok,$rtn_as_hash,$selfenrollonly,$catfilter,$showhidden, |
$typefilter,$regexp_ok,$rtn_as_hash,$selfenrollonly,$catfilter,$showhidden, |
$caller,$cloner,$cc_clone_list,$cloneonly,$createdbefore,$createdafter, |
$caller,$cloner,$cc_clone_list,$cloneonly,$createdbefore,$createdafter, |
$creationcontext) =split(/:/,$tail); |
$creationcontext,$domcloner) =split(/:/,$tail); |
my $now = time; |
my $now = time; |
my ($cloneruname,$clonerudom,%cc_clone); |
my ($cloneruname,$clonerudom,%cc_clone); |
if (defined($description)) { |
if (defined($description)) { |
Line 3813 sub dump_course_id_handler {
|
Line 3821 sub dump_course_id_handler {
|
} else { |
} else { |
$creationcontext = '.'; |
$creationcontext = '.'; |
} |
} |
|
|
my $unpack = 1; |
my $unpack = 1; |
if ($description eq '.' && $instcodefilter eq '.' && $coursefilter eq '.' && |
if ($description eq '.' && $instcodefilter eq '.' && $coursefilter eq '.' && |
$typefilter eq '.') { |
$typefilter eq '.') { |
Line 3844 sub dump_course_id_handler {
|
Line 3851 sub dump_course_id_handler {
|
next if ($since > 1); |
next if ($since > 1); |
} |
} |
$is_hash = 1; |
$is_hash = 1; |
if (defined($clonerudom)) { |
if ($domcloner) { |
|
$canclone = 1; |
|
} elsif (defined($clonerudom)) { |
if ($items->{'cloners'}) { |
if ($items->{'cloners'}) { |
my @cloneable = split(',',$items->{'cloners'}); |
my @cloneable = split(',',$items->{'cloners'}); |
if (@cloneable) { |
if (@cloneable) { |
Line 3877 sub dump_course_id_handler {
|
Line 3886 sub dump_course_id_handler {
|
if ($items->{'owner'} eq $cloner) { |
if ($items->{'owner'} eq $cloner) { |
$canclone = 1; |
$canclone = 1; |
} |
} |
} elsif ($cloner eq $udom.':'.$items->{'owner'}) { |
} elsif ($cloner eq $items->{'owner'}.':'.$udom) { |
$canclone = 1; |
$canclone = 1; |
} |
} |
if ($canclone) { |
if ($canclone) { |
Line 6301 sub make_new_child {
|
Line 6310 sub make_new_child {
|
or die "Can't unblock SIGINT for fork: $!\n"; |
or die "Can't unblock SIGINT for fork: $!\n"; |
$children{$pid} = $clientip; |
$children{$pid} = $clientip; |
&status('Started child '.$pid); |
&status('Started child '.$pid); |
|
close($client); |
return; |
return; |
} else { |
} else { |
# Child can *not* return from this subroutine. |
# Child can *not* return from this subroutine. |