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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Thu, 07 Feb 2008 01:43:21 -0000


raeburn		Wed Feb  6 20:43:21 2008 EDT

  Modified files:              
    /loncom/automation	batchcreatecourse.pm 
  Log:
  - courseIDs include the domain, but $LONCAPA::match_courseid is a regexp for just the cnum part, so validation of the new courseID was failing.
  
  
Index: loncom/automation/batchcreatecourse.pm
diff -u loncom/automation/batchcreatecourse.pm:1.24 loncom/automation/batchcreatecourse.pm:1.25
--- loncom/automation/batchcreatecourse.pm:1.24	Mon Sep  3 11:34:16 2007
+++ loncom/automation/batchcreatecourse.pm	Wed Feb  6 20:43:21 2008
@@ -1,5 +1,5 @@
 #
-# $Id: batchcreatecourse.pm,v 1.24 2007/09/03 15:34:16 raeburn Exp $
+# $Id: batchcreatecourse.pm,v 1.25 2008/02/07 01:43:21 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -219,7 +219,7 @@
                 &parse_coursereqs($newcoursedir.'/'.$request, \%details);
                 foreach my $num (sort keys %details) {
                     my $courseid = &build_course($dom,$num,$context,\%details,\%longroles,\$logmsg,\$newusermsg,\$addresult,\%enrollcount,\$output,\$keysmsg);
-                    if ($courseid =~ /^$match_courseid$/) {
+                    if ($courseid =~m{^/$match_domain/$match_courseid}) {
                         $$courseids{$courseid} = $details{$num}{'class'};
                     }
                 }