';
} else {
@@ -4756,10 +4778,23 @@ sub modify_autoupdate {
push(@{$fields{$1}},$2);
}
}
+ my @lockablenames = &Apache::loncommon::get_env_multiple('form.lockablenames');
+ @lockablenames = sort(@lockablenames);
+ if (ref($currautoupdate{'lockablenames'}) eq 'ARRAY') {
+ my @changed = &Apache::loncommon::compare_arrays($currautoupdate{'lockablenames'},\@lockablenames);
+ if (@changed) {
+ $changes{'lockablenames'} = 1;
+ }
+ } else {
+ if (@lockablenames) {
+ $changes{'lockablenames'} = 1;
+ }
+ }
my %updatehash = (
autoupdate => { run => $env{'form.autoupdate_run'},
classlists => $env{'form.classlists'},
fields => {%fields},
+ lockablenames => \@lockablenames,
}
);
foreach my $key (keys(%currautoupdate)) {
@@ -4789,6 +4824,22 @@ sub modify_autoupdate {
}
}
}
+ } elsif ($key eq 'lockablenames') {
+ if (ref($currautoupdate{$key}) eq 'ARRAY') {
+ my @changed = &Apache::loncommon::compare_arrays($currautoupdate{'lockablenames'},\@lockablenames);
+ if (@changed) {
+ $changes{'lockablenames'} = 1;
+ }
+ } else {
+ if (@lockablenames) {
+ $changes{'lockablenames'} = 1;
+ }
+ }
+ }
+ }
+ unless (grep(/^\Qlockablenames\E$/,keys(%currautoupdate))) {
+ if (@lockablenames) {
+ $changes{'lockablenames'} = 1;
}
}
foreach my $item (@{$types},'default') {
@@ -4808,7 +4859,17 @@ sub modify_autoupdate {
if (keys(%changes) > 0) {
$resulttext = &mt('Changes made:').'
';
foreach my $key (sort(keys(%changes))) {
- if (ref($changes{$key}) eq 'ARRAY') {
+ if ($key eq 'lockablenames') {
+ $resulttext .= '
';
+ if (@lockablenames) {
+ $usertypes->{'default'} = $othertitle;
+ $resulttext .= &mt("User preference to disable replacement of user's name with institutional data (by auto-update), available for the following affiliations:").' '.
+ join(', ', map { $usertypes->{$_}; } @lockablenames).'
';
+ } else {
+ $resulttext .= &mt("User preference to disable replacement of user's name with institutional data (by auto-update) is unavailable.");
+ }
+ $resulttext .= '';
+ } elsif (ref($changes{$key}) eq 'ARRAY') {
foreach my $item (@{$changes{$key}}) {
my @newvalues;
foreach my $type (@{$fields{$item}}) {
@@ -5817,7 +5878,7 @@ sub modify_scantron {
my $error;
if ($configuserok eq 'ok') {
if ($switchserver) {
- $error = &mt("Upload of scantron format file is not permitted to this server: [_1]",$switchserver);
+ $error = &mt("Upload of bubblesheet format file is not permitted to this server: [_1]",$switchserver);
} else {
if ($author_ok eq 'ok') {
my ($result,$scantronurl) =
@@ -5857,25 +5918,25 @@ sub modify_scantron {
if (ref($confhash{'scantron'}) eq 'HASH') {
$resulttext = &mt('Changes made:').'
';
if ($confhash{'scantron'}{'scantronformat'} eq '') {
- $resulttext .= '
'.&mt('[_1] scantron format file removed; [_2] file will be used for courses in this domain.',$custom,$default).'
';
+ $resulttext .= '
'.&mt('[_1] bubblesheet format file removed; [_2] file will be used for courses in this domain.',$custom,$default).'
';
} else {
- $resulttext .= '
'.&mt('Custom scantron format file ([_1]) uploaded for use with courses in this domain.',$custom).'
';
+ $resulttext .= '
'.&mt('Custom bubblesheet format file ([_1]) uploaded for use with courses in this domain.',$custom).'
';
}
$resulttext .= '
';
} else {
- $resulttext = &mt('Changes made to scantron format file.');
+ $resulttext = &mt('Changes made to bubblesheet format file.');
}
$resulttext .= '
';
&Apache::loncommon::devalidate_domconfig_cache($dom);
} else {
- $resulttext = &mt('No changes made to scantron format file');
+ $resulttext = &mt('No changes made to bubblesheet format file');
}
} else {
$resulttext = ''.
&mt('An error occurred: [_1]',$putresult).'';
}
} else {
- $resulttext = &mt('No changes made to scantron format file');
+ $resulttext = &mt('No changes made to bubblesheet format file');
}
if ($errors) {
$resulttext .= &mt('The following errors occurred: ').'