--- loncom/lonnet/perl/lonnet.pm 2025/01/05 21:53:43 1.1533 +++ loncom/lonnet/perl/lonnet.pm 2025/02/07 02:06:07 1.1535 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1533 2025/01/05 21:53:43 raeburn Exp $ +# $Id: lonnet.pm,v 1.1535 2025/02/07 02:06:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3019,6 +3019,9 @@ sub get_domain_defaults { last if ($domdefaults{'userapprovals'}); } } + if (ref($domconfig{'privacy'}{'othdom'}) eq 'HASH') { + $domdefaults{'privacyothdom'} = $domconfig{'privacy'}{'othdom'}; + } } &do_cache_new('domdefaults',$domain,\%domdefaults,$cachetime); return %domdefaults; @@ -7524,6 +7527,27 @@ sub set_adhoc_privileges { if (&allowed('adv') eq 'F') { $tadv=1; } &appenv({'request.role.adv' => $tadv}); } + if ($role eq 'ca') { + my @ca_settings = ('authoreditors','coauthorlist'); + my %info = &userenvironment($dcdom,$pickedcourse,@ca_settings); + foreach my $item (@ca_settings) { + if (exists($info{$item})) { + my $name = $item; + if ($item eq 'authoreditors') { + $name = 'editors'; + unless ($info{'authoreditors'}) { + my %domdefs = &get_domain_defaults($dcdom); + if ($domdefs{$name} ne '') { + $info{'authoreditors'} = $domdefs{$name}; + } else { + $info{'authoreditors'} = 'edit,xml'; + } + } + } + &appenv({"environment.internal.$name./$dcdom/$pickedcourse" => $info{$item}}); + } + } + } } # --------------------------------------------------------------- get interface