--- loncom/interface/courseprefs.pm 2021/12/29 23:15:54 1.49.2.28.2.1 +++ loncom/interface/courseprefs.pm 2022/01/16 23:34:19 1.49.2.28.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.49.2.28.2.1 2021/12/29 23:15:54 raeburn Exp $ +# $Id: courseprefs.pm,v 1.49.2.28.2.2 2022/01/16 23:34:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1146,7 +1146,9 @@ sub process_changes { $autocoowner = $domconf{'autoenroll'}{'co-owners'}; } } - unless ($autocoowner) { + if ($autocoowner) { + $newvalues{'co-owners'} = $values->{'internal.co-owners'}; + } else { my @keepcoowners = &Apache::loncommon::get_env_multiple('form.coowners'); my @pendingcoowners = &Apache::loncommon::get_env_multiple('form.pendingcoowners'); my @invitecoowners = &Apache::loncommon::get_env_multiple('form.invitecoowners'); @@ -1191,6 +1193,8 @@ sub process_changes { if ($pendingcoowners ne '') { @newpending = @pendingcoown; } + } else { + @newcoown = @currcoown; } $newvalues{'pendingco-owners'} = join(',',sort(@newpending)); $newvalues{'co-owners'} = join(',',sort(@newcoown)); @@ -3579,7 +3583,7 @@ sub coowner_invitations { @pendingcoown = split(',',$pendingcoowners); } if (ref($currcoownref) eq 'ARRAY') { - @currcoown == @{$currcoownref}; + @currcoown = @{$currcoownref}; } my $disabled; if ($noedit) { @@ -3643,7 +3647,7 @@ sub manage_coownership { @pendingcoown = split(',',$pendingcoowners); } if (ref($currcoownref) eq 'ARRAY') { - @currcoown == @{$currcoownref}; + @currcoown = @{$currcoownref}; } my $disabled; if ($noedit) {