--- loncom/interface/loncoursegroups.pm 2006/07/04 20:50:52 1.37 +++ loncom/interface/loncoursegroups.pm 2006/07/05 00:12:37 1.38 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursegroups.pm,v 1.37 2006/07/04 20:50:52 raeburn Exp $ +# $Id: loncoursegroups.pm,v 1.38 2006/07/05 00:12:37 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3140,17 +3140,6 @@ sub process_membership { my $start = $startdate; my $end = $enddate; if ($state eq 'memresult') { - if ($curr_privs{$user} eq $group_privs{$user}) { - push(@unchanged,$user); - next; - } - if (exists($curr_start{$user})) { - $start = $curr_start{$user}; - } - if (exists($curr_end{$user})) { - $end = $curr_end{$user}; - } - $type = 'modified'; if (@activate > 0) { if (grep/^$user$/,@activate) { $start = $now; @@ -3165,6 +3154,19 @@ sub process_membership { $type = 'reenabled'; } } + if ($type eq '') { + if ($curr_privs{$user} eq $group_privs{$user}) { + push(@unchanged,$user); + next; + } + if (exists($curr_start{$user})) { + $start = $curr_start{$user}; + } + if (exists($curr_end{$user})) { + $end = $curr_end{$user}; + } + $type = 'modified'; + } } else { $type = 'added'; }