version 1.1496, 2022/10/19 00:03:11
|
version 1.1497, 2022/10/22 17:24:55
|
Line 12485 sub count_supptools {
|
Line 12485 sub count_supptools {
|
} |
} |
|
|
sub has_unhidden_suppfiles { |
sub has_unhidden_suppfiles { |
my ($cnum,$cdom,$ignorecache)=@_; |
my ($cnum,$cdom,$ignorecache,$possdell)=@_; |
my $hashid=$cnum.':'.$cdom; |
my $hashid=$cnum.':'.$cdom; |
my ($showsupp,$cached); |
my ($showsupp,$cached); |
unless ($ignorecache) { |
unless ($ignorecache) { |
Line 12494 sub has_unhidden_suppfiles {
|
Line 12494 sub has_unhidden_suppfiles {
|
unless (defined($cached)) { |
unless (defined($cached)) { |
my $chome=&homeserver($cnum,$cdom); |
my $chome=&homeserver($cnum,$cdom); |
unless ($chome eq 'no_host') { |
unless ($chome eq 'no_host') { |
my ($supplemental) = &get_supplemental($cnum,$cdom,$ignorecache); |
my ($supplemental) = &get_supplemental($cnum,$cdom,$ignorecache,$possdel); |
if (ref($supplemental) eq 'HASH') { |
if (ref($supplemental) eq 'HASH') { |
if ((ref($supplemental->{'ids'}) eq 'HASH') && (ref($supplemental->{'hidden'}) eq 'HASH')) { |
if ((ref($supplemental->{'ids'}) eq 'HASH') && (ref($supplemental->{'hidden'}) eq 'HASH')) { |
foreach my $key (keys(%{$supplemental->{'ids'}})) { |
foreach my $key (keys(%{$supplemental->{'ids'}})) { |
Line 13710 sub devalidate_suppchange_cache {
|
Line 13710 sub devalidate_suppchange_cache {
|
&devalidate_cache_new('suppchange',$hashid); |
&devalidate_cache_new('suppchange',$hashid); |
} |
} |
|
|
|
sub update_supp_caches { |
|
my ($cdom,$cnum) = @_; |
|
my %servers = &internet_dom_servers($cdom); |
|
my @ids=¤t_machine_ids(); |
|
foreach my $server (keys(%servers)) { |
|
next if (grep(/^\Q$server\E$/,@ids)); |
|
my $hashid=$cnum.':'.$cdom; |
|
my $cachekey = &escape('showsupp').':'.&escape($hashid); |
|
&remote_devalidate_cache($server,[$cachekey]); |
|
} |
|
&has_unhidden_suppfiles($cnum,$cdom,1,1); |
|
&count_supptools($cnum,$cdom,1); |
|
my $now = time; |
|
if ($env{'request.course.id'} eq $cdom.'_'.$cnum) { |
|
&Apache::lonnet::appenv({'request.course.suppupdated' => $now}); |
|
} |
|
&put('environment',{'internal.supplementalchange' => $now}, |
|
$cdom,$cnum); |
|
&Apache::lonnet::appenv( |
|
{'course.'.$cdom.'_'.$cnum.'.internal.supplementalchange' => $now}); |
|
&do_cache_new('suppchange',$cdom.'_'.$cnum,$now,600); |
|
} |
|
|
# ------------------------------------------------- Update symbolic store links |
# ------------------------------------------------- Update symbolic store links |
|
|
sub symblist { |
sub symblist { |