--- loncom/interface/courseprefs.pm 2021/12/24 11:07:42 1.95 +++ loncom/interface/courseprefs.pm 2022/02/01 18:23:24 1.98 @@ -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.98 2022/02/01 18:23:24 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)); @@ -3806,7 +3810,7 @@ sub coowner_invitations { @pendingcoown = split(',',$pendingcoowners); } if (ref($currcoownref) eq 'ARRAY') { - @currcoown == @{$currcoownref}; + @currcoown = @{$currcoownref}; } my $disabled; if ($noedit) { @@ -3870,7 +3874,7 @@ sub manage_coownership { @pendingcoown = split(',',$pendingcoowners); } if (ref($currcoownref) eq 'ARRAY') { - @currcoown == @{$currcoownref}; + @currcoown = @{$currcoownref}; } my $disabled; if ($noedit) { @@ -5301,7 +5305,7 @@ sub print_linkprotection { ''. ''.$lt{'name'}. - ': '. + ': '. (' 'x2). ''.$lt{'version'}.': '."\n". @@ -5310,11 +5314,11 @@ sub print_linkprotection { 'value="'.$values{'lifetime'}.'" size="3"'.$disabled.' />'. '

'. ''.$lt{'key'}. - ': '. + ': '. (' 'x2). ''.$lt{'secret'}.':'. - ''. - ''. + ''. + ''. ''. ''; $itemcount ++; @@ -5324,20 +5328,20 @@ sub print_linkprotection { $css_class = $itemcount%2?' class="LC_odd_row"':''; $datatable .= ''."\n". ''."\n". - ''.&mt('Add').''."\n". + ''.&mt('Add').''."\n". ''. ''.$lt{'name'}. - ': '."\n". + ': '."\n". (' 'x2). - ''.$lt{'version'}.':'. ' '."\n". (' 'x2). - ''.$lt{'lifetime'}.': '."\n". + ''.$lt{'lifetime'}.': '."\n". '

'. - ''.$lt{'key'}.': '."\n". + ''.$lt{'key'}.': '."\n". (' 'x2). - ''.$lt{'secret'}.':'. - ' '."\n". + ''.$lt{'secret'}.':'. + ' '."\n". ''; $$rowtotal ++; return $datatable;;