Diff for /loncom/interface/domainprefs.pm between versions 1.340 and 1.341

version 1.340, 2018/11/06 15:37:37 version 1.341, 2018/11/18 22:50:52
Line 3581  sub print_contacts { Line 3581  sub print_contacts {
             $sysmail = $defaults->{'sysmail'};              $sysmail = $defaults->{'sysmail'};
         }          }
         if (ref($lonstatus{'weights'}) eq 'HASH') {          if (ref($lonstatus{'weights'}) eq 'HASH') {
             foreach my $type ('E','W','N') {              foreach my $type ('E','W','N','U') {
                 if ($lonstatus{'weights'}{$type} =~ /^\d+$/) {                  if ($lonstatus{'weights'}{$type} =~ /^\d+$/) {
                     $weights{$type} = $lonstatus{'weights'}{$type};                      $weights{$type} = $lonstatus{'weights'}{$type};
                 } else {                  } else {
Line 3589  sub print_contacts { Line 3589  sub print_contacts {
                 }                  }
             }              }
         } else {          } else {
             foreach my $type ('E','W','N') {              foreach my $type ('E','W','N','U') {
                 $weights{$type} = $defaults->{$type};                  $weights{$type} = $defaults->{$type};
             }              }
         }          }
Line 3610  sub print_contacts { Line 3610  sub print_contacts {
                       '<td class="LC_left_item">'.                        '<td class="LC_left_item">'.
                       '<span class="LC_nobreak">'.$titles->{'errorweights'}.                        '<span class="LC_nobreak">'.$titles->{'errorweights'}.
                       '</span></td><td class="LC_left_item"><table><tr>';                        '</span></td><td class="LC_left_item"><table><tr>';
         foreach my $type ('E','W','N') {          foreach my $type ('E','W','N','U') {
             $datatable .= '<td>'.$names->{$type}.'<br />'.              $datatable .= '<td>'.$names->{$type}.'<br />'.
                           '<input type="text" name="errorweights_'.$type.'" value="'.                            '<input type="text" name="errorweights_'.$type.'" value="'.
                           $weights{$type}.'" size="5" /></td>';                            $weights{$type}.'" size="5" /></td>';
Line 13019  sub modify_contacts { Line 13019  sub modify_contacts {
                     if ((ref($contacts_hash{contacts}{lonstatus}) eq 'HASH') &&                      if ((ref($contacts_hash{contacts}{lonstatus}) eq 'HASH') &&
                         (ref($contacts_hash{contacts}{lonstatus}{$key}) eq 'HASH')) {                          (ref($contacts_hash{contacts}{lonstatus}{$key}) eq 'HASH')) {
                         if (ref($currsetting{'lonstatus'}{$key}) eq 'HASH') {                          if (ref($currsetting{'lonstatus'}{$key}) eq 'HASH') {
                             foreach my $type ('E','W','N') {                              foreach my $type ('E','W','N','U') {
                                 unless ($contacts_hash{contacts}{lonstatus}{$key}{$type} eq                                  unless ($contacts_hash{contacts}{lonstatus}{$key}{$type} eq
                                         $currsetting{'lonstatus'}{$key}{$type}) {                                          $currsetting{'lonstatus'}{$key}{$type}) {
                                     push(@{$changes{'lonstatus'}},$key);                                      push(@{$changes{'lonstatus'}},$key);
Line 13027  sub modify_contacts { Line 13027  sub modify_contacts {
                                 }                                  }
                             }                              }
                         } else {                          } else {
                             foreach my $type ('E','W','N') {                              foreach my $type ('E','W','N','U') {
                                 if ($contacts_hash{contacts}{lonstatus}{$key}{$type} ne '') {                                  if ($contacts_hash{contacts}{lonstatus}{$key}{$type} ne '') {
                                     push(@{$changes{'lonstatus'}},$key);                                      push(@{$changes{'lonstatus'}},$key);
                                     last;                                      last;
Line 13035  sub modify_contacts { Line 13035  sub modify_contacts {
                             }                              }
                         }                          }
                     } elsif (ref($currsetting{'lonstatus'}{$key}) eq 'HASH') {                      } elsif (ref($currsetting{'lonstatus'}{$key}) eq 'HASH') {
                         foreach my $type ('E','W','N') {                          foreach my $type ('E','W','N','U') {
                             if ($currsetting{'lonstatus'}{$key}{$type} ne '') {                              if ($currsetting{'lonstatus'}{$key}{$type} ne '') {
                                 push(@{$changes{'lonstatus'}},$key);                                  push(@{$changes{'lonstatus'}},$key);
                                 last;                                  last;
Line 13270  sub modify_contacts { Line 13270  sub modify_contacts {
                 $defval{'threshold'} = $lonstatus_defs->{'threshold'};                  $defval{'threshold'} = $lonstatus_defs->{'threshold'};
                 $defval{'sysmail'} = $lonstatus_defs->{'sysmail'};                  $defval{'sysmail'} = $lonstatus_defs->{'sysmail'};
                 $defval{'weights'} =                  $defval{'weights'} =
                     join(', ',map { $lonstatus_names->{$_}.'='.$lonstatus_defs->{$_}; } ('E','W','N'));                      join(', ',map { $lonstatus_names->{$_}.'='.$lonstatus_defs->{$_}; } ('E','W','N','U'));
                 $defval{'excluded'} = &mt('None');                  $defval{'excluded'} = &mt('None');
                 if (ref($contacts_hash{'contacts'}{'lonstatus'}) eq 'HASH') {                  if (ref($contacts_hash{'contacts'}{'lonstatus'}) eq 'HASH') {
                     foreach my $item ('threshold','sysmail','weights','excluded') {                      foreach my $item ('threshold','sysmail','weights','excluded') {
Line 13279  sub modify_contacts { Line 13279  sub modify_contacts {
                                 $shown{$item} = $contacts_hash{'contacts'}{'lonstatus'}{$item};                                  $shown{$item} = $contacts_hash{'contacts'}{'lonstatus'}{$item};
                             } elsif ($item eq 'weights') {                              } elsif ($item eq 'weights') {
                                 if (ref($contacts_hash{'contacts'}{'lonstatus'}{$item}) eq 'HASH') {                                  if (ref($contacts_hash{'contacts'}{'lonstatus'}{$item}) eq 'HASH') {
                                     foreach my $type ('E','W','N') {                                      foreach my $type ('E','W','N','U') {
                                         $shown{$item} .= $lonstatus_names->{$type}.'=';                                          $shown{$item} .= $lonstatus_names->{$type}.'=';
                                         if (exists($contacts_hash{'contacts'}{'lonstatus'}{$item}{$type})) {                                          if (exists($contacts_hash{'contacts'}{'lonstatus'}{$item}{$type})) {
                                             $shown{$item} .= $contacts_hash{'contacts'}{'lonstatus'}{$item}{$type};                                              $shown{$item} .= $contacts_hash{'contacts'}{'lonstatus'}{$item}{$type};

Removed from v.1.340  
changed lines
  Added in v.1.341


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