version 1.27, 2021/11/24 04:25:03
|
version 1.29, 2022/02/01 19:54:36
|
Line 495 sub handler {
|
Line 495 sub handler {
|
if ($sourcecrs ne '') { |
if ($sourcecrs ne '') { |
%consumers = &Apache::lonnet::get_dom('lticonsumers',[$sourcecrs],$cdom); |
%consumers = &Apache::lonnet::get_dom('lticonsumers',[$sourcecrs],$cdom); |
if (exists($consumers{$sourcecrs})) { |
if (exists($consumers{$sourcecrs})) { |
if ($consumers{$sourcecrs} =~ /^$match_courseid$/) { |
if ($consumers{$sourcecrs} =~ /^\Q$itemid:\E($match_courseid)$/) { |
my $crshome = &Apache::lonnet::homeserver($consumers{$sourcecrs},$cdom); |
my $storedcnum = $1; |
|
my $crshome = &Apache::lonnet::homeserver($storedcnum,$cdom); |
if ($crshome =~ /(con_lost|no_host|no_such_host)/) { |
if ($crshome =~ /(con_lost|no_host|no_such_host)/) { |
&invalid_request($r,20); |
&invalid_request($r,20); |
return OK; |
return OK; |
} else { |
} else { |
$posscnum = $consumers{$sourcecrs}; |
$posscnum = $storedcnum; |
} |
} |
} |
} |
} |
} |
Line 777 sub handler {
|
Line 778 sub handler {
|
($consumers{$sourcecrs} eq '') && ($cnum ne '')) { |
($consumers{$sourcecrs} eq '') && ($cnum ne '')) { |
if (ref($lti{$itemid}{'mapcrstype'}) eq 'ARRAY') { |
if (ref($lti{$itemid}{'mapcrstype'}) eq 'ARRAY') { |
if (grep(/^$crstype$/,@{$lti{$itemid}{'mapcrstype'}})) { |
if (grep(/^$crstype$/,@{$lti{$itemid}{'mapcrstype'}})) { |
&Apache::lonnet::put_dom('lticonsumers',{ $sourcecrs => $cnum },$cdom); |
&Apache::lonnet::put_dom('lticonsumers',{ $sourcecrs => $itemid.':'.$cnum },$cdom); |
} |
} |
} |
} |
} |
} |