version 1.221, 2024/01/05 04:01:40
|
version 1.223, 2025/01/12 23:34:20
|
Line 2844 sub gather_userinfo {
|
Line 2844 sub gather_userinfo {
|
($userdata{'username'},$userdata{'domain'},$userdata{'role'}) = |
($userdata{'username'},$userdata{'domain'},$userdata{'role'}) = |
split(/:/,$item); |
split(/:/,$item); |
($userdata{'start'},$userdata{'end'})=split(/:/,$rolehash->{$item}); |
($userdata{'start'},$userdata{'end'})=split(/:/,$rolehash->{$item}); |
|
next if (($userdata{'username'} eq '') && ($userdata{'domain'} eq '')); |
&build_user_record($context,\%userdata,$userinfo,$indexhash, |
&build_user_record($context,\%userdata,$userinfo,$indexhash, |
$item,$userlist); |
$item,$userlist); |
} elsif ($context eq 'course') { |
} elsif ($context eq 'course') { |
Line 3522 END
|
Line 3523 END
|
# If this is for a single course get last course "log-in". |
# 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') { |
} elsif ($context eq 'author') { |
map { $camanagers{$_.':ca'} = 1; } split(/,/,$env{'environment.authormanagers'}); |
my $authormanagers; |
|
if ($env{'request.role'} =~ m{^(?:ca|aa)\./($match_domain)/($match_username)$}) { |
|
my %envhash = &Apache::lonnet::userenvironment($1,$2,'authormanagers'); |
|
$authormanagers = $envhash{'authormanagers'}; |
|
} else { |
|
$authormanagers = $env{'environment.authormanagers'}; |
|
} |
|
if ($authormanagers ne '') { |
|
map { $camanagers{$_.':ca'} = 1; } split(/,/,$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 3704 END
|
Line 3714 END
|
foreach my $item (@{$keylist}) { |
foreach my $item (@{$keylist}) { |
$in{$item} = $sdata->[$index{$item}]; |
$in{$item} = $sdata->[$index{$item}]; |
} |
} |
my $clickers = (&Apache::lonnet::userenvironment($in{'domain'},$in{'username'},'clickers'))[1]; |
if (grep(/^clicker$/,@cols)) { |
if ($clickers!~/\w/) { $clickers='-'; } |
my $clickers = (&Apache::lonnet::userenvironment($in{'domain'},$in{'username'},'clickers'))[1]; |
$in{'clicker'} = $clickers; |
if ($clickers!~/\w/) { $clickers='-'; } |
|
$in{'clicker'} = $clickers; |
|
} |
my $role = $in{'role'}; |
my $role = $in{'role'}; |
$in{'role'}=&Apache::lonnet::plaintext($sdata->[$index{'role'}],$crstype); |
$in{'role'}=&Apache::lonnet::plaintext($sdata->[$index{'role'}],$crstype); |
unless ($mode eq 'excel') { |
unless ($mode eq 'excel') { |
Line 3828 END
|
Line 3840 END
|
} elsif ($item eq 'clicker') { |
} elsif ($item eq 'clicker') { |
if (($context eq 'course') && ($mode ne 'autoenroll')) { |
if (($context eq 'course') && ($mode ne 'autoenroll')) { |
if ($env{'form.showrole'} eq 'st' || $env{'form.showrole'} eq 'Any') { |
if ($env{'form.showrole'} eq 'st' || $env{'form.showrole'} eq 'Any') { |
my $clickers = |
$r->print('<td>'.$in{'clicker'}.'</td>'); |
(&Apache::lonnet::userenvironment($in{'domain'},$in{'username'},'clickers'))[1]; |
|
if ($clickers!~/\w/) { $clickers='-'; } |
|
$r->print('<td>'.$clickers.'</td>'); |
|
} else { |
} else { |
$r->print('<td> </td>'."\n"); |
$r->print('<td> </td>'."\n"); |
} |
} |
Line 4450 sub results_header_row {
|
Line 4459 sub results_header_row {
|
$description .= ' ('.$constraint.')'; |
$description .= ' ('.$constraint.')'; |
} |
} |
} elsif ($context eq 'author') { |
} elsif ($context eq 'author') { |
|
my ($auname,$audom); |
|
if ($env{'request.role'} =~ m{^(?:ca|aa)\./($match_domain)/($match_username)$}) { |
|
($audom,$auname) = ($1,$2); |
|
} else { |
|
($audom,$auname) = ($env{'user.domain'},$env{'user.name'}); |
|
} |
$description = |
$description = |
&mt('Author space for [_1]' |
&mt('Author space for [_1]' |
,'<span class="LC_cusr_emph">' |
,'<span class="LC_cusr_emph">' |
.&Apache::loncommon::plainname($env{'user.name'},$env{'user.domain'}) |
.&Apache::loncommon::plainname($auname,$audom) |
.'</span>') |
.'</span>') |
.': '; |
.': '; |
if ($statusmode eq 'Expired') { |
if ($statusmode eq 'Expired') { |
Line 6674 sub can_modify_userinfo {
|
Line 6689 sub can_modify_userinfo {
|
my %domconfig = |
my %domconfig = |
&Apache::lonnet::get_dom('configuration',['usermodification'], |
&Apache::lonnet::get_dom('configuration',['usermodification'], |
$dom); |
$dom); |
|
if (($context eq 'author') && |
|
($env{'request.role'} =~ m{^(ca|aa)\./$match_domain/$match_username$})) { |
|
$context = 'coauthor'; |
|
} |
my %canmodify; |
my %canmodify; |
if (ref($fields) eq 'ARRAY') { |
if (ref($fields) eq 'ARRAY') { |
foreach my $field (@{$fields}) { |
foreach my $field (@{$fields}) { |