version 1.196.4.28, 2021/12/14 00:30:54
|
version 1.196.4.29, 2024/07/04 23:13:07
|
Line 2094 sub change_authoring_settings {
|
Line 2094 sub change_authoring_settings {
|
|
|
sub lockednameschanger { |
sub lockednameschanger { |
my $r = shift; |
my $r = shift; |
&Apache::lonhtmlcommon::add_breadcrumb( |
|
{ href => '/adm/preferences?action=changelockednames', |
|
text => 'Automatic name changes'}); |
|
$r->print(Apache::loncommon::start_page('Automatic name changes')); |
|
$r->print(Apache::lonhtmlcommon::breadcrumbs('Allow/disallow name updates')); |
|
my %userenv = &Apache::lonnet::get('environment',['lockedname']); |
my %userenv = &Apache::lonnet::get('environment',['lockedname']); |
my $lockedname=''; |
my $lockedname=''; |
|
my $ended; |
if (&can_toggle_namelocking()) { |
if (&can_toggle_namelocking()) { |
if ($userenv{'lockedname'}) { |
if ($userenv{'lockedname'}) { |
$lockedname = ' checked="checked"'; |
$lockedname = ' checked="checked"'; |
Line 2118 sub lockednameschanger {
|
Line 2114 sub lockednameschanger {
|
} |
} |
} |
} |
if (keys(%updateable)) { |
if (keys(%updateable)) { |
|
&Apache::lonhtmlcommon::add_breadcrumb( |
|
{ href => '/adm/preferences?action=changelockednames', |
|
text => 'Automatic name changes'}); |
|
$r->print(Apache::loncommon::start_page('Automatic name changes')); |
|
$r->print(Apache::lonhtmlcommon::breadcrumbs('Allow/disallow name updates')); |
my %longnames = &Apache::lonlocal::texthash ( |
my %longnames = &Apache::lonlocal::texthash ( |
firstname => 'First Name', |
firstname => 'First Name', |
middlename => 'Middle Name', |
middlename => 'Middle Name', |
Line 2144 ENDSCREEN
|
Line 2145 ENDSCREEN
|
} else { |
} else { |
my $message = &mt('Based on your institutional affiliation no name information is automatically updated for your LON-CAPA account.'); |
my $message = &mt('Based on your institutional affiliation no name information is automatically updated for your LON-CAPA account.'); |
&print_main_menu($r,$message); |
&print_main_menu($r,$message); |
|
$ended = 1; |
} |
} |
} else { |
} else { |
my $message = &mt('You are not permitted to set a user preference for automatic name updates for your LON-CAPA account.'); |
my $message = &mt('You are not permitted to set a user preference for automatic name updates for your LON-CAPA account.'); |
&print_main_menu($r,$message); |
&print_main_menu($r,$message); |
|
$ended = 1; |
} |
} |
|
return $ended; |
} |
} |
|
|
sub verify_and_change_lockednames { |
sub verify_and_change_lockednames { |
Line 2508 sub handler {
|
Line 2512 sub handler {
|
&print_main_menu($r); |
&print_main_menu($r); |
$ended = 1; |
$ended = 1; |
} elsif ($env{'form.action'} eq 'changelockednames') { |
} elsif ($env{'form.action'} eq 'changelockednames') { |
&lockednameschanger($r); |
$ended = &lockednameschanger($r); |
} elsif ($env{'form.action'} eq 'verify_and_change_lockednames') { |
} elsif ($env{'form.action'} eq 'verify_and_change_lockednames') { |
&verify_and_change_lockednames($r); |
&verify_and_change_lockednames($r); |
$ended = 1; |
$ended = 1; |