--- loncom/interface/domainprefs.pm 2019/08/25 14:15:20 1.367 +++ loncom/interface/domainprefs.pm 2019/10/15 03:26:00 1.368 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.367 2019/08/25 14:15:20 raeburn Exp $ +# $Id: domainprefs.pm,v 1.368 2019/10/15 03:26:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -14565,7 +14565,7 @@ sub modify_passwords { if ($current{'resetlink'} ne $linklife) { $changes{'reset'} = 1; } - } elsif (!exists($domconfig{passwords})) { + } elsif (!ref($domconfig{passwords}) eq 'HASH') { if ($staticdefaults{'resetlink'} ne $linklife) { $changes{'reset'} = 1; } @@ -14586,7 +14586,7 @@ sub modify_passwords { if (@diffs > 0) { $changes{'reset'} = 1; } - } elsif (!exists($domconfig{passwords})) { + } elsif (!ref($domconfig{passwords}) eq 'HASH') { my @diffs = &Apache::loncommon::compare_arrays($staticdefaults{'resetcase'},\@casesens); if (@diffs > 0) { $changes{'reset'} = 1; @@ -14598,7 +14598,7 @@ sub modify_passwords { if ($current{'resetprelink'} ne $newvalues{'resetprelink'}) { $changes{'reset'} = 1; } - } elsif (!exists($domconfig{passwords})) { + } elsif (!ref($domconfig{passwords}) eq 'HASH') { if ($staticdefaults{'resetprelink'} ne $newvalues{'resetprelink'}) { $changes{'reset'} = 1; } @@ -14625,7 +14625,7 @@ sub modify_passwords { } else { $changes{'reset'} = 1; } - } elsif (!exists($domconfig{passwords})) { + } elsif (!ref($domconfig{passwords}) eq 'HASH') { my @diffs = &Apache::loncommon::compare_arrays($staticdefaults{'resetpostlink'}{$type},\@postlink); if (@diffs > 0) { $changes{'reset'} = 1; @@ -14647,7 +14647,7 @@ sub modify_passwords { if (@diffs > 0) { $changes{'reset'} = 1; } - } elsif (!exists($domconfig{passwords})) { + } elsif (!ref($domconfig{passwords}) eq 'HASH') { my @diffs = &Apache::loncommon::compare_arrays($staticdefaults{'resetemail'},\@resetemail); if (@diffs > 0) { $changes{'reset'} = 1; @@ -14806,7 +14806,7 @@ sub modify_passwords { } } } - } elsif (!exists($domconfig{passwords})) { + } elsif (!(ref($domconfig{passwords}) eq 'HASH')) { foreach my $item ('by','for') { if (@{$crsownerchg{$item}} > 0) { $changes{'crsownerchg'} = 1; @@ -16116,6 +16116,8 @@ sub process_captcha { } elsif (!defined($changes->{'cancreate'})) { $changes->{'cancreate'} = ['captcha']; } + } elsif ($container eq 'passwords') { + $changes->{'reset'} = 1; } else { $changes->{'captcha'} = 1; } @@ -16160,6 +16162,8 @@ sub process_captcha { } elsif (!defined($changes->{'cancreate'})) { $changes->{'cancreate'} = ['recaptchaversion']; } + } elsif ($container eq 'passwords') { + $changes->{'reset'} = 1; } else { $changes->{'recaptchaversion'} = 1; } @@ -16171,6 +16175,8 @@ sub process_captcha { } elsif (!defined($changes->{'cancreate'})) { $changes->{'cancreate'} = ['recaptchakeys']; } + } elsif ($container eq 'passwords') { + $changes->{'reset'} = 1; } else { $changes->{'recaptchakeys'} = 1; }