--- loncom/interface/lonpopulate.pm 2005/10/04 18:27:32 1.27 +++ loncom/interface/lonpopulate.pm 2005/11/04 15:03:29 1.28 @@ -1,5 +1,5 @@ # automated enrollment configuration handler -# $Id: lonpopulate.pm,v 1.27 2005/10/04 18:27:32 albertel Exp $ +# $Id: lonpopulate.pm,v 1.28 2005/11/04 15:03:29 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -485,15 +485,9 @@ ENDTWO ENDTWO } elsif ($action eq "notify") { - my @notified = (); - if ($enrollvar{notifylist} =~ m/,/) { - @notified = split/,/,$enrollvar{notifylist}; - } else { - @notified = $enrollvar{notifylist}; - } - my $notifycount = 0; + my @notified = split(/,/,$enrollvar{notifylist}); foreach (@notified) { - unless ($_ eq '') { $notifycount ++; } + unless ($_ eq '') { $notifycount ++; } } my $noteset = ''; if ($notifycount) { @@ -572,7 +566,7 @@ ENDTWO $notifystate{$viewer} = 0; } - my $notifyshow = @ccs; + my $notifyshow = join(' ',@ccs); if (@ccs > 0) { @ccs = sort @ccs; @@ -638,13 +632,11 @@ ENDTWO "); } elsif ($action eq "crosslist") { - my @xlists = (); - if ($enrollvar{crosslistings} =~ m/,/) { - @xlists = split/,/,$enrollvar{crosslistings}; - } elsif ($enrollvar{crosslistings} ne '') { - $xlists[0] = $enrollvar{crosslistings}; + my @xlists; + if ($enrollvar{crosslistings} ne '') { + @xlists = split(/,/,$enrollvar{crosslistings}); } - my $cross_str = @xlists; + my $cross_str = join(' ',@xlists); $r->print("