--- loncom/interface/loncreateuser.pm 2009/05/14 14:23:56 1.294 +++ loncom/interface/loncreateuser.pm 2009/05/18 16:08:07 1.295 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.294 2009/05/14 14:23:56 bisitz Exp $ +# $Id: loncreateuser.pm,v 1.295 2009/05/18 16:08:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5773,7 +5773,7 @@ sub update_selfenroll_config { } } else { my @differences = - &compare_arrays(\@currnotified,\@newnotified); + &Apache::loncommon::compare_arrays(\@currnotified,\@newnotified); if (@differences > 0) { if (@newnotified > 0) { $changes{'internal.selfenroll_notifylist'} = join(',',@newnotified); @@ -5783,7 +5783,7 @@ sub update_selfenroll_config { } } } else { - my @differences = &compare_arrays(\@currnotified,\@newnotified); + my @differences = &Apache::loncommon::compare_arrays(\@currnotified,\@newnotified); if (@differences > 0) { if (@newnotified > 0) { $changes{'internal.selfenroll_notifylist'} = join(',',@newnotified); @@ -5973,22 +5973,6 @@ sub update_selfenroll_config { return; } -sub compare_arrays { - my ($arrayref1,$arrayref2) = @_; - my (@difference,%count); - @difference = (); - %count = (); - if ((ref($arrayref1) eq 'ARRAY') && (ref($arrayref2) eq 'ARRAY')) { - foreach my $element (@{$arrayref1}, @{$arrayref2}) { $count{$element}++; } - foreach my $element (keys(%count)) { - if ($count{$element} == 1) { - push(@difference,$element); - } - } - } - return @difference; -} - sub get_selfenroll_titles { my @row = ('types','registered','enroll_dates','access_dates','section', 'approval','limit');