--- loncom/enrollment/Autoenroll.pl 2005/04/07 06:56:21 1.13 +++ loncom/enrollment/Autoenroll.pl 2005/11/15 20:53:50 1.16 @@ -1,7 +1,7 @@ #!/usr/bin/perl # #Automated Enrollment script -# $Id: Autoenroll.pl,v 1.13 2005/04/07 06:56:21 albertel Exp $ +# $Id: Autoenroll.pl,v 1.16 2005/11/15 20:53:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -25,6 +25,9 @@ # # http://www.lon-capa.org/ # +BEGIN { + eval "use Apache2::compat();"; +}; use strict; use lib '/home/httpd/lib/perl'; use localenroll; @@ -50,7 +53,7 @@ if (! &localenroll::run($dom)) { next; } $env{'user.domain'} = $dom; # Determine the courses - my %courses = &Apache::lonnet::courseiddump($dom,'.',1,'.','.',1,\@hostids); + my %courses = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.',1,\@hostids); my %affiliates = (); my %enrollvar = (); my %reply = (); @@ -105,7 +108,7 @@ } } foreach my $xlist (@crosslistings) { - if ($xlist =~ m/^(\w+):(\w*)$/) { + if ($xlist =~ m/^([^:]+):(\w*)$/) { my $course_id = $1; my $gp = $2; if (!grep/^$course_id$/,@{$affiliates{$crs}}) {