version 1.218, 2023/11/03 01:12:15
|
version 1.219, 2023/11/04 00:06:00
|
Line 2632 sub get_cols_array {
|
Line 2632 sub get_cols_array {
|
push(@cols,'photo'); |
push(@cols,'photo'); |
} |
} |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
push (@cols,('authorusage','authorquota','extent')); |
push(@cols,('authorusage','authorquota','extent')); |
|
} |
|
if ($context eq 'author') { |
|
push(@cols,'manager'); |
} |
} |
} |
} |
return @cols; |
return @cols; |
Line 2673 sub column_checkboxes {
|
Line 2676 sub column_checkboxes {
|
} elsif ($env{'form.roletype'} eq 'domain') { |
} elsif ($env{'form.roletype'} eq 'domain') { |
$disabledchk{'extent'} = 1; |
$disabledchk{'extent'} = 1; |
} |
} |
|
} elsif ($context eq 'author') { |
|
if (($env{'form.Status'} eq 'Expired') || |
|
($env{'form.showrole'} eq 'aa')) { |
|
$disabledchk{'manager'} = 1; |
|
} |
} |
} |
} |
} |
my $numposs = scalar(@cols); |
my $numposs = scalar(@cols); |
Line 2764 sub get_column_names {
|
Line 2772 sub get_column_names {
|
'ca' => "check all", |
'ca' => "check all", |
'ua' => "uncheck all", |
'ua' => "uncheck all", |
'clicker' => "clicker-ID", |
'clicker' => "clicker-ID", |
|
'manager' => "co-author manager", |
); |
); |
if ($context eq 'domain' && $env{'form.roletype'} eq 'course') { |
if ($context eq 'domain' && $env{'form.roletype'} eq 'course') { |
$lt{'extent'} = &mt('course(s): description, section(s), status'); |
$lt{'extent'} = &mt('course(s): description, section(s), status'); |
Line 3048 sub make_keylist_array {
|
Line 3057 sub make_keylist_array {
|
$index->{'instsec'} = &Apache::loncoursedata::CL_INSTSEC(); |
$index->{'instsec'} = &Apache::loncoursedata::CL_INSTSEC(); |
$index->{'authorquota'} = &Apache::loncoursedata::CL_AUTHORQUOTA(); |
$index->{'authorquota'} = &Apache::loncoursedata::CL_AUTHORQUOTA(); |
$index->{'authorusage'} = &Apache::loncoursedata::CL_AUTHORUSAGE(); |
$index->{'authorusage'} = &Apache::loncoursedata::CL_AUTHORUSAGE(); |
|
$index->{'manager'} = &Apache::loncoursedata::CL_CAMANAGER(); |
foreach my $key (keys(%{$index})) { |
foreach my $key (keys(%{$index})) { |
$keylist->[$index->{$key}] = $key; |
$keylist->[$index->{$key}] = $key; |
} |
} |
Line 3122 sub show_users_list {
|
Line 3132 sub show_users_list {
|
(($env{'form.showrole'} eq 'Any') || ($env{'form.showrole'} eq 'au'))) { |
(($env{'form.showrole'} eq 'Any') || ($env{'form.showrole'} eq 'au'))) { |
push(@sortable,('authorusage','authorquota')); |
push(@sortable,('authorusage','authorquota')); |
} |
} |
|
if ($context eq 'author') { |
|
push(@sortable,'manager'); |
|
} |
} |
} |
if ($mode eq 'pickauthor') { |
if ($mode eq 'pickauthor') { |
@sortable = ('username','fullname','email','status'); |
@sortable = ('username','fullname','email','status'); |
Line 3439 END
|
Line 3452 END
|
foreach my $idx (@$keylist) { |
foreach my $idx (@$keylist) { |
$index{$idx} = $i++; |
$index{$idx} = $i++; |
} |
} |
|
my $now = time; |
my $usercount = 0; |
my $usercount = 0; |
my ($secfilter,$grpfilter); |
my ($secfilter,$grpfilter); |
if ($context eq 'course') { |
if ($context eq 'course') { |
Line 3456 END
|
Line 3470 END
|
Future => 'Future', |
Future => 'Future', |
Expired => 'Expired', |
Expired => 'Expired', |
); |
); |
# If this is for a single course get last course "log-in". |
my (%crslogins,%camanagers); |
my %crslogins; |
|
if ($context eq 'course') { |
if ($context eq 'course') { |
|
# If this is for a single course get last course "log-in". |
%crslogins=&Apache::lonnet::dump('nohist_crslastlogin',$cdom,$cnum); |
%crslogins=&Apache::lonnet::dump('nohist_crslastlogin',$cdom,$cnum); |
|
} elsif ($context eq 'author') { |
|
map { $camanagers{$_.':ca'} = 1; } split(/,/,$env{'environment.authormanagers'}); |
} |
} |
# Get groups, role, permanent e-mail so we can sort on them if |
# Get groups, role, permanent e-mail so we can sort on them if |
# necessary. |
# necessary. |
Line 3559 END
|
Line 3575 END
|
} |
} |
} |
} |
} |
} |
|
if ($context eq 'author') { |
|
if (($camanagers{$user}) && |
|
((!defined($userlist->{$user}->[$index{'end'}])) || |
|
($userlist->{$user}->[$index{'end'}] == 0) || |
|
($userlist->{$user}->[$index{'end'}] > $now))) { |
|
$userlist->{$user}->[$index{'manager'}] = &mt('Yes'); |
|
} else { |
|
$userlist->{$user}->[$index{'manager'}] = &mt('No'); |
|
} |
|
} |
my %emails = &Apache::loncommon::getemails($uname,$udom); |
my %emails = &Apache::loncommon::getemails($uname,$udom); |
if ($emails{'permanentemail'} =~ /\S/) { |
if ($emails{'permanentemail'} =~ /\S/) { |
$userlist->{$user}->[$index{'email'}] = $emails{'permanentemail'}; |
$userlist->{$user}->[$index{'email'}] = $emails{'permanentemail'}; |