version 1.13, 2005/04/07 06:56:21
|
version 1.19, 2006/05/17 14:48:49
|
Line 50
|
Line 50
|
if (! &localenroll::run($dom)) { next; } |
if (! &localenroll::run($dom)) { next; } |
$env{'user.domain'} = $dom; |
$env{'user.domain'} = $dom; |
# Determine the courses |
# Determine the courses |
my %courses = &Apache::lonnet::courseiddump($dom,'.',1,'.','.',1,\@hostids); |
my %courses = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.',1,\@hostids); |
my %affiliates = (); |
my %affiliates = (); |
my %enrollvar = (); |
my %enrollvar = (); |
my %reply = (); |
my %reply = (); |
Line 105
|
Line 105
|
} |
} |
} |
} |
foreach my $xlist (@crosslistings) { |
foreach my $xlist (@crosslistings) { |
if ($xlist =~ m/^(\w+):(\w*)$/) { |
if ($xlist =~ m/^([^:]+):(\w*)$/) { |
my $course_id = $1; |
my $course_id = $1; |
my $gp = $2; |
my $gp = $2; |
if (!grep/^$course_id$/,@{$affiliates{$crs}}) { |
if (!grep/^$course_id$/,@{$affiliates{$crs}}) { |
Line 153
|
Line 153
|
$to_notify[0] = $enrollvar{$crs}{notifylist}; |
$to_notify[0] = $enrollvar{$crs}{notifylist}; |
} |
} |
foreach my $cc (@to_notify) { |
foreach my $cc (@to_notify) { |
my ($ccname,$ccdom) = split/@/,$cc; |
my ($ccname,$ccdom); |
|
if ($cc =~ /:/) { |
|
($ccname,$ccdom) = split(/:/,$cc); |
|
} elsif ($cc =~ /\@/) { |
|
($ccname,$ccdom) = split(/\@/,$cc); |
|
} |
my $status = &Apache::lonmsg::user_normal_msg($ccname,$ccdom,$subject,$message); |
my $status = &Apache::lonmsg::user_normal_msg($ccname,$ccdom,$subject,$message); |
} |
} |
if ( ($enrollvar{$crs}{notifylist} eq '') && ($newusermsg ne '') ) { |
if ( ($enrollvar{$crs}{notifylist} eq '') && ($newusermsg ne '') ) { |