--- loncom/interface/lonselstudent.pm 2006/05/23 21:41:26 1.7 +++ loncom/interface/lonselstudent.pm 2006/07/17 16:26:08 1.9 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # lonselstudent.pm : Reusable subs for student selection. # -# $Id: lonselstudent.pm,v 1.7 2006/05/23 21:41:26 foxr Exp $ +# $Id: lonselstudent.pm,v 1.9 2006/07/17 16:26:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -112,10 +112,9 @@ sub get_people_in_class { my @keys = keys(%{$classlist}); # Sort by: Section, name @keys = sort { - if ($classlist->{$a}->[$section] ne $classlist->{$b}->[$section]) { - return $classlist->{$a}->[$section] cmp $classlist->{$b}->[$section]; - } - return $classlist->{$a}->[$fullname] cmp $classlist->{$b}->[$fullname]; + lc($classlist->{$a}[$section]) cmp lc($classlist->{$b}[$section]) || + lc($classlist->{$a}[$fullname]) cmp lc($classlist->{$b}[$fullname]) || + lc($a) cmp lc($b) } (@keys); @@ -188,6 +187,9 @@ sub render_student_list { my $result = ""; + # no students so no output + return if (!@$students); + if ($javascript && $multiselect) { $result .= < @@ -361,7 +363,7 @@ SCRIPT for my $student (@$students) { $result .= &Apache::loncommon::start_data_table_row(). '[0]; # Figure out which students are checked by default...