[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /automation batchcreatecourse.pm

raeburn raeburn at source.lon-capa.org
Fri Jul 26 10:52:26 EDT 2019


raeburn		Fri Jul 26 14:52:26 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/automation	batchcreatecourse.pm 
  Log:
  - For 2.11
    Backport 1.43
  
  
Index: loncom/automation/batchcreatecourse.pm
diff -u loncom/automation/batchcreatecourse.pm:1.40.2.1 loncom/automation/batchcreatecourse.pm:1.40.2.2
--- loncom/automation/batchcreatecourse.pm:1.40.2.1	Thu Sep  1 01:05:05 2016
+++ loncom/automation/batchcreatecourse.pm	Fri Jul 26 14:52:26 2019
@@ -1,5 +1,5 @@
 #
-# $Id: batchcreatecourse.pm,v 1.40.2.1 2016/09/01 01:05:05 raeburn Exp $
+# $Id: batchcreatecourse.pm,v 1.40.2.2 2019/07/26 14:52:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -211,7 +211,7 @@
             $longroles{'Community'}{$1} = $3;
         }
     }
-    my ($logmsg,$keysmsg,$newusermsg,$addresult,%codehash);
+    my ($logmsg,$keysmsg,$newusermsg,$addresult,%codehash,%instcodes);
     my %enrollcount = ();
     my $newcoursedir = LONCAPA::tempdir().'/addcourse/'.$dom.'/'.$context;
     if ($context eq 'auto') {
@@ -239,12 +239,15 @@
                         if ($code) {
                             $codehash{$courseid} = $code;
                         }
+                        if ($details{$num}{'coursecode'} ne '') {
+                            push(@{$instcodes{$details{$num}{'coursecode'}}},$courseid);
+                        }
                     }
                 }
             }
         }
     }
-    return ($output,$logmsg,$keysmsg,\%codehash);
+    return ($output,$logmsg,$keysmsg,\%codehash,\%instcodes);
 }
 
 #############################################################




More information about the LON-CAPA-cvs mailing list