Diff for /loncom/interface/domainprefs.pm between versions 1.407 and 1.417

version 1.407, 2022/02/16 04:33:43 version 1.417, 2022/11/17 13:12:40
Line 327  sub handler { Line 327  sub handler {
                       header => [{col1 => 'Setting',                        header => [{col1 => 'Setting',
                                   col2 => 'Value'},                                    col2 => 'Value'},
                                  {col1 => 'Institutional user types',                                   {col1 => 'Institutional user types',
                                   col2 => 'Name displayed'}],                                    col2 => 'Name displayed'},
                                    {col1 => 'Mapping for missing usernames via standard log-in',
                                     col2 => 'Rules in use'}],
                       print => \&print_defaults,                        print => \&print_defaults,
                       modify => \&modify_defaults,                        modify => \&modify_defaults,
                     },                      },
Line 357  sub handler { Line 359  sub handler {
                       modify => \&modify_passwords,                        modify => \&modify_passwords,
                     },                      },
         'quotas' =>           'quotas' => 
                     { text => 'Blogs, personal web pages, webDAV/quotas, portfolios',                      { text => 'Blogs, personal pages/timezones, webDAV/quotas, portfolio',
                       help => 'Domain_Configuration_Quotas',                        help => 'Domain_Configuration_Quotas',
                       header => [{col1 => 'User affiliation',                        header => [{col1 => 'User affiliation',
                                   col2 => 'Available tools',                                    col2 => 'Available tools',
Line 983  sub print_config_box { Line 985  sub print_config_box {
         if (($action eq 'autoupdate') || ($action eq 'usercreation') ||          if (($action eq 'autoupdate') || ($action eq 'usercreation') ||
             ($action eq 'selfcreation') || ($action eq 'selfenrollment') ||              ($action eq 'selfcreation') || ($action eq 'selfenrollment') ||
             ($action eq 'usersessions') || ($action eq 'coursecategories') ||               ($action eq 'usersessions') || ($action eq 'coursecategories') || 
             ($action eq 'trust') || ($action eq 'contacts') ||              ($action eq 'trust') || ($action eq 'contacts') || ($action eq 'defaults') ||
             ($action eq 'privacy') || ($action eq 'passwords') || ($action eq 'lti')) {              ($action eq 'privacy') || ($action eq 'passwords') || ($action eq 'lti')) {
             if ($action eq 'coursecategories') {              if ($action eq 'coursecategories') {
                 $output .= &print_coursecategories('middle',$dom,$item,$settings,\$rowtotal);                  $output .= &print_coursecategories('middle',$dom,$item,$settings,\$rowtotal);
Line 1071  sub print_config_box { Line 1073  sub print_config_box {
             }              }
             $rowtotal ++;              $rowtotal ++;
         } elsif (($action eq 'usermodification') || ($action eq 'coursedefaults') ||          } elsif (($action eq 'usermodification') || ($action eq 'coursedefaults') ||
                  ($action eq 'defaults') || ($action eq 'directorysrch') ||                   ($action eq 'directorysrch') || ($action eq 'helpsettings') ||
                  ($action eq 'helpsettings') || ($action eq 'wafproxy')) {                   ($action eq 'wafproxy')) {
             $output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal);              $output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal);
         } elsif ($action eq 'scantron') {          } elsif ($action eq 'scantron') {
             $output .= $item->{'print'}->($r,'bottom',$dom,$confname,$settings,\$rowtotal);              $output .= $item->{'print'}->($r,'bottom',$dom,$confname,$settings,\$rowtotal);
Line 1626  sub print_login { Line 1628  sub print_login {
                       '<table><tr><th>'.$choices{'hostid'}.'</th>'.                        '<table><tr><th>'.$choices{'hostid'}.'</th>'.
                       '<th>'.$choices{'samllanding'}.'</th>'.                        '<th>'.$choices{'samllanding'}.'</th>'.
                       '<th>'.$choices{'samloptions'}.'</th></tr>'."\n";                        '<th>'.$choices{'samloptions'}.'</th></tr>'."\n";
         my (%saml,%samltext,%samlimg,%samlalt,%samlurl,%samltitle,%samlnotsso,%styleon,%styleoff);          my (%saml,%samltext,%samlimg,%samlalt,%samlurl,%samltitle,%samlwindow,%samlnotsso,%styleon,%styleoff);
         foreach my $lonhost (keys(%domservers)) {          foreach my $lonhost (keys(%domservers)) {
             $samlurl{$lonhost} = '/adm/sso';              $samlurl{$lonhost} = '/adm/sso';
             $styleon{$lonhost} = 'display:none';              $styleon{$lonhost} = 'display:none';
             $styleoff{$lonhost} = '';              $styleoff{$lonhost} = '';
         }          }
         if (ref($settings->{'saml'}) eq 'HASH') {          if ((ref($settings) eq 'HASH') && (ref($settings->{'saml'}) eq 'HASH')) {
             foreach my $lonhost (keys(%{$settings->{'saml'}})) {              foreach my $lonhost (keys(%{$settings->{'saml'}})) {
                 if (ref($settings->{'saml'}{$lonhost}) eq 'HASH') {                  if (ref($settings->{'saml'}{$lonhost}) eq 'HASH') {
                     $saml{$lonhost} = 1;                      $saml{$lonhost} = 1;
Line 1641  sub print_login { Line 1643  sub print_login {
                     $samlalt{$lonhost} = $settings->{'saml'}{$lonhost}{'alt'};                      $samlalt{$lonhost} = $settings->{'saml'}{$lonhost}{'alt'};
                     $samlurl{$lonhost} = $settings->{'saml'}{$lonhost}{'url'};                      $samlurl{$lonhost} = $settings->{'saml'}{$lonhost}{'url'};
                     $samltitle{$lonhost} = $settings->{'saml'}{$lonhost}{'title'};                      $samltitle{$lonhost} = $settings->{'saml'}{$lonhost}{'title'};
                       $samlwindow{$lonhost} = $settings->{'saml'}{$lonhost}{'window'};
                     $samlnotsso{$lonhost} = $settings->{'saml'}{$lonhost}{'notsso'};                      $samlnotsso{$lonhost} = $settings->{'saml'}{$lonhost}{'notsso'};
                     $styleon{$lonhost} = '';                      $styleon{$lonhost} = '';
                     $styleoff{$lonhost} = 'display:none';                      $styleoff{$lonhost} = 'display:none';
Line 1658  sub print_login { Line 1661  sub print_login {
                 $samlon = $samloff;                  $samlon = $samloff;
                 $samloff = ' ';                  $samloff = ' ';
             }              }
               my $samlwinon = '';
               my $samlwinoff = ' checked="checked"';
               if ($samlwindow{$lonhost}) {
                   $samlwinon = $samlwinoff;
                   $samlwinoff = '';
               }
             my $css_class = $itemcount%2?' class="LC_odd_row"':'';              my $css_class = $itemcount%2?' class="LC_odd_row"':'';
             $datatable .= '<tr'.$css_class.'><td><span class="LC_nobreak">'.$domservers{$lonhost}.'</span></td>'.              $datatable .= '<tr'.$css_class.'><td><span class="LC_nobreak">'.$domservers{$lonhost}.'</span></td>'.
                           '<td><span class="LC_nobreak"><label><input type="radio" name="saml_'.$lonhost.'"'.$samloff.                            '<td><span class="LC_nobreak"><label><input type="radio" name="saml_'.$lonhost.'"'.$samloff.
Line 1667  sub print_login { Line 1676  sub print_login {
                           'onclick="toggleSamlOptions(this.form,'."'$lonhost'".');" value="1" />'.                            'onclick="toggleSamlOptions(this.form,'."'$lonhost'".');" value="1" />'.
                           &mt('Yes').'</label></span></td>'.                            &mt('Yes').'</label></span></td>'.
                           '<td id="samloptionson_'.$lonhost.'" style="'.$styleon{$lonhost}.'" width="100%">'.                            '<td id="samloptionson_'.$lonhost.'" style="'.$styleon{$lonhost}.'" width="100%">'.
                           '<table><tr><th colspan="5" align="center">'.&mt('SSO').'</th><th align="center">'.                            '<table width="100%"><tr><th colspan="3" align="center">'.&mt('SSO').'</th></tr>'.
                           '<span class="LC_nobreak">'.&mt('Non-SSO').'</span></th></tr>'.  
                           '<tr><th>'.&mt('Text').'</th><th>'.&mt('Image').'</th>'.                            '<tr><th>'.&mt('Text').'</th><th>'.&mt('Image').'</th>'.
                           '<th>'.&mt('Alt Text').'</th><th>'.&mt('URL').'</th>'.                            '<th>'.&mt('Alt Text').'</th></tr>'.
                           '<th>'.&mt('Tool Tip').'</th><th>'.&mt('Text').'</th></tr>'.                            '<tr'.$css_class.'><td><input type="text" name="saml_text_'.$lonhost.'" size="20" value="'.
                           '<tr'.$css_class.'><td><input type="text" name="saml_text_'.$lonhost.'" size="8" value="'.  
                           $samltext{$lonhost}.'" /></td><td>';                            $samltext{$lonhost}.'" /></td><td>';
             if ($samlimg{$lonhost}) {              if ($samlimg{$lonhost}) {
                 $datatable .= '<img src="'.$samlimg{$lonhost}.'" /><br />'.                  $datatable .= '<img src="'.$samlimg{$lonhost}.'" /><br />'.
Line 1689  sub print_login { Line 1696  sub print_login {
                 $datatable .= '<input type="file" name="saml_img_'.$lonhost.'" />';                  $datatable .= '<input type="file" name="saml_img_'.$lonhost.'" />';
             }              }
             $datatable .= '</td>'.              $datatable .= '</td>'.
                           '<td><input type="text" name="saml_alt_'.$lonhost.'" size="20" '.                            '<td><input type="text" name="saml_alt_'.$lonhost.'" size="25" '.
                           'value="'.$samlalt{$lonhost}.'" /></td>'.                            'value="'.$samlalt{$lonhost}.'" /></td></tr></table><br />'.
                           '<td><input type="text" name="saml_url_'.$lonhost.'" size="8" '.                            '<table width="100%"><tr><th colspan="3" align="center">'.&mt('SSO').'</th><th align="center">'.
                             '<span class="LC_nobreak">'.&mt('Non-SSO').'</span></th></tr>'.
                             '<tr><th>'.&mt('URL').'</th><th>'.&mt('Tool Tip').'</th>'.
                             '<th>'.&mt('Pop-up if iframe').'</th><th>'.&mt('Text').'</th></tr>'.
                             '<tr'.$css_class.'>'.
                             '<td><input type="text" name="saml_url_'.$lonhost.'" size="30" '.
                           'value="'.$samlurl{$lonhost}.'" /></td>'.                            'value="'.$samlurl{$lonhost}.'" /></td>'.
                           '<td><textarea name="saml_title_'.$lonhost.'" rows="3" cols="15">'.                            '<td><textarea name="saml_title_'.$lonhost.'" rows="3" cols="20">'.
                           $samltitle{$lonhost}.'</textarea></td>'.                            $samltitle{$lonhost}.'</textarea></td>'.
                           '<td><input type="text" name="saml_notsso_'.$lonhost.'" size="8" '.                            '<td><label><input type="radio" name="saml_window_'.$lonhost.'" value=""'.$samlwinoff.'>'.
                             &mt('No').'</label>'.('&nbsp;'x2).'<label><input type="radio" '.
                             'name="saml_window_'.$lonhost.'" value="1"'.$samlwinon.'>'.&mt('Yes').'</label></td>'.
                             '<td><input type="text" name="saml_notsso_'.$lonhost.'" size="12" '.
                           'value="'.$samlnotsso{$lonhost}.'" /></td></tr>'.                            'value="'.$samlnotsso{$lonhost}.'" /></td></tr>'.
                           '</table></td>'.                            '</table></td>'.
                           '<td id="samloptionsoff_'.$lonhost.'" style="'.$styleoff{$lonhost}.'" width="100%">&nbsp;</td></tr>';                            '<td id="samloptionsoff_'.$lonhost.'" style="'.$styleoff{$lonhost}.'" width="100%">&nbsp;</td></tr>';
Line 2368  sub print_quotas { Line 2383  sub print_quotas {
         @options = ('norequest','approval','automatic');          @options = ('norequest','approval','automatic');
         %titles = &authorrequest_titles();          %titles = &authorrequest_titles();
     } else {      } else {
         @usertools = ('aboutme','blog','webdav','portfolio');          @usertools = ('aboutme','blog','webdav','portfolio','timezone');
         %titles = &tool_titles();          %titles = &tool_titles();
     }      }
     if (ref($types) eq 'ARRAY') {      if (ref($types) eq 'ARRAY') {
Line 2472  sub print_quotas { Line 2487  sub print_quotas {
                         }                          }
                     } else {                      } else {
                         my $checked = 'checked="checked" ';                          my $checked = 'checked="checked" ';
                           if ($item eq 'timezone') {
                               $checked = '';
                           }
                         if (ref($settings) eq 'HASH') {                          if (ref($settings) eq 'HASH') {
                             if (ref($settings->{$item}) eq 'HASH') {                              if (ref($settings->{$item}) eq 'HASH') {
                                 if ($settings->{$item}->{$type} == 0) {                                  if (!$settings->{$item}->{$type}) {
                                     $checked = '';                                      $checked = '';
                                 } elsif ($settings->{$item}->{$type} == 1) {                                  } elsif ($settings->{$item}->{$type} == 1) {
                                     $checked =  'checked="checked" ';                                      $checked =  'checked="checked" ';
Line 6565  sub print_lti { Line 6583  sub print_lti {
                           '<label><input type="radio" value="1" name="ltisec_changeprivkey_'.$hostid.'" onclick="javascript:togglePrivKey(this.form,'."'$hostid'".');" />'.&mt('Yes').                            '<label><input type="radio" value="1" name="ltisec_changeprivkey_'.$hostid.'" onclick="javascript:togglePrivKey(this.form,'."'$hostid'".');" />'.&mt('Yes').
                           '</label>&nbsp;&nbsp;</span><div id="ltisec_divchgprivkey_'.$hostid.'" style="display:none" />'.                            '</label>&nbsp;&nbsp;</span><div id="ltisec_divchgprivkey_'.$hostid.'" style="display:none" />'.
                           '<span class="LC_nobreak">'.&mt('New Key').':'.                            '<span class="LC_nobreak">'.&mt('New Key').':'.
                           '<input type="password" size="20" name="ltisec_privkey_'.$hostid.'" value="" autocomplete="off" />'.                            '<input type="password" size="20" name="ltisec_privkey_'.$hostid.'" value="" autocomplete="new-password" />'.
                           '<label><input type="checkbox" name="visible" onclick="if (this.checked) { this.form.ltisec_privkey_'.$hostid.'.type='."'text'".' } else { this.form.ltisec_privkey_'.$hostid.'.type='."'password'".' }" />'.&mt('Visible input').'</label>'.                            '<label><input type="checkbox" name="visible" onclick="if (this.checked) { this.form.ltisec_privkey_'.$hostid.'.type='."'text'".' } else { this.form.ltisec_privkey_'.$hostid.'.type='."'password'".' }" />'.&mt('Visible input').'</label>'.
                           '</span></div>';                            '</span></div>';
             } else {              } else {
                 $extra .= '<span class="LC_nobreak">'.&mt('Encryption Key').':'.                  $extra .= '<span class="LC_nobreak">'.&mt('Encryption Key').':'.
                           '<input type="password" size="20" name="ltisec_privkey_'.$hostid.'" value="" autocomplete="off" />'.                            '<input type="password" size="20" name="ltisec_privkey_'.$hostid.'" value="" autocomplete="new-password" />'.
                           '<label><input type="checkbox" name="visible" onclick="if (this.checked) { this.form.ltisec_privkey_'.$hostid.'.type='."'text'".' } else { this.form.ltisec_privkey_'.$hostid.'.type='."'password'".' }" />'.&mt('Visible input').'</label>';                            '<label><input type="checkbox" name="visible" onclick="if (this.checked) { this.form.ltisec_privkey_'.$hostid.'.type='."'text'".' } else { this.form.ltisec_privkey_'.$hostid.'.type='."'password'".' }" />'.&mt('Visible input').'</label>';
             }              }
             $extra .= '</fieldset>';              $extra .= '</fieldset>';
Line 7696  sub print_privacy { Line 7714  sub print_privacy {
     my ($position,$dom,$settings,$rowtotal) = @_;      my ($position,$dom,$settings,$rowtotal) = @_;
     my ($datatable,$css_class,$numinrow,@items,%names,$othertitle,$usertypes,$types);      my ($datatable,$css_class,$numinrow,@items,%names,$othertitle,$usertypes,$types);
     my $itemcount = 0;      my $itemcount = 0;
     unless ($position eq 'top') {      if ($position eq 'top') {
           $numinrow = 2;
       } else {
         @items = ('domain','author','course','community');          @items = ('domain','author','course','community');
         %names = &Apache::lonlocal::texthash (          %names = &Apache::lonlocal::texthash (
                      domain => 'Assigned domain role(s)',                       domain => 'Assigned domain role(s)',
                      author => 'Assigned co-author role(s)',                       author => 'Assigned co-author role(s)',
                      course => 'Assigned course role(s)',                       course => 'Assigned course role(s)',
                      community => 'Assigned community role',                       community => 'Assigned community role(s)',
                  );                   );
         $numinrow = 4;          $numinrow = 4;
         ($othertitle,$usertypes,$types) =          ($othertitle,$usertypes,$types) =
Line 7721  sub print_privacy { Line 7741  sub print_privacy {
                 auto   => 'Unrestricted',                  auto   => 'Unrestricted',
                 instdom => 'Other domain shares institution/provider',                  instdom => 'Other domain shares institution/provider',
                 extdom => 'Other domain has different institution/provider',                  extdom => 'Other domain has different institution/provider',
                   notify => 'Receive notification of role requests requiring DC authorization',
             );              );
             my %names = &Apache::lonlocal::texthash (              my %names = &Apache::lonlocal::texthash (
                 domain => 'Domain role',                  domain => 'Domain role',
Line 7772  sub print_privacy { Line 7793  sub print_privacy {
                 $datatable .= '</td></tr>';                  $datatable .= '</td></tr>';
                 $itemcount ++;                  $itemcount ++;
             }              }
               $css_class = $itemcount%2?' class="LC_odd_row"':'';
               $datatable .= '<tr'.$css_class.'><td>'.$titles{'notify'}.'</td>'.
                             '<td class="LC_left_item">';
               if ((@instdoms > 1) || (keys(%by_location) > 0)) {
                   my %curr;
                   if (ref($settings) eq 'HASH') {
                       if ($settings->{'notify'} ne '') {
                           map {$curr{$_}=1;} split(/,/,$settings->{'notify'});
                       }
                   }
                   $css_class = $itemcount%2?' class="LC_odd_row"':'';
                   my ($numdc,$table,$rows) = &active_dc_picker($dom,$numinrow,'checkbox',
                                                                'privacy_notify',%curr);
                   if ($numdc > 0) {
                       $datatable .= $table;
                   } else {
                       $datatable .= &mt('There are no active Domain Coordinators');
                   }
               } else {
                   $datatable .= &mt('Nothing to set here, as there are no other domains');
               }
               $datatable .='</td></tr>';
         } elsif ($position eq 'middle') {          } elsif ($position eq 'middle') {
             if ((@instdoms > 1) || (keys(%by_location) > 0)) {              if ((@instdoms > 1) || (keys(%by_location) > 0)) {
                 if ((ref($types) eq 'ARRAY') && (ref($usertypes) eq 'HASH')) {                  if ((ref($types) eq 'ARRAY') && (ref($usertypes) eq 'HASH')) {
Line 9686  sub tool_titles { Line 9729  sub tool_titles {
                      blog       => 'Blog',                       blog       => 'Blog',
                      webdav     => 'WebDAV',                       webdav     => 'WebDAV',
                      portfolio  => 'Portfolio',                       portfolio  => 'Portfolio',
                        timezone   => 'Can set time zone',
                      official   => 'Official courses (with institutional codes)',                       official   => 'Official courses (with institutional codes)',
                      unofficial => 'Unofficial courses',                       unofficial => 'Unofficial courses',
                      community  => 'Communities',                       community  => 'Communities',
Line 10467  sub user_formats_row { Line 10511  sub user_formats_row {
                    'username' => 'new usernames',                     'username' => 'new usernames',
                    'id'       => 'IDs',                     'id'       => 'IDs',
                );                 );
     unless ($type eq 'email') {      unless (($type eq 'email') || ($type eq 'unamemap')) {
         my $css_class = $rowcount%2?' class="LC_odd_row"':'';          my $css_class = $rowcount%2?' class="LC_odd_row"':'';
         $output = '<tr '.$css_class.'>'.          $output = '<tr '.$css_class.'>'.
                   '<td><span class="LC_nobreak">'.                    '<td><span class="LC_nobreak">'.
Line 10522  sub user_formats_row { Line 10566  sub user_formats_row {
     } elsif ($colsleft == 1) {      } elsif ($colsleft == 1) {
         $output .= '<td class="LC_left_item">&nbsp;</td>';          $output .= '<td class="LC_left_item">&nbsp;</td>';
     }      }
     $output .= '</tr></table>';      $output .= '</tr>';
     unless ($type eq 'email') {      unless (($type eq 'email') || ($type eq 'unamemap')) {
         $output .= '</td></tr>';          $output .= '</table></td></tr>';
     }      }
     return $output;      return $output;
 }  }
Line 10656  sub print_defaults { Line 10700  sub print_defaults {
             } elsif ($item eq 'lang_def') {              } elsif ($item eq 'lang_def') {
                 my $includeempty = 1;                  my $includeempty = 1;
                 $datatable .= &Apache::loncommon::select_language($item,$defaults{$item},$includeempty);                  $datatable .= &Apache::loncommon::select_language($item,$defaults{$item},$includeempty);
             } else {              } elsif ($item eq 'portal_def') {
                 my $size;  
                 if ($item eq 'portal_def') {  
                     $size = ' size="25"';  
                 }  
                 $datatable .= '<input type="text" name="'.$item.'" value="'.                  $datatable .= '<input type="text" name="'.$item.'" value="'.
                               $defaults{$item}.'"'.$size.' />';                                $defaults{$item}.'" size="25" onkeyup="portalExtras(this);" />';
                   my $portalsty = 'none';
                   if ($defaults{$item}) {
                       $portalsty = 'block';
                   }
                   foreach my $field ('email','web') {
                       my $checkedoff = ' checked="checked"';
                       my $checkedon;
                       if ($defaults{$item.'_'.$field}) {
                           $checkedon = $checkedoff;
                           $checkedoff = '';
                       } 
                       $datatable .= '<div id="'.$item.'_'.$field.'_div" style="display:'.$portalsty.'">'.
                                 '<span class="LC_nobreak">'.$titles->{$field}.'&nbsp;'.
                                 '<label><input type="radio" name="'.$item.'_'.$field.'" value="1"'.$checkedon.'/>'.&mt('Yes').'</label>'.
                                 ('&nbsp;'x2).
                                 '<label><input type="radio" name="'.$item.'_'.$field.'" value="0"'.$checkedoff.'/>'.&mt('No').'</label>'.
                                 '</div>';
                   }
               } else {
                   $datatable .= '<input type="text" name="'.$item.'" value="'.$defaults{$item}.'" />';
             }              }
             $datatable .= '</td></tr>';              $datatable .= '</td></tr>';
             $rownum ++;              $rownum ++;
         }          }
     } else {      } elsif ($position eq 'middle') {
         my %defaults;          my %defaults;
         if (ref($settings) eq 'HASH') {          if (ref($settings) eq 'HASH') {
             if ((ref($settings->{'inststatusorder'}) eq 'ARRAY') && (ref($settings->{'inststatustypes'}) eq 'HASH')) {              if ((ref($settings->{'inststatusorder'}) eq 'ARRAY') && (ref($settings->{'inststatustypes'}) eq 'HASH')) {
Line 10717  sub print_defaults { Line 10777  sub print_defaults {
                 $rownum ++;                  $rownum ++;
             }              }
         }          }
       } else {
           my ($unamemaprules,$ruleorder) =
               &Apache::lonnet::inst_userrules($dom,'unamemap');
           $css_class = $rownum%2?' class="LC_odd_row"':'';
           if ((ref($unamemaprules) eq 'HASH') && (ref($ruleorder) eq 'ARRAY')) {
               my $numinrow = 2;
               $datatable .= '<tr'.$css_class.'><td>'.&mt('Available conversions').'</td><td><table>'.
                             &user_formats_row('unamemap',$settings,$unamemaprules,
                                               $ruleorder,$numinrow).
                             '</table></td></tr>';
           }
           if ($datatable eq '') {
               $datatable .= '<tr'.$css_class.'><td colspan="2">'.
                             &mt('No rules set for domain in customized localenroll.pm').
                             '</td></tr>';
           }
     }      }
     $$rowtotal += $rownum;      $$rowtotal += $rownum;
     return $datatable;      return $datatable;
Line 10742  sub defaults_titles { Line 10818  sub defaults_titles {
                    'timezone_def'  => 'Default timezone',                     'timezone_def'  => 'Default timezone',
                    'datelocale_def' => 'Default locale for dates',                     'datelocale_def' => 'Default locale for dates',
                    'portal_def'     => 'Portal/Default URL',                     'portal_def'     => 'Portal/Default URL',
                      'email'          => 'Email links use portal URL',
                      'web'            => 'Public web links use portal URL',
                    'intauth_cost'   => 'Encryption cost for bcrypt (positive integer)',                     'intauth_cost'   => 'Encryption cost for bcrypt (positive integer)',
                    'intauth_check'  => 'Check bcrypt cost if authenticated',                     'intauth_check'  => 'Check bcrypt cost if authenticated',
                    'intauth_switch' => 'Existing crypt-based switched to bcrypt on authentication',                     'intauth_switch' => 'Existing crypt-based switched to bcrypt on authentication',
Line 11456  sub serverstatus_pages { Line 11534  sub serverstatus_pages {
 sub defaults_javascript {  sub defaults_javascript {
     my ($settings) = @_;      my ($settings) = @_;
     return unless (ref($settings) eq 'HASH');      return unless (ref($settings) eq 'HASH');
       my $portal_js = <<"ENDPORTAL";
   
   function portalExtras(caller) {
       var x = caller.value;
       var y = new Array('email','web');
       for (var i=0; i<y.length; i++) { 
           if (document.getElementById('portal_def_'+y[i]+'_div')) {
               var z = document.getElementById('portal_def_'+y[i]+'_div');
               if (x.length > 0) {
                   z.style.display = 'block';
               } else {
                   z.style.display = 'none';
               }
           }
       }
   }
   ENDPORTAL
     if ((ref($settings->{'inststatusorder'}) eq 'ARRAY') && (ref($settings->{'inststatustypes'}) eq 'HASH')) {      if ((ref($settings->{'inststatusorder'}) eq 'ARRAY') && (ref($settings->{'inststatustypes'}) eq 'HASH')) {
         my $maxnum = scalar(@{$settings->{'inststatusorder'}});          my $maxnum = scalar(@{$settings->{'inststatusorder'}});
         if ($maxnum eq '') {          if ($maxnum eq '') {
Line 11509  $jstext Line 11604  $jstext
     return;      return;
 }  }
   
   $portal_js
   
   // ]]>
   </script>
   
   ENDSCRIPT
       } else {
   return <<"ENDSCRIPT";
   <script type="text/javascript">
   // <![CDATA[
   $portal_js
 // ]]>  // ]]>
 </script>  </script>
   
Line 11568  function warnInt$prefix(field) { Line 11674  function warnInt$prefix(field) {
     field.value.replace(/^\s+/,'');      field.value.replace(/^\s+/,'');
     field.value.replace(/\s+\$/,'');      field.value.replace(/\s+\$/,'');
     var regexdigit=/^\\d+\$/;      var regexdigit=/^\\d+\$/;
     if (field.name == '$prefix\_min') {      if (field.name == '${prefix}_min') {
         if (field.value == '') {          if (field.value == '') {
             alert('$intalert{passmin}');              alert('$intalert{passmin}');
             field.value = '$defmin';              field.value = '$defmin';
Line 11588  function warnInt$prefix(field) { Line 11694  function warnInt$prefix(field) {
             field.value = '';              field.value = '';
         }          }
         if (field.value != '') {          if (field.value != '') {
             if (field.name == '$prefix\_expire') {              if (field.name == '${prefix}_expire') {
                 var regexpposnum=/^\\d+(|\\.\\d*)\$/;                   var regexpposnum=/^\\d+(|\\.\\d*)\$/; 
                 if (!regexpposnum.test(field.value)) {                  if (!regexpposnum.test(field.value)) {
                     alert('$intalert{passexp}');                      alert('$intalert{passexp}');
Line 11602  function warnInt$prefix(field) { Line 11708  function warnInt$prefix(field) {
                 }                  }
             } else {              } else {
                 if (!regexdigit.test(field.value)) {                  if (!regexdigit.test(field.value)) {
                     if (field.name == '$prefix\_max') {                      if (field.name == '${prefix}_max') {
                         alert('$intalert{passmax}');                          alert('$intalert{passmax}');
                     } else {                      } else {
                         if (field.name == '$prefix\_numsaved') {                          if (field.name == '${prefix}_numsaved') {
                             alert('$intalert{passnum}');                              alert('$intalert{passnum}');
                         }                          }
                     }                      }
Line 12236  sub modify_login { Line 12342  sub modify_login {
     my ($r,$dom,$confname,$lastactref,%domconfig) = @_;      my ($r,$dom,$confname,$lastactref,%domconfig) = @_;
     my ($resulttext,$errors,$colchgtext,%changes,%colchanges,%newfile,%newurl,      my ($resulttext,$errors,$colchgtext,%changes,%colchanges,%newfile,%newurl,
         %curr_loginvia,%loginhash,@currlangs,@newlangs,$addedfile,%title,@offon,          %curr_loginvia,%loginhash,@currlangs,@newlangs,$addedfile,%title,@offon,
         %currsaml,%saml,%samltext,%samlimg,%samlalt,%samlurl,%samltitle,%samlnotsso);          %currsaml,%saml,%samltext,%samlimg,%samlalt,%samlurl,%samltitle,%samlwindow,%samlnotsso);
     %title = ( coursecatalog => 'Display course catalog',      %title = ( coursecatalog => 'Display course catalog',
                adminmail => 'Display administrator E-mail address',                 adminmail => 'Display administrator E-mail address',
                helpdesk  => 'Display "Contact Helpdesk" link',                 helpdesk  => 'Display "Contact Helpdesk" link',
Line 12260  sub modify_login { Line 12366  sub modify_login {
                     $samlalt{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'alt'};                      $samlalt{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'alt'};
                     $samlimg{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'img'};                      $samlimg{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'img'};
                     $samltitle{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'title'};                      $samltitle{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'title'};
                       $samlwindow{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'window'};
                     $samlnotsso{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'notsso'};                      $samlnotsso{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'notsso'};
                 }                  }
             }              }
Line 12517  sub modify_login { Line 12624  sub modify_login {
             if ($env{'form.saml_img_'.$lonhost.'.filename'}) {              if ($env{'form.saml_img_'.$lonhost.'.filename'}) {
                 push(@newsamlimgs,$lonhost);                  push(@newsamlimgs,$lonhost);
             }              }
             foreach my $item ('text','alt','url','title','notsso') {              foreach my $item ('text','alt','url','title','window','notsso') {
                 $env{'form.saml_'.$item.'_'.$lonhost} =~ s/^\s+|\s+$//g;                  $env{'form.saml_'.$item.'_'.$lonhost} =~ s/^\s+|\s+$//g;
             }              }
             if ($saml{$lonhost}) {              if ($saml{$lonhost}) {
                   if ($env{'form.saml_window_'.$lonhost} ne '1') {
                       $env{'form.saml_window_'.$lonhost} = '';
                   }
                 if (grep(/^\Q$lonhost\E$/,@delsamlimg)) {                  if (grep(/^\Q$lonhost\E$/,@delsamlimg)) {
 #FIXME Need to obsolete published image  #FIXME Need to obsolete published image
                     delete($currsaml{$lonhost}{'img'});                      delete($currsaml{$lonhost}{'img'});
Line 12538  sub modify_login { Line 12648  sub modify_login {
                 if ($env{'form.saml_title_'.$lonhost} ne $samltitle{$lonhost}) {                  if ($env{'form.saml_title_'.$lonhost} ne $samltitle{$lonhost}) {
                     $changes{'saml'}{$lonhost} = 1;                      $changes{'saml'}{$lonhost} = 1;
                 }                  }
                   if ($env{'form.saml_window_'.$lonhost} ne $samlwindow{$lonhost}) {
                       $changes{'saml'}{$lonhost} = 1;
                   }
                 if ($env{'form.saml_notsso_'.$lonhost} ne $samlnotsso{$lonhost}) {                  if ($env{'form.saml_notsso_'.$lonhost} ne $samlnotsso{$lonhost}) {
                     $changes{'saml'}{$lonhost} = 1;                      $changes{'saml'}{$lonhost} = 1;
                 }                  }
             } else {              } else {
                 $changes{'saml'}{$lonhost} = 1;                  $changes{'saml'}{$lonhost} = 1;
             }              }
             foreach my $item ('text','alt','url','title','notsso') {              foreach my $item ('text','alt','url','title','window','notsso') {
                 $currsaml{$lonhost}{$item} = $env{'form.saml_'.$item.'_'.$lonhost};                  $currsaml{$lonhost}{$item} = $env{'form.saml_'.$item.'_'.$lonhost};
             }              }
         } else {          } else {
Line 12745  sub modify_login { Line 12858  sub modify_login {
                                        alt    => 'Alt text for button image',                                         alt    => 'Alt text for button image',
                                        url    => 'SSO URL',                                         url    => 'SSO URL',
                                        title  => 'Tooltip for SSO link',                                         title  => 'Tooltip for SSO link',
                                          window => 'Pop-up window if iframe',
                                        notsso => 'Text for non-SSO log-in',                                         notsso => 'Text for non-SSO log-in',
                                     );                                      );
                         foreach my $lonhost (sort(keys(%{$changes{$item}}))) {                          foreach my $lonhost (sort(keys(%{$changes{$item}}))) {
                             if (ref($currsaml{$lonhost}) eq 'HASH') {                              if (ref($currsaml{$lonhost}) eq 'HASH') {
                                 $resulttext .= '<li>'.&mt("$title{$item} in use for [_1]","<b>$lonhost</b>").                                  $resulttext .= '<li>'.&mt("$title{$item} in use for [_1]","<b>$lonhost</b>").
                                                '<ul>';                                                 '<ul>';
                                 foreach my $key ('text','img','alt','url','title','notsso') {                                  foreach my $key ('text','img','alt','url','title','window','notsso') {
                                     if ($currsaml{$lonhost}{$key} eq '') {                                      if ($currsaml{$lonhost}{$key} eq '') {
                                         $resulttext .= '<li>'.&mt("$notlt{$key} not in use").'</li>';                                          $resulttext .= '<li>'.&mt("$notlt{$key} not in use").'</li>';
                                     } else {                                      } else {
                                         my $value = "'$currsaml{$lonhost}{$key}'";                                          my $value = "'$currsaml{$lonhost}{$key}'";
                                         if ($key eq 'img') {                                          if ($key eq 'img') {
                                             $value = '<img src="'.$currsaml{$lonhost}{$key}.'" />';                                              $value = '<img src="'.$currsaml{$lonhost}{$key}.'" />';
                                           } elsif ($key eq 'window') {
                                               $value = 'On';
                                         }                                          }
                                         $resulttext .= '<li>'.&mt("$notlt{$key} set to: [_1]",                                          $resulttext .= '<li>'.&mt("$notlt{$key} set to: [_1]",
                                                                   $value).'</li>';                                                                    $value).'</li>';
Line 13922  sub modify_quotas { Line 14038  sub modify_quotas {
         @usertools = ('author');          @usertools = ('author');
         %titles = &authorrequest_titles();          %titles = &authorrequest_titles();
     } else {      } else {
         @usertools = ('aboutme','blog','webdav','portfolio');          @usertools = ('aboutme','blog','webdav','portfolio','timezone');
         %titles = &tool_titles();          %titles = &tool_titles();
     }      }
     my %domdefaults = &Apache::lonnet::get_domain_defaults($dom,1);      my %domdefaults = &Apache::lonnet::get_domain_defaults($dom,1);
Line 17859  sub modify_privacy { Line 17975  sub modify_privacy {
                    domain => 'Assigned domain role(s)',                     domain => 'Assigned domain role(s)',
                    author => 'Assigned co-author role(s)',                     author => 'Assigned co-author role(s)',
                    course => 'Assigned course role(s)',                     course => 'Assigned course role(s)',
                    community => 'Assigned community role',                     community => 'Assigned community role(s)',
                 );                  );
     my %roles = &Apache::lonlocal::texthash (      my %roles = &Apache::lonlocal::texthash (
                    domain => 'Domain role',                     domain => 'Domain role',
Line 17878  sub modify_privacy { Line 17994  sub modify_privacy {
                   user     => 'User authorizes',                    user     => 'User authorizes',
                   domain   => 'Domain Coordinator authorizes',                    domain   => 'Domain Coordinator authorizes',
                   auto     => 'Unrestricted',                    auto     => 'Unrestricted',
                     notify   => 'Receive notification of role requests requiring DC authorization',
     );      );
     my %fieldnames = &Apache::lonlocal::texthash (      my %fieldnames = &Apache::lonlocal::texthash (
                         id => 'Student/Employee ID',                          id => 'Student/Employee ID',
Line 17903  sub modify_privacy { Line 18020  sub modify_privacy {
                       );                        );
     foreach my $item (@items) {      foreach my $item (@items) {
         if (@instdoms > 1) {          if (@instdoms > 1) {
             if ($env{'form.privacy_approval_instdom'.$item} =~ /^(none|user|domain|auto)$/) {              if ($env{'form.privacy_approval_instdom_'.$item} =~ /^(none|user|domain|auto)$/) {
                 $privacyhash{'approval'}{'instdom'}{$item} = $env{'form.privacy_approval_instdom_'.$item};                  $privacyhash{'approval'}{'instdom'}{$item} = $env{'form.privacy_approval_instdom_'.$item};
             }              }
             if (ref($current{'approval'}) eq 'HASH') {              if (ref($current{'approval'}) eq 'HASH') {
Line 17995  sub modify_privacy { Line 18112  sub modify_privacy {
                 }                  }
             }              }
         }          }
           my %domcoords = &Apache::lonnet::get_active_domroles($dom,['dc']);
           my %notify;
           foreach my $possdc (&Apache::loncommon::get_env_multiple('form.privacy_notify')) {
               if (exists($domcoords{$possdc})) {
                   $notify{$possdc} = 1;
               }
           }
           my $notify = join(',',sort(keys(%notify)));
           if ($current{'notify'} ne $notify) {
               $changes{'notify'} = 1;
           }
           $privacyhash{'notify'} = $notify;
     }      }
     my %confighash = (      my %confighash = (
                         privacy => \%privacyhash,                          privacy => \%privacyhash,
Line 18003  sub modify_privacy { Line 18132  sub modify_privacy {
     if ($putresult eq 'ok') {      if ($putresult eq 'ok') {
         if (keys(%changes) > 0) {          if (keys(%changes) > 0) {
             $resulttext = &mt('Changes made: ').'<ul>';              $resulttext = &mt('Changes made: ').'<ul>';
             foreach my $key ('approval','othdom','priv','unpriv') {              foreach my $key ('approval','notify','othdom','priv','unpriv') {
                 if ($changes{$key}) {                  if ($changes{$key}) {
                     $resulttext .= '<li>'.$titles{$key}.':<ul>';                      $resulttext .= '<li>'.$titles{$key}.':<ul>';
                     if ($key eq 'approval') {                      if ($key eq 'approval') {
Line 18021  sub modify_privacy { Line 18150  sub modify_privacy {
                             }                              }
                             $resulttext .= '</ul></li>';                              $resulttext .= '</ul></li>';
                         }                          }
                       } elsif ($key eq 'notify') {
                           if ($privacyhash{$key}) {
                               foreach my $dc (split(/,/,$privacyhash{$key})) {
                                   my ($dcname,$dcdom) = split(/:/,$dc);
                                   $resulttext .= '<li>'.&Apache::loncommon::plainname($dcname,$dcdom).'</li>';
                               }
                           } else {
                               $resulttext .= '<li>'.&mt('No DCs to notify').'</li>';
                           }
                     } elsif ($key eq 'othdom') {                      } elsif ($key eq 'othdom') {
                         my @statuses;                          my @statuses;
                         if (ref($types) eq 'ARRAY') {                          if (ref($types) eq 'ARRAY') {
Line 19948  sub modify_defaults { Line 20086  sub modify_defaults {
             }              }
         } elsif ($item eq 'portal_def') {          } elsif ($item eq 'portal_def') {
             if ($newvalues{$item} ne '') {              if ($newvalues{$item} ne '') {
                 unless ($newvalues{$item} =~ /^https?\:\/\/(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])\/?$/) {                  if ($newvalues{$item} =~ /^https?\:\/\/(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])\/?$/) {
                       foreach my $field ('email','web') {
                           if ($env{'form.'.$item.'_'.$field}) {
                               $newvalues{$item.'_'.$field} = $env{'form.'.$item.'_'.$field};
                           }
                       }
                   } else {
                     push(@errors,$item);                      push(@errors,$item);
                 }                  }
             }              }
         }          }
         if (grep(/^\Q$item\E$/,@errors)) {          if (grep(/^\Q$item\E$/,@errors)) {
             $newvalues{$item} = $domdefaults{$item};              $newvalues{$item} = $domdefaults{$item};
               if ($item eq 'portal_def') {
                   if ($domdefaults{$item}) {
                       foreach my $field ('email','web') {
                           if (exists($domdefaults{$item.'_'.$field})) {
                               $newvalues{$item.'_'.$field} = $domdefaults{$item.'_'.$field};
                           }
                       }
                   }
               }
         } elsif ($domdefaults{$item} ne $newvalues{$item}) {          } elsif ($domdefaults{$item} ne $newvalues{$item}) {
             $changes{$item} = 1;              $changes{$item} = 1;
         }          }
           if ($item eq 'portal_def') {
               unless (grep(/^\Q$item\E$/,@errors)) {
                   if ($newvalues{$item} eq '') { 
                       foreach my $field ('email','web') {
                           if (exists($domdefaults{$item.'_'.$field})) {
                               delete($domdefaults{$item.'_'.$field});
                           }
                       }
                   } else {
                       unless ($changes{$item}) {
                           foreach my $field ('email','web') {
                               if ($domdefaults{$item.'_'.$field} ne $newvalues{$item.'_'.$field}) {
                                   $changes{$item} = 1;
                                   last;
                               }
                           }
                       }
                       foreach my $field ('email','web') {
                           if ($newvalues{$item.'_'.$field}) {
                               $domdefaults{$item.'_'.$field} = $newvalues{$item.'_'.$field};
                           } elsif (exists($domdefaults{$item.'_'.$field})) {
                               delete($domdefaults{$item.'_'.$field});
                           }
                       }
                   }
               }
           }
         $domdefaults{$item} = $newvalues{$item};          $domdefaults{$item} = $newvalues{$item};
     }      }
     my %staticdefaults = (      my %staticdefaults = (
Line 19972  sub modify_defaults { Line 20152  sub modify_defaults {
             $newvalues{$item} = $staticdefaults{$item};              $newvalues{$item} = $staticdefaults{$item};
         }          }
     }      }
       my ($unamemaprules,$ruleorder);
       my @possunamemaprules = &Apache::loncommon::get_env_multiple('form.unamemap_rule');
       if (@possunamemaprules) {
           ($unamemaprules,$ruleorder) =
               &Apache::lonnet::inst_userrules($dom,'unamemap');
           if ((ref($unamemaprules) eq 'HASH') && (ref($ruleorder) eq 'ARRAY')) {
               if (@{$ruleorder} > 0) {
                   my %possrules;
                   map { $possrules{$_} = 1; } @possunamemaprules;
                   foreach my $rule (@{$ruleorder}) {
                       if ($possrules{$rule}) {
                           push(@{$newvalues{'unamemap_rule'}},$rule);
                       }
                   }
               }
           }
       }
       if (ref($domdefaults{'unamemap_rule'}) eq 'ARRAY') {
           if (ref($newvalues{'unamemap_rule'}) eq 'ARRAY') {
               my @rulediffs = &Apache::loncommon::compare_arrays($domdefaults{'unamemap_rule'},
                                                                  $newvalues{'unamemap_rule'});
               if (@rulediffs) {
                   $changes{'unamemap_rule'} = 1;
                   $domdefaults{'unamemap_rule'} = $newvalues{'unamemap_rule'};
               }
           } elsif (@{$domdefaults{'unamemap_rule'}} > 0) {
               $changes{'unamemap_rule'} = 1;
               delete($domdefaults{'unamemap_rule'});
           }
       } elsif (ref($newvalues{'unamemap_rule'}) eq 'ARRAY') {
           if (@{$newvalues{'unamemap_rule'}} > 0) {
               $changes{'unamemap_rule'} = 1;
               $domdefaults{'unamemap_rule'} = $newvalues{'unamemap_rule'};
           }
       }
     my %defaults_hash = (      my %defaults_hash = (
                          defaults => \%newvalues,                           defaults => \%newvalues,
                         );                          );
Line 20086  sub modify_defaults { Line 20301  sub modify_defaults {
                             $resulttext .= '<li>'.&mt('Institutional user status types deleted').'</li>';                               $resulttext .= '<li>'.&mt('Institutional user status types deleted').'</li>'; 
                         }                          }
                     }                      }
                   } elsif ($item eq 'unamemap_rule') {
                       if (ref($newvalues{'unamemap_rule'}) eq 'ARRAY') {
                           my @rulenames;
                           if (ref($unamemaprules) eq 'HASH') {
                               foreach my $rule (@{$newvalues{'unamemap_rule'}}) {
                                   if (ref($unamemaprules->{$rule}) eq 'HASH') {
                                       push(@rulenames,$unamemaprules->{$rule}->{'name'});
                                   }
                               }
                           }
                           if (@rulenames) {
                               $resulttext .= '<li>'.&mt('Mapping for missing usernames includes: [_1]',
                                                        '<ul><li>'.join('</li><li>',@rulenames).'</li></ul>').
                                              '</li>';
                           } else {
                               $resulttext .= '<li>'.&mt('No mapping for missing usernames via standard log-in').'</li>';
                           }
                       } else {
                           $resulttext .= '<li>'.&mt('Mapping for missing usernames via standard log-in deleted').'</li>';
                       }
                 } else {                  } else {
                     my $value = $env{'form.'.$item};                      my $value = $env{'form.'.$item};
                     if ($value eq '') {                      if ($value eq '') {
Line 20102  sub modify_defaults { Line 20337  sub modify_defaults {
                         $value = $authnames{$shortauth{$value}};                          $value = $authnames{$shortauth{$value}};
                     }                      }
                     $resulttext .= '<li>'.&mt('[_1] set to "[_2]"',$title->{$item},$value).'</li>';                      $resulttext .= '<li>'.&mt('[_1] set to "[_2]"',$title->{$item},$value).'</li>';
                     $mailmsgtext .= "$title->{$item} set to $value\n";                        $mailmsgtext .= "$title->{$item} set to $value\n";
                       if ($item eq 'portal_def') {
                           if ($env{'form.'.$item} ne '') {
                               foreach my $field ('email','web') {
                                   $value = $env{'form.'.$item.'_'.$field};
                                   if ($value) {
                                       $value = &mt('Yes');
                                   } else {
                                       $value = &mt('No');
                                   }
                                   $resulttext .= '<li>'.&mt('[_1] set to "[_2]"',$title->{$field},$value).'</li>';
                               }
                           }
                       }
                 }                  }
             }              }
             $resulttext .= '</ul>';              $resulttext .= '</ul>';
Line 22711  sub modify_trust { Line 22959  sub modify_trust {
             }              }
             my $cachetime = 24*60*60;              my $cachetime = 24*60*60;
             &Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime);              &Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime);
               &Apache::lonnet::do_cache_new('trust',$dom,$defaultshash{'trust'},3600);
             if (ref($lastactref) eq 'HASH') {              if (ref($lastactref) eq 'HASH') {
                 $lastactref->{'domdefaults'} = 1;                  $lastactref->{'domdefaults'} = 1;
                   $lastactref->{'trust'} = 1;
             }              }
             if (keys(%changes) > 0) {              if (keys(%changes) > 0) {
                 my %lt = &trust_titles();                  my %lt = &trust_titles();
Line 23781  sub devalidate_remote_domconfs { Line 24031  sub devalidate_remote_domconfs {
     map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids();      map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids();
     my @posscached = ('domainconfig','domdefaults','ltitools','usersessions',      my @posscached = ('domainconfig','domdefaults','ltitools','usersessions',
                       'directorysrch','passwdconf','cats','proxyalias','proxysaml',                        'directorysrch','passwdconf','cats','proxyalias','proxysaml',
                       'ipaccess');                        'ipaccess','trust');
     my %cache_by_lonhost;      my %cache_by_lonhost;
     if (exists($cachekeys->{'samllanding'})) {      if (exists($cachekeys->{'samllanding'})) {
         if (ref($cachekeys->{'samllanding'}) eq 'HASH') {          if (ref($cachekeys->{'samllanding'}) eq 'HASH') {

Removed from v.1.407  
changed lines
  Added in v.1.417


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