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

version 1.12, 2006/03/16 21:15:16 version 1.16, 2006/05/09 14:38:10
Line 42  sub handler { Line 42  sub handler {
     return OK if $r->header_only;      return OK if $r->header_only;
   
 # ------------------------------------------------------------ Print the screen  # ------------------------------------------------------------ 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      &Apache::loncommon::get_unprocessed_cgi
Line 75  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 120  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 134  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.12  
changed lines
  Added in v.1.16


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