Diff for /loncom/interface/lonpreferences.pm between versions 1.239 and 1.240

version 1.239, 2021/11/30 15:55:37 version 1.240, 2022/08/19 18:56:41
Line 2129  sub change_authoring_settings { Line 2129  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 2153  sub lockednameschanger { Line 2149  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 2179  ENDSCREEN Line 2180  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 2524  sub handler { Line 2528  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;

Removed from v.1.239  
changed lines
  Added in v.1.240


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>