version 1.9, 2016/07/25 19:49:45
|
version 1.11, 2018/08/09 14:04:30
|
Line 783 sub dump_profile_database {
|
Line 783 sub dump_profile_database {
|
return $qresult; |
return $qresult; |
} |
} |
|
|
|
sub is_course { |
|
my ($cdom,$cnum) = @_; |
|
|
|
return unless (($cdom =~ /^$LONCAPA::match_domain$/) && |
|
($cnum =~ /^$LONCAPA::match_courseid$/)); |
|
my $hashid = $cdom.':'.$cnum; |
|
my ($iscourse,$cached) = |
|
&Apache::lonnet::is_cached_new('iscourse',$hashid); |
|
unless (defined($cached)) { |
|
my $hashref = |
|
&tie_domain_hash($cdom, "nohist_courseids", &GDBM_WRCREAT()); |
|
if (ref($hashref) eq 'HASH') { |
|
my $esc_key = &escape($cdom.'_'.$cnum); |
|
if (exists($hashref->{$esc_key})) { |
|
$iscourse = 1; |
|
} else { |
|
$iscourse = 0; |
|
} |
|
&Apache::lonnet::do_cache_new('iscourse',$hashid,$iscourse,3600); |
|
unless (&untie_domain_hash($hashref)) { |
|
&logthis("Failed to untie tied hash for nohist_courseids.db for $cdom"); |
|
} |
|
} else { |
|
&logthis("Failed to tie hash for nohist_courseids.db for $cdom"); |
|
} |
|
} |
|
return $iscourse; |
|
} |
|
|
sub server_certs { |
sub server_certs { |
my ($perlvar) = @_; |
my ($perlvar) = @_; |
my %pemfiles = ( |
my %pemfiles = ( |
Line 852 sub server_certs {
|
Line 881 sub server_certs {
|
if ($md5hash{$key}) { |
if ($md5hash{$key}) { |
if ($md5hash{$key} eq $md5hash{'key'}) { |
if ($md5hash{$key} eq $md5hash{'key'}) { |
$info{$key}{'status'} = 'ok'; |
$info{$key}{'status'} = 'ok'; |
|
} elsif ($info{'key'}{'status'} =~ /ok/) { |
|
$info{$key}{'status'} = 'otherkey'; |
|
} else { |
|
$info{$key}{'status'} = 'nokey'; |
} |
} |
} |
} |
} |
} |