version 1.4, 2006/05/17 15:04:42
|
version 1.6, 2006/05/17 15:22:32
|
Line 71 sub get_people_in_class {
|
Line 71 sub get_people_in_class {
|
# Enumerate the course_personnel. |
# Enumerate the course_personnel. |
# |
# |
my @course_personnel; |
my @course_personnel; |
for (sort(keys(%coursepersonnel))) { |
for my $role (sort(keys(%coursepersonnel))) { |
for my $role (split(/,/, $coursepersonnel{$_})) { |
# extract the names so we can sort them |
# extract the names so we can sort them |
my @people; |
my @people; |
for my $person (split(/,/, $coursepersonnel{$role})) { |
|
my ($uname,$domain) = split(/:/, $person); |
for (split(/,/, $role)) { |
push(@people, [&Apache::loncommon::plainname($uname,$domain), |
push(@people, [split(/:/, $role)]); |
$uname,$domain]); |
} |
} |
|
@people = sort { $a->[0] cmp $b->[0] } (@people); |
@people = sort { $a->[0] cmp $b->[0] } (@people); |
|
|
|
for my $person (@people) { |
for my $person (@people) { |
push(@course_personnel, [join(':', @$person), $person->[0], '', $_]); |
push(@course_personnel, [join(':', $person->[1],$person->[2]), |
} |
$person->[0], '', '', $role]); |
} |
} |
} |
} |
# Students must be split into the three categories: |
# Students must be split into the three categories: |
Line 114 sub get_people_in_class {
|
Line 113 sub get_people_in_class {
|
|
|
|
|
|
|
for (@keys) { |
for my $user (@keys) { |
|
|
if ( $classlist->{$_}->[$status] eq |
if ( $classlist->{$user}->[$status] eq |
'Active') { |
'Active') { |
push(@current_members, [$_, $classlist->{$_}->[$fullname], |
push(@current_members, [$user, $classlist->{$user}->[$fullname], |
$classlist->{$_}->[$section], |
$classlist->{$user}->[$section], |
$classlist->{$_}->[$status], 'Student']); |
$classlist->{$user}->[$status], 'Student']); |
} else { |
} else { |
# Need to figure out if this user is future or |
# Need to figure out if this user is future or |
# Expired... If the start date is in the future |
# Expired... If the start date is in the future |
# the user is future...else expired. |
# the user is future...else expired. |
|
|
my $now = time; |
my $now = time; |
if ($classlist->{$_}->[$start_date] > $now) { |
if ($classlist->{$user}->[$start_date] > $now) { |
push(@future_members, [$_, $classlist->{$_}->[$fullname], |
push(@future_members, [$user, $classlist->{$user}->[$fullname], |
$classlist->{$_}->[$section], |
$classlist->{$user}->[$section], |
"Future", "Student"]); |
"Future", "Student"]); |
} else { |
} else { |
push(@expired_members, [$_, $classlist->{$_}->[$fullname], |
push(@expired_members, [$user, |
$classlist->{$_}->[$section], |
$classlist->{$user}->[$fullname], |
|
$classlist->{$user}->[$section], |
"Expired", "Student"]); |
"Expired", "Student"]); |
} |
} |
|
|