version 1.220, 2023/12/07 04:47:00
|
version 1.221, 2024/01/05 04:01:40
|
Line 2183 sub print_userlist {
|
Line 2183 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 2250 sub print_userlist {
|
Line 2268 sub print_userlist {
|
$r->print(§ion_group_filter($cnum,$cdom)); |
$r->print(§ion_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 2661 sub get_cols_array {
|
Line 2679 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 2674 sub column_checkboxes {
|
Line 2692 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; |