Diff for /loncom/interface/domainprefs.pm between versions 1.375 and 1.380

version 1.375, 2021/01/01 14:45:38 version 1.380, 2021/03/06 13:39:54
Line 3781  sub print_contacts { Line 3781  sub print_contacts {
                                                    \%choices,$rownum);                                                     \%choices,$rownum);
         $datatable .= $reports;          $datatable .= $reports;
     } elsif ($position eq 'lower') {      } elsif ($position eq 'lower') {
         $css_class = $rownum%2?' class="LC_odd_row"':'';          my (%current,%excluded,%weights);
         my ($threshold,$sysmail,%excluded,%weights);  
         my ($defaults,$names) = &Apache::loncommon::lon_status_items();          my ($defaults,$names) = &Apache::loncommon::lon_status_items();
         if ($lonstatus{'threshold'} =~ /^\d+$/) {          if ($lonstatus{'threshold'} =~ /^\d+$/) {
             $threshold = $lonstatus{'threshold'};              $current{'errorthreshold'} = $lonstatus{'threshold'};
         } else {          } else {
             $threshold = $defaults->{'threshold'};              $current{'errorthreshold'} = $defaults->{'threshold'};
         }          }
         if ($lonstatus{'sysmail'} =~ /^\d+$/) {          if ($lonstatus{'sysmail'} =~ /^\d+$/) {
             $sysmail = $lonstatus{'sysmail'};              $current{'errorsysmail'} = $lonstatus{'sysmail'};
         } else {          } else {
             $sysmail = $defaults->{'sysmail'};              $current{'errorsysmail'} = $defaults->{'sysmail'};
         }          }
         if (ref($lonstatus{'weights'}) eq 'HASH') {          if (ref($lonstatus{'weights'}) eq 'HASH') {
             foreach my $type ('E','W','N','U') {              foreach my $type ('E','W','N','U') {
Line 3812  sub print_contacts { Line 3811  sub print_contacts {
                 map {$excluded{$_} = 1; } @{$lonstatus{'excluded'}};                  map {$excluded{$_} = 1; } @{$lonstatus{'excluded'}};
             }              }
         }          }
         $datatable .= '<tr'.$css_class.'>'.          foreach my $item ('errorthreshold','errorsysmail') { 
                       '<td class="LC_left_item"><span class="LC_nobreak">'.              $css_class = $rownum%2?' class="LC_odd_row"':'';
                       $titles->{'errorthreshold'}.              $datatable .= '<tr'.$css_class.'>'.
                       '</span></td><td class="LC_left_item">'.                            '<td class="LC_left_item"><span class="LC_nobreak">'.
                       '<input type="text" name="errorthreshold" value="'.                            $titles->{$item}.
                       $threshold.'" size="5" /></td></tr>';                            '</span></td><td class="LC_left_item">'.
         $rownum ++;                            '<input type="text" name="'.$item.'" value="'.
                             $current{$item}.'" size="5" /></td></tr>';
               $rownum ++;
           }
         $css_class = $rownum%2?' class="LC_odd_row"':'';          $css_class = $rownum%2?' class="LC_odd_row"':'';
         $datatable .= '<tr'.$css_class.'>'.          $datatable .= '<tr'.$css_class.'>'.
                       '<td class="LC_left_item">'.                        '<td class="LC_left_item">'.
Line 3864  sub print_contacts { Line 3866  sub print_contacts {
         }          }
         $datatable .= '</tr></table></td></tr>';          $datatable .= '</tr></table></td></tr>';
         $rownum ++;          $rownum ++;
         $css_class = $rownum%2?' class="LC_odd_row"':'';  
         $datatable .= '<tr'.$css_class.'>'.  
                       '<td class="LC_left_item"><span class="LC_nobreak">'.  
                       $titles->{'errorsysmail'}.  
                       '</span></td><td class="LC_left_item">'.  
                       '<input type="text" name="errorsysmail" value="'.  
                       $sysmail.'" size="5" /></td></tr>';  
         $rownum ++;  
     } elsif ($position eq 'bottom') {      } elsif ($position eq 'bottom') {
         my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom);          my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom);
         my (@posstypes,%usertypeshash);          my (@posstypes,%usertypeshash);
Line 6161  sub print_coursedefaults { Line 6155  sub print_coursedefaults {
         my $currcanclone = 'none';          my $currcanclone = 'none';
         my $onclick;          my $onclick;
         my @cloneoptions = ('none','domain');          my @cloneoptions = ('none','domain');
         my %clonetitles = (          my %clonetitles = &Apache::lonlocal::texthash (
                              none     => 'No additional course requesters',                               none     => 'No additional course requesters',
                              domain   => "Any course requester in course's domain",                               domain   => "Any course requester in course's domain",
                              instcode => 'Course requests for official courses ...',                               instcode => 'Course requests for official courses ...',
Line 7203  sub print_wafproxy { Line 7197  sub print_wafproxy {
                     if (ref($settings->{'alias'}) eq 'HASH') {                      if (ref($settings->{'alias'}) eq 'HASH') {
                         $aliases{$dom} = $settings->{'alias'};                          $aliases{$dom} = $settings->{'alias'};
                     }                      }
                     foreach my $item ('ipheader','trusted','exempt') {                      foreach my $item ('ipheader','trusted','vpnint','vpnext') {
                         $values{$dom}{$item} = $settings->{$item};                          $values{$dom}{$item} = $settings->{$item};
                     }                      }
                 }                  }
Line 7218  sub print_wafproxy { Line 7212  sub print_wafproxy {
             if (ref($config{$domain}) eq 'HASH') {              if (ref($config{$domain}) eq 'HASH') {
                 if (ref($config{$domain}{'wafproxy'}) eq 'HASH') {                  if (ref($config{$domain}{'wafproxy'}) eq 'HASH') {
                     $aliases{$domain} = $config{$domain}{'wafproxy'}{'alias'};                      $aliases{$domain} = $config{$domain}{'wafproxy'}{'alias'};
                     foreach my $item ('ipheader','trusted','exempt') {                      foreach my $item ('ipheader','trusted','vpnint','vpnext') {
                         $values{$domain}{$item} = $config{$domain}{'wafproxy'}{$item};                          $values{$domain}{$item} = $config{$domain}{'wafproxy'}{$item};
                     }                      }
                 }                  }
Line 7268  sub print_wafproxy { Line 7262  sub print_wafproxy {
                           &mt('Format for comma separated IP blocks').':<br />'.                            &mt('Format for comma separated IP blocks').':<br />'.
                           &mt('A.B.C.D/N or A.B.C.D - E.F.G.H').'</td>'.                            &mt('A.B.C.D/N or A.B.C.D - E.F.G.H').'</td>'.
                           '<td class="LC_left_item"><table>';                            '<td class="LC_left_item"><table>';
             foreach my $item ('ipheader','trusted','exempt') {              foreach my $item ('ipheader','trusted','vpnint','vpnext') {
                 $datatable .= '<tr>'.                  $datatable .= '<tr>'.
                               '<td valign="top">'.$lt{$item}.':&nbsp;';                                '<td valign="top">'.$lt{$item}.':&nbsp;';
                 if ($item eq 'ipheader') {                  if ($item eq 'ipheader') {
Line 7290  sub print_wafproxy { Line 7284  sub print_wafproxy {
                 $datatable .= '<tr'.$css_class.'>'.                  $datatable .= '<tr'.$css_class.'>'.
                               '<td class="LC_left_item">'.&mt('Domain: [_1]',$domain).'</td>'.                                '<td class="LC_left_item">'.&mt('Domain: [_1]',$domain).'</td>'.
                               '<td class="LC_left_item"><table>';                                '<td class="LC_left_item"><table>';
                 foreach my $item ('ipheader','trusted','exempt') {                  foreach my $item ('ipheader','trusted','vpnint','vpnext') {
                     my $showval = &mt('None');                      my $showval = &mt('None');
                     if ($values{$domain}{$item}) {                      if ($values{$domain}{$item}) {
                         $showval = $values{$domain}{$item};                           $showval = $values{$domain}{$item}; 
Line 7308  sub print_wafproxy { Line 7302  sub print_wafproxy {
   
 sub wafproxy_titles {  sub wafproxy_titles {
     return &Apache::lonlocal::texthash(      return &Apache::lonlocal::texthash(
                exempt => 'Exempt IP range(s)',                 vpnint => 'Internal IP Range(s) for VPN sessions',
                  vpnext => 'IP Range for backend WAF connections',
                trusted => 'Trusted IP range(s)',                 trusted => 'Trusted IP range(s)',
                ipheader => 'Custom request header',                 ipheader => 'Custom request header',
            );             );
Line 8349  sub contact_titles { Line 8344  sub contact_titles {
                    'updatesmail'     => 'E-mail from nightly check of LON-CAPA module integrity/updates',                     'updatesmail'     => 'E-mail from nightly check of LON-CAPA module integrity/updates',
                    'idconflictsmail' => 'E-mail from bi-nightly check for multiple users sharing same student/employee ID',                     'idconflictsmail' => 'E-mail from bi-nightly check for multiple users sharing same student/employee ID',
                    'hostipmail'      => 'E-mail from nightly check of hostname/IP network changes',                     'hostipmail'      => 'E-mail from nightly check of hostname/IP network changes',
                    'errorthreshold'  => 'Error/warning threshold for status e-mail',                     'errorthreshold'  => 'Error count threshold for status e-mail to admin(s)',
                    'errorsysmail'    => 'Error threshold for e-mail to core group',                     'errorsysmail'    => 'Error count threshold for e-mail to developer group',
                    'errorweights'    => 'Weights used to compute error count',                     'errorweights'    => 'Weights used to compute error count',
                    'errorexcluded'   => 'Servers with unsent updates excluded from count',                     'errorexcluded'   => 'Servers with unsent updates excluded from count',
                  );                   );
Line 9400  sub print_defaults { Line 9395  sub print_defaults {
                     $datatable .= '</select>&nbsp;'.&mt('Internal ID:').'&nbsp;<b>'.$item.'</b>&nbsp;'.                      $datatable .= '</select>&nbsp;'.&mt('Internal ID:').'&nbsp;<b>'.$item.'</b>&nbsp;'.
                                   '<input type="checkbox" name="inststatus_delete" value="'.$item.'" />'.                                    '<input type="checkbox" name="inststatus_delete" value="'.$item.'" />'.
                                   &mt('delete').'</span></td>'.                                    &mt('delete').'</span></td>'.
                                   '<td class="LC_left_item" colspan="2"><span class="LC_nobreak">'.&mt('Name displayed:').                                    '<td class="LC_left_item" colspan="2"><span class="LC_nobreak">'.&mt('Name displayed').':'.
                                   '<input type="text" size="20" name="inststatus_title_'.$item.'" value="'.$title.'" />'.                                    '<input type="text" size="20" name="inststatus_title_'.$item.'" value="'.$title.'" />'.
                                   '</span></td></tr>';                                    '</span></td></tr>';
                 }                  }
Line 9420  sub print_defaults { Line 9415  sub print_defaults {
                               '<input type="text" size="10" name="addinststatus" value="" />'.                                '<input type="text" size="10" name="addinststatus" value="" />'.
                               '&nbsp;'.&mt('(new)').                                '&nbsp;'.&mt('(new)').
                               '</span></td><td class="LC_left_item" colspan="2"><span class="LC_nobreak">'.                                '</span></td><td class="LC_left_item" colspan="2"><span class="LC_nobreak">'.
                               &mt('Name displayed:').                                &mt('Name displayed').':'.
                               '<input type="text" size="20" name="addinststatus_title" value="" /></span></td>'.                                '<input type="text" size="20" name="addinststatus_title" value="" /></span></td>'.
                               '</tr>'."\n";                                '</tr>'."\n";
                 $rownum ++;                  $rownum ++;
Line 10429  ENDSCRIPT Line 10424  ENDSCRIPT
 sub initialize_categories {  sub initialize_categories {
     my ($itemcount) = @_;      my ($itemcount) = @_;
     my ($datatable,$css_class,$chgstr);      my ($datatable,$css_class,$chgstr);
     my %default_names = (      my %default_names = &Apache::lonlocal::texthash (
                       instcode    => 'Official courses (with institutional codes)',                        instcode    => 'Official courses (with institutional codes)',
                       communities => 'Communities',                        communities => 'Communities',
                       placement   => 'Placement Tests',                        placement   => 'Placement Tests',
Line 15204  sub modify_contacts { Line 15199  sub modify_contacts {
                 $contacts_hash{'contacts'}{'lonstatus'}{$item} = \@excluded;                  $contacts_hash{'contacts'}{'lonstatus'}{$item} = \@excluded;
             }              }
         } elsif ($item eq 'weights') {          } elsif ($item eq 'weights') {
             foreach my $type ('E','W','N') {              foreach my $type ('E','W','N','U') {
                 $env{'form.error'.$item.'_'.$type} =~ s/^\s+|\s+$//g;                  $env{'form.error'.$item.'_'.$type} =~ s/^\s+|\s+$//g;
                 if ($env{'form.error'.$item.'_'.$type} =~ /^\d+$/) {                  if ($env{'form.error'.$item.'_'.$type} =~ /^\d+$/) {
                     unless ($env{'form.error'.$item.'_'.$type} == $lonstatus_defs->{$type}) {                      unless ($env{'form.error'.$item.'_'.$type} == $lonstatus_defs->{$type}) {
Line 16371  sub modify_passwords { Line 16366  sub modify_passwords {
                                 $resulttext .= '<li>'.&mt('E-mail address(es) in LON-CAPA used for verification will include: [_1]',join(', ',map { $titles{$_}; } @{$staticdefaults{'resetemail'}})).'</li>';                                  $resulttext .= '<li>'.&mt('E-mail address(es) in LON-CAPA used for verification will include: [_1]',join(', ',map { $titles{$_}; } @{$staticdefaults{'resetemail'}})).'</li>';
                             }                              }
                         } else {                          } else {
                             $resulttext .= '<li>'.&mt('E-mail address(es) in LON-CAPA usedfor verification will include: [_1]',join(', ',map { $titles{$_}; } @{$staticdefaults{'resetemail'}})).'</li>';                              $resulttext .= '<li>'.&mt('E-mail address(es) in LON-CAPA used for verification will include: [_1]',join(', ',map { $titles{$_}; } @{$staticdefaults{'resetemail'}})).'</li>';
                         }                          }
                         if ($confighash{'passwords'}{'resetremove'}) {                          if ($confighash{'passwords'}{'resetremove'}) {
                             $resulttext .= '<li>'.&mt('Preamble to "Forgot Password" web form not shown').'</li>';                              $resulttext .= '<li>'.&mt('Preamble to "Forgot Password" web form not shown').'</li>';

Removed from v.1.375  
changed lines
  Added in v.1.380


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