[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm

raeburn raeburn at source.lon-capa.org
Sun Jan 16 11:50:40 EST 2022


raeburn		Sun Jan 16 16:50:40 2022 EDT

  Modified files:              
    /loncom/interface	courseprefs.pm 
  Log:
  - Existing co-owners retained when updating General course settings. 
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.95 loncom/interface/courseprefs.pm:1.96
--- loncom/interface/courseprefs.pm:1.95	Fri Dec 24 11:07:42 2021
+++ loncom/interface/courseprefs.pm	Sun Jan 16 16:50:40 2022
@@ -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 @@
                                         $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 @@
                                     if ($pendingcoowners ne '') {
                                         @newpending = @pendingcoown;
                                     }
+                                } else {
+                                    @newcoown = @currcoown;
                                 }
                                 $newvalues{'pendingco-owners'} = join(',',sort(@newpending));
                                 $newvalues{'co-owners'} = join(',',sort(@newcoown));




More information about the LON-CAPA-cvs mailing list