--- loncom/interface/courseprefs.pm 2021/12/24 11:07:42 1.95 +++ loncom/interface/courseprefs.pm 2022/01/16 16:50:40 1.96 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.95 2021/12/24 11:07:42 raeburn Exp $ +# $Id: courseprefs.pm,v 1.96 2022/01/16 16:50:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1164,7 +1164,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'); @@ -1209,6 +1211,8 @@ sub process_changes { if ($pendingcoowners ne '') { @newpending = @pendingcoown; } + } else { + @newcoown = @currcoown; } $newvalues{'pendingco-owners'} = join(',',sort(@newpending)); $newvalues{'co-owners'} = join(',',sort(@newcoown));