--- loncom/interface/lonpickstudent.pm 2006/03/16 21:15:16 1.12 +++ loncom/interface/lonpickstudent.pm 2006/05/18 01:08:50 1.17 @@ -1,7 +1,7 @@ # The LearningOnline Network # Pick a student from the classlist # -# $Id: lonpickstudent.pm,v 1.12 2006/03/16 21:15:16 raeburn Exp $ +# $Id: lonpickstudent.pm,v 1.17 2006/05/18 01:08:50 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -34,6 +34,7 @@ use Apache::loncommon; use Apache::loncoursedata; use Apache::lonnet; use Apache::lonlocal; +use Apache::longroup; sub handler { my $r = shift; @@ -42,7 +43,8 @@ sub handler { return OK if $r->header_only; # ------------------------------------------------------------ Print the screen - $r->print(&Apache::loncommon::start_page("Selecting a User")); + $r->print(&Apache::loncommon::start_page("Selecting a User",undef, + {'no_nav_bar' => 1})); &Apache::loncommon::get_unprocessed_cgi @@ -75,11 +77,7 @@ sub handler { my $classlist=&Apache::loncoursedata::get_classlist(); my %grouplist=&Apache::lonnet::get_group_membership($cdom,$cnum); my $now = time; - my %allgroups; - my @coursegroups = (); - if (&Apache::loncommon::coursegroups(\%allgroups,$cdom,$cnum)) { - @coursegroups = keys(%allgroups); - } + my %allgroups = &Apache::longroup::coursegroups($cdom,$cnum); # --------------------------------------- There is such a user, get environment @@ -120,7 +118,7 @@ ENDSCRIPT if ($filter ne '.') { $r->print('
'.&mt('Name starting with').' "'.$filter.'"
'); } - $r->print('

'); + $r->print('

 usernamedomainNameIDsectionactive group(s)
'); # ------------------------------------------------------------------ Students foreach (sort keys %$classlist) { # the following undefs are for 'domain', and 'username' respectively. @@ -134,7 +132,7 @@ ENDSCRIPT if (($uname=~/^$filter/) || ($fullname=~/^$filter/i)) { my $grouplist = ''; - foreach my $group (@coursegroups) { + foreach my $group (sort(keys(%allgroups))) { if (exists($grouplist{$group.':'.$uname.':'.$udom})) { my ($end,$start) = split(/:/,$grouplist{$group.':'.$uname.':'.$udom}); if (($end!=0) && ($end<$now)) { next; }
 usernamedomainNameIDsectionactive group(s)