Diff for /loncom/interface/lonuserutils.pm between versions 1.184.4.10.2.6 and 1.184.4.10.2.7

version 1.184.4.10.2.6, 2023/12/10 04:31:41 version 1.184.4.10.2.7, 2024/01/05 04:09:47
Line 1607  sub print_userlist { Line 1607  sub print_userlist {
     if (! exists($env{'form.sortby'})) {      if (! exists($env{'form.sortby'})) {
         $env{'form.sortby'} = 'username';          $env{'form.sortby'} = 'username';
     }      }
       my ($showstart,$showend);
       if (($env{'form.Status'} eq '') && ($env{'form.phase'} eq '') &&
           ($env{'form.showrole'} eq '') && ($context eq 'course') &&
           ($env{'request.course.id'} ne '') &&
           ($env{'course.'.$env{'request.course.id'}.'.internal.coursecode'} ne '')) {
           my $now = time;
           my $startaccess = $env{'course.'.$env{'request.course.id'}.'.default_enrollment_start_date'};
           my $endaccess = $env{'course.'.$env{'request.course.id'}.'.default_enrollment_end_date'};
           if (($startaccess) && ($startaccess > $now)) {
               $env{'form.Status'} = 'Future';
               $showstart = 1;
           }
           if (($endaccess ne '') && ($endaccess != 0) && ($endaccess < $now)) {
               $env{'form.Status'} = 'Expired';
               undef($showstart);
               $showend = 1;
           }
       }
     if ($env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) {      if ($env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) {
         $env{'form.Status'} = 'Active';          $env{'form.Status'} = 'Active';
     }      }
Line 1674  sub print_userlist { Line 1692  sub print_userlist {
         $r->print(&section_group_filter($cnum,$cdom));          $r->print(&section_group_filter($cnum,$cdom));
     }      }
     $r->print('</div><div class="LC_left_float">'.      $r->print('</div><div class="LC_left_float">'.
               &column_checkboxes($context,$mode,$formname,$showcredits).                &column_checkboxes($context,$mode,$formname,$showcredits,$showstart,$showend).
               '</div>');                '</div>');
     if ($env{'form.phase'} eq '') {      if ($env{'form.phase'} eq '') {
         $r->print('<br clear="all" />'.          $r->print('<br clear="all" />'.
Line 2063  sub get_cols_array { Line 2081  sub get_cols_array {
 }  }
   
 sub column_checkboxes {  sub column_checkboxes {
     my ($context,$mode,$formname,$showcredits) = @_;      my ($context,$mode,$formname,$showcredits,$showstart,$showend) = @_;
     my @cols = &get_cols_array($context,$mode,$showcredits);      my @cols = &get_cols_array($context,$mode,$showcredits);
     my @showncols = &Apache::loncommon::get_env_multiple('form.showcol');      my @showncols = &Apache::loncommon::get_env_multiple('form.showcol');
     my (%disabledchk,%unchecked);      my (%disabledchk,%unchecked);
Line 2076  sub column_checkboxes { Line 2094  sub column_checkboxes {
             if ($showcredits) {              if ($showcredits) {
                 $unchecked{'credits'} = 1;                  $unchecked{'credits'} = 1;
             }              }
         } elsif ($context eq 'domain') {               my %curr_groups = &Apache::longroup::coursegroups();
               unless (keys(%curr_groups)) {
                   $unchecked{'groups'} = 1;
               }
           } elsif ($context eq 'domain') {
             $unchecked{'extent'} = 1;               $unchecked{'extent'} = 1; 
         }          }
         $unchecked{'start'} = 1;          if ($showstart) {
         $unchecked{'end'} = 1;              $unchecked{'lastlogin'} = 1;
           } else {
               $unchecked{'start'} = 1;
           }
           unless ($showend) {
               $unchecked{'end'} = 1;
           }
     } else {      } else {
         if ($env{'form.Status'} ne 'Any') {          if ($env{'form.Status'} ne 'Any') {
             $disabledchk{'status'} = 1;              $disabledchk{'status'} = 1;

Removed from v.1.184.4.10.2.6  
changed lines
  Added in v.1.184.4.10.2.7


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