[LON-CAPA-cvs] cvs: loncom /interface lonselstudent.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 17 May 2006 15:20:57 -0000
albertel Wed May 17 11:20:57 2006 EDT
Modified files:
/loncom/interface lonselstudent.pm
Log:
- making the course personnel grouping look like the student section
Index: loncom/interface/lonselstudent.pm
diff -u loncom/interface/lonselstudent.pm:1.4 loncom/interface/lonselstudent.pm:1.5
--- loncom/interface/lonselstudent.pm:1.4 Wed May 17 11:04:42 2006
+++ loncom/interface/lonselstudent.pm Wed May 17 11:20:56 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# lonselstudent.pm : Reusable subs for student selection.
#
-# $Id: lonselstudent.pm,v 1.4 2006/05/17 15:04:42 albertel Exp $
+# $Id: lonselstudent.pm,v 1.5 2006/05/17 15:20:56 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -71,20 +71,19 @@
# Enumerate the course_personnel.
#
my @course_personnel;
- for (sort(keys(%coursepersonnel))) {
- for my $role (split(/,/, $coursepersonnel{$_})) {
- # extract the names so we can sort them
- my @people;
-
- for (split(/,/, $role)) {
- push(@people, [split(/:/, $role)]);
- }
-
- @people = sort { $a->[0] cmp $b->[0] } (@people);
+ for my $role (sort(keys(%coursepersonnel))) {
+ # extract the names so we can sort them
+ my @people;
+ for my $person (split(/,/, $coursepersonnel{$role})) {
+ my ($uname,$domain) = split(/:/, $person);
+ push(@people, [&Apache::loncommon::plainname($uname,$domain),
+ $uname,$domain]);
+ }
+ @people = sort { $a->[0] cmp $b->[0] } (@people);
- for my $person (@people) {
- push(@course_personnel, [join(':', @$person), $person->[0], '', $_]);
- }
+ for my $person (@people) {
+ push(@course_personnel, [join(':', $person->[1],$person->[2]),
+ $person->[0], '', '', $role]);
}
}
# Students must be split into the three categories: