--- loncom/interface/lonselstudent.pm 2006/05/17 15:20:56 1.5 +++ loncom/interface/lonselstudent.pm 2006/05/17 15:22:32 1.6 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # lonselstudent.pm : Reusable subs for student selection. # -# $Id: lonselstudent.pm,v 1.5 2006/05/17 15:20:56 albertel Exp $ +# $Id: lonselstudent.pm,v 1.6 2006/05/17 15:22:32 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -113,26 +113,27 @@ sub get_people_in_class { - for (@keys) { + for my $user (@keys) { - if ( $classlist->{$_}->[$status] eq + if ( $classlist->{$user}->[$status] eq 'Active') { - push(@current_members, [$_, $classlist->{$_}->[$fullname], - $classlist->{$_}->[$section], - $classlist->{$_}->[$status], 'Student']); + push(@current_members, [$user, $classlist->{$user}->[$fullname], + $classlist->{$user}->[$section], + $classlist->{$user}->[$status], 'Student']); } else { # Need to figure out if this user is future or # Expired... If the start date is in the future # the user is future...else expired. my $now = time; - if ($classlist->{$_}->[$start_date] > $now) { - push(@future_members, [$_, $classlist->{$_}->[$fullname], - $classlist->{$_}->[$section], + if ($classlist->{$user}->[$start_date] > $now) { + push(@future_members, [$user, $classlist->{$user}->[$fullname], + $classlist->{$user}->[$section], "Future", "Student"]); } else { - push(@expired_members, [$_, $classlist->{$_}->[$fullname], - $classlist->{$_}->[$section], + push(@expired_members, [$user, + $classlist->{$user}->[$fullname], + $classlist->{$user}->[$section], "Expired", "Student"]); }