version 1.426, 2023/06/03 19:26:31
|
version 1.427, 2023/06/20 14:03:52
|
Line 568 sub handler {
|
Line 568 sub handler {
|
modify => \&modify_selfenrollment, |
modify => \&modify_selfenrollment, |
}, |
}, |
'privacy' => |
'privacy' => |
{text => 'Availability of User Information', |
{text => 'Role assignments and user privacy', |
help => 'Domain_Configuration_User_Privacy', |
help => 'Domain_Configuration_User_Privacy', |
header => [{col1 => 'Role assigned in different domain', |
header => [{col1 => 'Role assigned in different domain', |
col2 => 'Approval options'}, |
col2 => 'Approval options'}, |
Line 882 sub process_changes {
|
Line 882 sub process_changes {
|
} elsif ($action eq 'lti') { |
} elsif ($action eq 'lti') { |
$output = &modify_lti($r,$dom,$action,$lastactref,%domconfig); |
$output = &modify_lti($r,$dom,$action,$lastactref,%domconfig); |
} elsif ($action eq 'privacy') { |
} elsif ($action eq 'privacy') { |
$output = &modify_privacy($dom,%domconfig); |
$output = &modify_privacy($dom,$lastactref,%domconfig); |
} elsif ($action eq 'passwords') { |
} elsif ($action eq 'passwords') { |
$output = &modify_passwords($r,$dom,$confname,$lastactref,%domconfig); |
$output = &modify_passwords($r,$dom,$confname,$lastactref,%domconfig); |
} elsif ($action eq 'wafproxy') { |
} elsif ($action eq 'wafproxy') { |
Line 17096 sub modify_contacts {
|
Line 17096 sub modify_contacts {
|
} |
} |
|
|
sub modify_privacy { |
sub modify_privacy { |
my ($dom,%domconfig) = @_; |
my ($dom,$lastactref,%domconfig) = @_; |
my ($resulttext,%current,%changes); |
my ($resulttext,%current,%changes); |
if (ref($domconfig{'privacy'}) eq 'HASH') { |
if (ref($domconfig{'privacy'}) eq 'HASH') { |
%current = %{$domconfig{'privacy'}}; |
%current = %{$domconfig{'privacy'}}; |
Line 17332 sub modify_privacy {
|
Line 17332 sub modify_privacy {
|
} |
} |
} |
} |
$resulttext .= '</ul>'; |
$resulttext .= '</ul>'; |
|
if ($changes{'approval'}) { |
|
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); |
|
delete($domdefaults{'userapprovals'}); |
|
if (ref($privacyhash{'approval'}) eq 'HASH') { |
|
foreach my $domtype ('instdom','extdom') { |
|
if (ref($privacyhash{'approval'}{$domtype}) eq 'HASH') { |
|
foreach my $roletype ('domain','author','course','community') { |
|
if ($privacyhash{'approval'}{$domtype}{$roletype} eq 'user') { |
|
$domdefaults{'userapprovals'} = 1; |
|
last; |
|
} |
|
} |
|
} |
|
last if ($domdefaults{'userapprovals'}); |
|
} |
|
} |
|
my $cachetime = 24*60*60; |
|
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime); |
|
if (ref($lastactref) eq 'HASH') { |
|
$lastactref->{'domdefaults'} = 1; |
|
} |
|
} |
} else { |
} else { |
$resulttext = &mt('No changes made to user information settings'); |
$resulttext = &mt('No changes made to user information settings'); |
} |
} |