--- loncom/interface/lonselstudent.pm 2006/07/17 16:26:08 1.9 +++ loncom/interface/lonselstudent.pm 2009/01/15 18:23:27 1.14 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # lonselstudent.pm : Reusable subs for student selection. # -# $Id: lonselstudent.pm,v 1.9 2006/07/17 16:26:08 raeburn Exp $ +# $Id: lonselstudent.pm,v 1.14 2009/01/15 18:23:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -28,8 +28,9 @@ package Apache::lonselstudent; use Apache::lonnet; -use Apache::loncoursedata; -use HTML::Entities; +use Apache::lonlocal; +use Apache::loncoursedata(); +use HTML::Entities(); # # Utility function used when rendering tags. @@ -110,9 +111,8 @@ sub get_people_in_class { my $classlist = &Apache::loncoursedata::get_classlist(); my @keys = keys(%{$classlist}); - # Sort by: Section, name + # Sort by: fullname, username @keys = sort { - lc($classlist->{$a}[$section]) cmp lc($classlist->{$b}[$section]) || lc($classlist->{$a}[$fullname]) cmp lc($classlist->{$b}[$fullname]) || lc($a) cmp lc($b) } (@keys); @@ -178,12 +178,14 @@ sub get_people_in_class { # This should be true for the first call for a page # and false for all other calls... only matters if # multiselect is true. +# $context - If email, do not include

tags at the end +# of the data table. # Returns: # HTML text to add to the rendering of the helper. # sub render_student_list { my ($students, $formname, $formprefix, $defaultusers, - $multiselect, $resultname, $javascript) = @_; + $multiselect, $resultname, $javascript, $context) = @_; my $result = ""; @@ -195,11 +197,11 @@ sub render_student_list {