Diff for /loncom/interface/lonpickstudent.pm between versions 1.13 and 1.16

version 1.13, 2006/03/16 21:34:04 version 1.16, 2006/05/09 14:38:10
Line 76  sub handler { Line 76  sub handler {
     my $classlist=&Apache::loncoursedata::get_classlist();      my $classlist=&Apache::loncoursedata::get_classlist();
     my %grouplist=&Apache::lonnet::get_group_membership($cdom,$cnum);      my %grouplist=&Apache::lonnet::get_group_membership($cdom,$cnum);
     my $now = time;      my $now = time;
     my %allgroups;      my %allgroups = &Apache::loncommon::coursegroups($cdom,$cnum);
     my @coursegroups = ();  
     if (&Apache::loncommon::coursegroups(\%allgroups,$cdom,$cnum)) {  
         @coursegroups = keys(%allgroups);  
     }  
   
 # --------------------------------------- There is such a user, get environment  # --------------------------------------- There is such a user, get environment
   
Line 121  ENDSCRIPT Line 117  ENDSCRIPT
     if ($filter ne '.') {      if ($filter ne '.') {
        $r->print('<br/ >'.&mt('Name starting with').' "'.$filter.'"<br />');         $r->print('<br/ >'.&mt('Name starting with').' "'.$filter.'"<br />');
     }      }
     $r->print('</p><p><table><tr><th>&nbsp;</th><th>username</th><th>domain</th><th>Name</th><th>ID</th><th>section</th><th>active group(s)</th>');      $r->print('</p><p><table><tr><th>&nbsp;</th><th>username</th><th>domain</th><th>Name</th><th>ID</th><th>section</th><th>active group(s)</th></tr>');
   # ------------------------------------------------------------------ Students    # ------------------------------------------------------------------ Students
     foreach (sort keys %$classlist) {      foreach (sort keys %$classlist) {
         # the following undefs are for 'domain', and 'username' respectively.          # the following undefs are for 'domain', and 'username' respectively.
Line 135  ENDSCRIPT Line 131  ENDSCRIPT
     if (($uname=~/^$filter/) ||       if (($uname=~/^$filter/) || 
                 ($fullname=~/^$filter/i)) {                  ($fullname=~/^$filter/i)) {
                my $grouplist = '';                 my $grouplist = '';
                foreach my $group (@coursegroups) {                 foreach my $group (sort(keys(%allgroups))) {
                    if (exists($grouplist{$group.':'.$uname.':'.$udom})) {                     if (exists($grouplist{$group.':'.$uname.':'.$udom})) {
                        my ($end,$start) = split(/:/,$grouplist{$group.':'.$uname.':'.$udom});                         my ($end,$start) = split(/:/,$grouplist{$group.':'.$uname.':'.$udom});
                        if (($end!=0) && ($end<$now)) { next; }                         if (($end!=0) && ($end<$now)) { next; }

Removed from v.1.13  
changed lines
  Added in v.1.16


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>