version 1.160.6.118.2.24, 2024/08/26 10:52:47
|
version 1.160.6.118.2.25, 2024/09/01 02:45:08
|
Line 457 sub handler {
|
Line 457 sub handler {
|
header => [{col1 => 'Target user has role', |
header => [{col1 => 'Target user has role', |
col2 => 'User information updatable in author context'}, |
col2 => 'User information updatable in author context'}, |
{col1 => 'Target user has role', |
{col1 => 'Target user has role', |
|
col2 => 'User information updatable by co-author manager'}, |
|
{col1 => 'Target user has role', |
col2 => 'User information updatable in course context'}], |
col2 => 'User information updatable in course context'}], |
print => \&print_usermodification, |
print => \&print_usermodification, |
modify => \&modify_usermodification, |
modify => \&modify_usermodification, |
Line 945 sub print_config_box {
|
Line 947 sub print_config_box {
|
($action eq 'usersessions') || ($action eq 'coursecategories') || |
($action eq 'usersessions') || ($action eq 'coursecategories') || |
($action eq 'contacts') || ($action eq 'passwords') || |
($action eq 'contacts') || ($action eq 'passwords') || |
($action eq 'defaults') || ($action eq 'lti') || |
($action eq 'defaults') || ($action eq 'lti') || |
($action eq 'ltitools')) { |
($action eq 'ltitools') || ($action eq 'usermodification')) { |
if ($action eq 'coursecategories') { |
if ($action eq 'coursecategories') { |
$output .= &print_coursecategories('middle',$dom,$item,$settings,\$rowtotal); |
$output .= &print_coursecategories('middle',$dom,$item,$settings,\$rowtotal); |
$colspan = ' colspan="2"'; |
$colspan = ' colspan="2"'; |
Line 1016 sub print_config_box {
|
Line 1018 sub print_config_box {
|
$output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal); |
$output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal); |
} |
} |
$rowtotal ++; |
$rowtotal ++; |
} elsif (($action eq 'usermodification') || ($action eq 'coursedefaults') || |
} elsif (($action eq 'coursedefaults') || ($action eq 'authordefaults') || |
($action eq 'directorysrch') || ($action eq 'helpsettings') || |
($action eq 'directorysrch') || ($action eq 'helpsettings') || |
($action eq 'wafproxy') || ($action eq 'authordefaults')) { |
($action eq 'wafproxy')) { |
$output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal); |
$output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal); |
} elsif ($action eq 'scantron') { |
} elsif ($action eq 'scantron') { |
$output .= $item->{'print'}->($r,'bottom',$dom,$confname,$settings,\$rowtotal); |
$output .= $item->{'print'}->($r,'bottom',$dom,$confname,$settings,\$rowtotal); |
Line 9447 sub print_usermodification {
|
Line 9449 sub print_usermodification {
|
$$rowtotal ++; |
$$rowtotal ++; |
$rowcount ++; |
$rowcount ++; |
} |
} |
|
} elsif ($position eq 'middle') { |
|
$rowcount = 0; |
|
$context = 'coauthor'; |
|
foreach my $role ('ca','aa') { |
|
$datatable .= &modifiable_userdata_row($context,$role,$settings, |
|
$numinrow,$rowcount); |
|
$$rowtotal ++; |
|
$rowcount ++; |
|
} |
} elsif ($position eq 'bottom') { |
} elsif ($position eq 'bottom') { |
$context = 'course'; |
$context = 'course'; |
$rowcount = 0; |
$rowcount = 0; |
Line 10867 sub modifiable_userdata_row {
|
Line 10878 sub modifiable_userdata_row {
|
} else { |
} else { |
if ($context eq 'lti') { |
if ($context eq 'lti') { |
$prefix = 'lti'; |
$prefix = 'lti'; |
|
} elsif ($context eq 'coauthor') { |
|
$prefix = 'cacanmodify'; |
} |
} |
$output .= '<label>'. |
$output .= '<label>'. |
'<input type="checkbox" name="'.$prefix.'_'.$role.'" '. |
'<input type="checkbox" name="'.$prefix.'_'.$role.'" '. |
Line 17709 sub modify_usermodification {
|
Line 17722 sub modify_usermodification {
|
} |
} |
} |
} |
} |
} |
my @contexts = ('author','course'); |
my @contexts = ('author','coauthor','course'); |
my %context_title = ( |
my %context_title = ( |
author => 'In author context', |
author => 'In author context', |
|
coauthor => 'As co-author manager', |
course => 'In course context', |
course => 'In course context', |
); |
); |
my @fields = ('lastname','firstname','middlename','generation', |
my @fields = ('lastname','firstname','middlename','generation', |
'permanentemail','id'); |
'permanentemail','id'); |
my %roles = ( |
my %roles = ( |
author => ['ca','aa'], |
author => ['ca','aa'], |
|
coauthor => ['ca','aa'], |
course => ['st','ep','ta','in','cr'], |
course => ['st','ep','ta','in','cr'], |
); |
); |
my %fieldtitles = &Apache::loncommon::personal_data_fieldtitles(); |
my %fieldtitles = &Apache::loncommon::personal_data_fieldtitles(); |
foreach my $context (@contexts) { |
foreach my $context (@contexts) { |
|
my $prefix = 'canmodify'; |
|
if ($context eq 'coauthor') { |
|
$prefix = 'cacanmodify'; |
|
} |
foreach my $role (@{$roles{$context}}) { |
foreach my $role (@{$roles{$context}}) { |
my @modifiable = &Apache::loncommon::get_env_multiple('form.canmodify_'.$role); |
my @modifiable = &Apache::loncommon::get_env_multiple('form.'.$prefix.'_'.$role); |
foreach my $item (@fields) { |
foreach my $item (@fields) { |
if (grep(/^\Q$item\E$/,@modifiable)) { |
if (grep(/^\Q$item\E$/,@modifiable)) { |
$modifyhash{$context}{$role}{$item} = 1; |
$modifyhash{$context}{$role}{$item} = 1; |