--- loncom/enrollment/Autoenroll.pl 2006/05/16 21:55:56 1.18 +++ loncom/enrollment/Autoenroll.pl 2006/07/21 17:47:36 1.22 @@ -1,7 +1,7 @@ #!/usr/bin/perl # #Automated Enrollment script -# $Id: Autoenroll.pl,v 1.18 2006/05/16 21:55:56 raeburn Exp $ +# $Id: Autoenroll.pl,v 1.22 2006/07/21 17:47:36 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,6 +33,8 @@ use Apache::lonnet; use Apache::loncoursedata; use Apache::lonmsg; + use Apache::longroup; + use Apache::loncommon; use HTML::Entities; # Determine the library server's domain and hostID @@ -50,7 +52,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,'Course'); my %affiliates = (); my %enrollvar = (); my %reply = (); @@ -155,9 +157,9 @@ foreach my $cc (@to_notify) { my ($ccname,$ccdom); if ($cc =~ /:/) { - ($ccname,$ccdom) = split/:/,$cc; + ($ccname,$ccdom) = split(/:/,$cc); } elsif ($cc =~ /\@/) { - ($ccname,$ccdom) = split/\@/,$cc; + ($ccname,$ccdom) = split(/\@/,$cc); } my $status = &Apache::lonmsg::user_normal_msg($ccname,$ccdom,$subject,$message); }