[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm

raeburn raeburn at source.lon-capa.org
Sat Jun 3 15:18:11 EDT 2023


raeburn		Sat Jun  3 19:18:11 2023 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - Remove trailing white space
  - Remove some lines containing only a line feed
  - Fix some indents
    No code changes.
  
  
-------------- next part --------------
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.424 loncom/interface/domainprefs.pm:1.425
--- loncom/interface/domainprefs.pm:1.424	Thu Jun  1 18:09:59 2023
+++ loncom/interface/domainprefs.pm	Sat Jun  3 19:18:11 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.424 2023/06/01 18:09:59 raeburn Exp $
+# $Id: domainprefs.pm,v 1.425 2023/06/03 19:18:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -105,7 +105,7 @@
 In the case of course requests, radio buttons are displayed for each institutional
 affiliate type (and also default, and _LC_adv) for each of the course types 
 (official, unofficial, community, textbook, placement, and lti).  
-In each case the radio buttons allow the selection of one of four values:  
+In each case the radio buttons allow the selection of one of four values:
 
 0, approval, validate, autolimit=N (where N is blank, or a positive integer).
 which have the following effects:
@@ -236,7 +236,7 @@
                     $is_home = 1;
                 }
             }
-            $checked_is_home = 1; 
+            $checked_is_home = 1;
             foreach my $id (keys(%{$domconfig{'ltitools'}})) {
                 if ((ref($domconfig{'ltitools'}{$id}) eq 'HASH') &&
                     (ref($encconfig{'ltitools'}{$id}) eq 'HASH')) {
@@ -604,7 +604,7 @@
                   print => \&print_loadbalancing,
                   modify => \&modify_loadbalancing,
                  },
-        'ltitools' => 
+        'ltitools' =>
                  {text => 'External Tools (LTI)',
                   help => 'Domain_Configuration_LTI_Tools',
                   header => [{col1 => 'Encryption of shared secrets',
@@ -662,12 +662,12 @@
                   print => \&print_trust,
                   modify => \&modify_trust,
                  },
-          'lti' =>
+        'lti' =>
                  {text => 'LTI Link Protection and LTI Consumers',
                   help => 'Domain_Configuration_LTI_Provider',
                   header => [{col1 => 'Encryption of shared secrets',
                               col2 => 'Settings'},
-                             {col1 => 'Rules for shared secrets', 
+                             {col1 => 'Rules for shared secrets',
                               col2 => 'Settings'},
                              {col1 => 'Link Protectors',
                               col2 => 'Settings'},
@@ -676,7 +676,7 @@
                   print => \&print_lti,
                   modify => \&modify_lti,
                  },
-           'ipaccess' =>
+        'ipaccess' =>
                        {text => 'IP-based access control',
                         help => 'Domain_Configuration_IP_Access',
                         header => [{col1 => 'Setting',
@@ -917,7 +917,7 @@
         &Apache::lonuserutils::custom_role_privs(\%privs,\%full,\%levels,\%levelscurrent);
         my @templateroles = &Apache::lonuserutils::custom_template_roles($context,$crstype);
         $output =
-            &Apache::lonuserutils::custom_roledefs_js($context,$crstype,$formname,\%full, 
+            &Apache::lonuserutils::custom_roledefs_js($context,$crstype,$formname,\%full,
                                                       \@templateroles);
     } elsif ($action eq 'ltitools') {
         $output .= &Apache::lonconfigsettings::ltitools_javascript($settings);
@@ -3553,7 +3553,6 @@
     my %servers = &Apache::lonnet::get_servers($dom,'library');
     my $primary = &Apache::lonnet::domain($dom,'primary');
     my $course_servers = "'".join("','",keys(%servers))."'";
-
     return <<"ENDSCRIPT";
 <script type="text/javascript">
 // <![CDATA[
@@ -3652,7 +3651,7 @@
                            break;
                        }
                    }
-               } 
+               }
             }
             if (!setvis) {
                 if (document.getElementById(divid)) {
@@ -3729,7 +3728,7 @@
         var divid = 'lti_menufield_'+item;
         var setvis = '';
         for (var i=0; i<menus.length; i++) {
-            var radioname = menus[i];  
+            var radioname = menus[i];
             var num = form.elements[radioname].length;
             if (num) {
                 for (var j=0; j<num; j++) {
@@ -3837,16 +3836,16 @@
     return <<"ENDSCRIPT";
 <script type="text/javascript">
 // <![CDATA[
-function toggleSamlOptions(form,hostid) { 
+function toggleSamlOptions(form,hostid) {
     var radioname = 'saml_'+hostid;
     var tablecellon = 'samloptionson_'+hostid;
     var tablecelloff = 'samloptionsoff_'+hostid;
     var num = form.elements[radioname].length;
     if (num) {
-        var setvis = ''; 
+        var setvis = '';
         for (var i=0; i<num; i++) {
             if (form.elements[radioname][i].checked) {
-                if (form.elements[radioname][i].value == '1') { 
+                if (form.elements[radioname][i].value == '1') {
                     if (document.getElementById(tablecellon)) {
                         document.getElementById(tablecellon).style.display='';
                     }
@@ -4614,7 +4613,7 @@
                 map {$excluded{$_} = 1; } @{$lonstatus{'excluded'}};
             }
         }
-        foreach my $item ('errorthreshold','errorsysmail') { 
+        foreach my $item ('errorthreshold','errorsysmail') {
             $css_class = $rownum%2?' class="LC_odd_row"':'';
             $datatable .= '<tr'.$css_class.'>'.
                           '<td class="LC_left_item"><span class="LC_nobreak">'.
@@ -4696,7 +4695,7 @@
                             $includeloc{'override_'.$key} = '';
                             $includestr{'override_'.$key} = '';
                             if ($settings->{'overrides'}{$key}{'include'} ne '') {
-                                ($includeloc{'override_'.$key},$includestr{'override_'.$key}) = 
+                                ($includeloc{'override_'.$key},$includestr{'override_'.$key}) =
                                     split(/:/,$settings->{'overrides'}{$key}{'include'},2);
                                 $includestr{'override_'.$key} = &unescape($includestr{'override_'.$key});
                             }
@@ -4708,7 +4707,6 @@
             my $optionsprefix = 'LC_options_helpdesk_';
 
             my $onclicktypes = "toggleHelpdeskRow(this.form,'overrides','$customclass','$optionsprefix');";
- 
             $datatable .= &insttypes_row($settings,$types,$usertypes,$dom,
                                          $numinrow,$othertitle,'overrides',
                                          \$rownum,$onclicktypes,$customclass);
@@ -4775,7 +4773,7 @@
             }
             my $title;
             if (ref($short_titles) eq 'HASH') {
-                $title = $short_titles->{$item}; 
+                $title = $short_titles->{$item};
             }
             $output .= '<label>'.
                        '<input type="checkbox" name="override_'.$type.'"'.$check.
@@ -4854,7 +4852,6 @@
     return;
 }
 
-
 // ]]>
 </script>
 
@@ -5365,7 +5362,7 @@
                                           'key'            => 'Key',
                                           'lifetime'       => 'Nonce lifetime (s)',
                                           'secret'         => 'Secret',
-                                          'icon'           => 'Icon',   
+                                          'icon'           => 'Icon',
                                           'user'           => 'User',
                                           'fullname'       => 'Full Name',
                                           'firstname'      => 'First Name',
@@ -5383,7 +5380,7 @@
                                           'roster'         => 'Tool can retrieve roster:',
                                           'crstarget'      => 'Display target',
                                           'crslabel'       => 'Course label',
-                                          'crstitle'       => 'Course title', 
+                                          'crstitle'       => 'Course title',
                                           'crslinktext'    => 'Link Text',
                                           'crsexplanation' => 'Explanation',
                                           'crsappend'      => 'Provider URL',
@@ -6323,7 +6320,7 @@
                             '<label><input type="checkbox" name="lti_visible_'.$i.'" id="lti_visible_'.$i.'" onclick="if (this.checked) { this.form.lti_secret_'.$i.'.type='."'text'".' } else { this.form.lti_secret_'.$i.'.type='."'password'".' }" />'.&mt('Visible input').'</label>';
                     }
                 }
-                $datatable .= '<br /><br />'. 
+                $datatable .= '<br /><br />'.
                     '<span class="LC_nobreak">'.$lt{'requser'}.':'.
                     '<label><input type="radio" name="lti_requser_'.$i.'" value="1"'.$onclickrequser.$checkedrequser{yes}.' />'.&mt('Yes').'</label> '."\n".
                     '<label><input type="radio" name="lti_requser_'.$i.'" value="0"'.$onclickrequser.$checkedrequser{no}.' />'.&mt('No').'</label></span>'."\n".
@@ -6449,7 +6446,7 @@
         if (($current->{'mapuser'} ne '') && ($current->{'mapuser'} ne 'lis_person_sourcedid')) {
             $checked{'mapuser'}{'sourcedid'} = '';
             if ($current->{'mapuser'} eq 'lis_person_contact_email_primary') {
-                $checked{'mapuser'}{'email'} = ' checked="checked"'; 
+                $checked{'mapuser'}{'email'} = ' checked="checked"';
             } else {
                 $checked{'mapuser'}{'other'} = ' checked="checked"';
                 $userfield = $current->{'mapuser'};
@@ -6459,7 +6456,7 @@
         if (($current->{'mapcrs'} ne '') && ($current->{'mapcrs'} ne 'course_offering_sourcedid')) {
             $checked{'mapcrs'}{'course_offering_sourcedid'} = '';
             if ($current->{'mapcrs'} eq 'context_id') {
-                $checked{'mapcrs'}{'context_id'} = ' checked="checked"'; 
+                $checked{'mapcrs'}{'context_id'} = ' checked="checked"';
             } else {
                 $checked{'mapcrs'}{'other'} = ' checked="checked"';
                 $cidfield = $current->{'mapcrs'};
@@ -6487,7 +6484,7 @@
             $checked{'lcauth'}{$1} = ' checked="checked"';
             unless (($current->{'lcauth'} eq 'lti') || ($current->{'lcauth'} eq 'internal')) {
                 $lcauthparm = $current->{'lcauthparm'};
-                $lcauthparmstyle = 'display:table-row'; 
+                $lcauthparmstyle = 'display:table-row';
                 if ($current->{'lcauth'} eq 'localauth') {
                     $lcauthparmtext = &mt('Local auth argument');
                 } else {
@@ -6504,7 +6501,7 @@
             %rolemaps = %{$current->{'maproles'}};
         }
         if ($current->{'section'} ne '') {
-            $checked{'crssec'}{'Y'} = '  checked="checked"'; 
+            $checked{'crssec'}{'Y'} = '  checked="checked"';
             $crssecfieldsty = 'inline-block';
             if ($current->{'section'} eq 'course_section_sourcedid') {
                 $checked{'crssecsrc'}{'sourcedid'} = ' checked="checked"';
@@ -6550,9 +6547,9 @@
         $checked{'crssec'}{'N'} = ' checked="checked"';
         $checked{'callback'}{'N'} = ' checked="checked"';
         $checked{'topmenu'}{'N'} = ' checked="checked"';
-        $checked{'inlinemenu'}{'Y'} = ' checked="checked"'; 
+        $checked{'inlinemenu'}{'Y'} = ' checked="checked"';
         $checked{'menuitem'}{'grades'} = ' checked="checked"';
-        $menusty = 'inline-block'; 
+        $menusty = 'inline-block';
     }
     my @coursetypes = ('official','unofficial','community','textbook','placement','lti');
     my %coursetypetitles = &Apache::lonlocal::texthash (
@@ -6605,7 +6602,7 @@
                '<fieldset class="ltioption_usr_'.$num.'" style="display:'.$optionsty.'"><legend>'.&mt('Roles which may create user accounts').'</legend>';
     foreach my $ltirole (@ltiroles) {
         $output .= '<span class="LC_nobreak"><label><input type="checkbox" name="lti_makeuser_'.$num.'" value="'.$ltirole.'"'.
-                   $checked{'makeuser'}{$ltirole}.' />'.$ltirole.'</label> </span> ';     
+                   $checked{'makeuser'}{$ltirole}.' />'.$ltirole.'</label> </span> ';
     }
     $output .= '</fieldset>'.
                '<fieldset class="ltioption_usr_'.$num.'" style="display:'.$optionsty.'"><legend>'.&mt('New user accounts created for LTI users').'</legend>'.
@@ -6737,9 +6734,9 @@
         if ($extra eq 'passback') {
             $pb1p1chk = ' checked="checked"';
             $pb1p0chk = '';
-            $onclickpb = ' onclick="toggleLTI(this.form,'."'passback','$num'".');"'; 
+            $onclickpb = ' onclick="toggleLTI(this.form,'."'passback','$num'".');"';
         } else {
-            $onclickpb = ''; 
+            $onclickpb = '';
         }
         if (ref($current) eq 'HASH') {
             if (($current->{$extra})) {
@@ -7929,7 +7926,7 @@
         if (ref($settings->{chars}) eq 'ARRAY') {
             map { $chars{$_} = 1; } (@{$settings->{chars}});
         }
-        if ($prefix eq 'passwords') { 
+        if ($prefix eq 'passwords') {
             if ($settings->{expire}) {
                 $expire = $settings->{expire};
             }
@@ -8072,7 +8069,7 @@
             my %config = &Apache::lonnet::get_dom('configuration',['wafproxy'],$domain);
             if (ref($config{'wafproxy'}) eq 'HASH') {
                 $aliases{$domain} = $config{'wafproxy'}{'alias'};
-                if (exists($config{'wafproxy'}{'saml'})) { 
+                if (exists($config{'wafproxy'}{'saml'})) {
                     $saml{$domain} = $config{'wafproxy'}{'saml'};
                 }
                 foreach my $item ('remoteip','ipheader','trusted','vpnint','vpnext') {
@@ -8137,10 +8134,10 @@
                               (' 'x2).'<span class="LC_nobreak">'.
                               &mt('Alias used for SSO Auth').': <label>'.
                               '<input type="radio" value="0"'.$samloff.' name="wafproxy_alias_saml_'.$server.'" />'.
-                              &mt('No').'</label> <label>'. 
+                              &mt('No').'</label> <label>'.
                               '<input type="radio" value="1"'.$samlon.' name="wafproxy_alias_saml_'.$server.'" />'.
                               &mt('Yes').'</label></span>'.
-                              '</td>'; 
+                              '</td>';
             }
             $aliasrows .= '</tr>';
             $aliasinfo{$dom_in_effect} .= $aliasrows;
@@ -9050,7 +9047,7 @@
                                   no => ' checked="checked"',
                               );
         my %balcookiechecked = (
-                                  no => ' checked="checked"', 
+                                  no => ' checked="checked"',
                                );
         foreach my $sparetype (@sparestypes) {
             my $targettable;
@@ -9637,7 +9634,7 @@
         ($datatable,$itemcount) = &radiobutton_prefs(\%radiohash,\@toggles,\%defaultchecked,
                                                      \%choices,$itemcount,$onclick);
         $$rowtotal += $itemcount;
-        
+
         if (ref($usertypes) eq 'HASH') {
             if (keys(%{$usertypes}) > 0) {
                 $datatable .= &insttypes_row($createsettings,$types,$usertypes,
@@ -9774,7 +9771,7 @@
                 my $currstyle = 'display:none';
                 if (grep(/^\Q$status\E$/, at ordered)) {
                     $currstyle = $rowstyle;
-                    $hidden = 0; 
+                    $hidden = 0;
                 }
                 $datatable .= &noninst_users($processing,$emailverified,$emailoptions,$emaildomain,
                                              $emailrules,$emailruleorder,$settings,$status,$rowid,
@@ -9801,8 +9798,8 @@
             foreach my $status (@posstypes) {
                 my $rowid = $classprefix.$status;
                 my $datarowstyle = 'display:none';
-                if (grep(/^\Q$status\E$/, at ordered)) { 
-                    $datarowstyle = $rowstyle; 
+                if (grep(/^\Q$status\E$/, at ordered)) {
+                    $datarowstyle = $rowstyle;
                 }
                 $datatable .= &modifiable_userdata_row('cancreate','emailusername_'.$status,$settings,
                                                        $numinrow,$$rowtotal,\%usertypeshash,$infofields,
@@ -9904,7 +9901,7 @@
                     document.getElementById(altprefix+'_inst_'+status).style.display = 'none';
                     document.getElementById(altprefix+'_noninst_'+status).style.display = 'none';
                     if (curr == 'custom') {
-                        if (prefix) { 
+                        if (prefix) {
                             document.getElementById(prefix+'_'+status).style.display = 'inline';
                         }
                     } else if (curr == 'inst') {
@@ -9927,10 +9924,10 @@
 
 sub noninst_users {
     my ($processing,$emailverified,$emailoptions,$emaildomain,$emailrules,
-        $emailruleorder,$settings,$type,$rowid,$typetitle,$css_class,$rowstyle,$intdom) = @_; 
+        $emailruleorder,$settings,$type,$rowid,$typetitle,$css_class,$rowstyle,$intdom) = @_;
     my $class = 'LC_left_item';
     if ($css_class) {
-        $css_class = ' class="'.$css_class.'"'; 
+        $css_class = ' class="'.$css_class.'"';
     }
     if ($rowid) {
         $rowid = ' id="'.$rowid.'"';
@@ -9945,10 +9942,10 @@
         $description = &mt('Requests for: [_1] (status self-reported)',$typetitle);
     }
     $output = '<tr'.$css_class.$rowid.$rowstyle.'>'.
-              "<td>$description</td>\n".           
+              "<td>$description</td>\n".
               '<td class="'.$class.'" colspan="2">'.
               '<table><tr>';
-    my %headers = &Apache::lonlocal::texthash( 
+    my %headers = &Apache::lonlocal::texthash(
               approve  => 'Processing',
               email    => 'E-mail',
               username => 'Username',
@@ -10073,7 +10070,7 @@
                     my $value;
                     if (ref($emaildomain) eq 'HASH') {
                         if (ref($emaildomain->{$type}) eq 'HASH') {
-                            $value = $emaildomain->{$type}->{$option}; 
+                            $value = $emaildomain->{$type}->{$option};
                         }
                     }
                     if ($value eq '') {
@@ -10391,7 +10388,7 @@
                     if ($defaults{$item.'_'.$field}) {
                         $checkedon = $checkedoff;
                         $checkedoff = '';
-                    } 
+                    }
                     $datatable .= '<div id="'.$item.'_'.$field.'_div" style="display:'.$portalsty.'">'.
                               '<span class="LC_nobreak">'.$titles->{$field}.' '.
                               '<label><input type="radio" name="'.$item.'_'.$field.'" value="1"'.$checkedon.'/>'.&mt('Yes').'</label>'.
@@ -11220,7 +11217,7 @@
 function portalExtras(caller) {
     var x = caller.value;
     var y = new Array('email','web');
-    for (var i=0; i<y.length; i++) { 
+    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) {
@@ -11324,7 +11321,7 @@
     }
     &js_escape(\%intalert);
     my $defmin = $Apache::lonnet::passwdmin;
-    my $intauthjs; 
+    my $intauthjs;
     if ($prefix eq 'passwords') { $intauthjs = <<"ENDSCRIPT";
 
 function warnIntAuth(field) {
@@ -11744,7 +11741,7 @@
                 }
             }
         }
-        if (ref($hashref) eq 'HASH') { 
+        if (ref($hashref) eq 'HASH') {
             foreach my $field (@fields) {
                 if ($hashref->{$field}) {
                     if ($role eq 'emailusername') {
@@ -11756,7 +11753,6 @@
             }
         }
     }
- 
     my $total = scalar(@fields);
     for (my $i=0; $i<$total; $i++) {
         $rem = $i%($numinrow);
@@ -11920,7 +11916,7 @@
         } else {
             $output .= '<td class="LC_left_item">';
         }
-        $output .= ' ';  
+        $output .= ' ';
     } else {
         if ($rem == 0) {
             $output .= '<tr>';
@@ -12196,7 +12192,7 @@
                     if ($lang eq $env{'form.loginhelpurl_add_lang'}) {
                         $formelem = 'loginhelpurl_add_file';
                     }
-                    (my $result,$newurl{$lang}) = 
+                    (my $result,$newurl{$lang}) =
                         &Apache::lonconfigsettings::publishlogo($r,'upload',$formelem,$dom,$confname,
                                                                 "help/$lang",'','',$newfile{$lang},
                                                                 $modified);
@@ -12273,7 +12269,7 @@
                 my $modified = [];
                 foreach my $lonhost (@newhosts) {
                     my $formelem = 'loginheadtag_'.$lonhost;
-                    (my $result,$newheadtagurls{$lonhost}) = 
+                    (my $result,$newheadtagurls{$lonhost}) =
                         &Apache::lonconfigsettings::publishlogo($r,'upload',$formelem,$dom,$confname,
                                                                 "login/headtag/$lonhost",'','',
                                                                 $env{'form.loginheadtag_'.$lonhost.'.filename'},
@@ -12350,15 +12346,15 @@
                 $currsaml{$lonhost}{$item} = $env{'form.saml_'.$item.'_'.$lonhost};
             }
         } else {
-            if ($saml{$lonhost}) {  
+            if ($saml{$lonhost}) {
                 $changes{'saml'}{$lonhost} = 1;
                 delete($currsaml{$lonhost});
             }
         }
     }
     foreach my $posshost (keys(%currsaml)) {
-        unless (exists($domservers{$posshost})) { 
-            delete($currsaml{$posshost}); 
+        unless (exists($domservers{$posshost})) {
+            delete($currsaml{$posshost});
         }
     }
     %{$loginhash{'login'}{'saml'}} = %currsaml;
@@ -12372,7 +12368,7 @@
                 my $modified = [];
                 foreach my $lonhost (@newsamlimgs) {
                     my $formelem = 'saml_img_'.$lonhost;
-                    my ($result,$imgurl) = 
+                    my ($result,$imgurl) =
                         &Apache::lonconfigsettings::publishlogo($r,'upload',$formelem,$dom,$confname,
                                                                 "login/saml/$lonhost",'','',
                                                                 $env{'form.saml_img_'.$lonhost.'.filename'},
@@ -12742,7 +12738,7 @@
             $possrange =~ s/,+/,/g;
             if ($possrange ne '') {
                 my (@ok,$count);
-                $count = 0; 
+                $count = 0;
                 foreach my $poss (split(/\,/,$possrange)) {
                     $count ++;
                     $poss = &validate_ip_pattern($poss);
@@ -12775,9 +12771,9 @@
             }
         }
         $confhash{$itemid}{'commblocks'} = {};
-         
+
         my %commblocks;
-        map { $commblocks{$_} = 1; } &Apache::loncommon::get_env_multiple('form.ipaccess_block_'.$idx);  
+        map { $commblocks{$_} = 1; } &Apache::loncommon::get_env_multiple('form.ipaccess_block_'.$idx);
         foreach my $type (@{$typeorder}) {
             if ($commblocks{$type}) {
                 $confhash{$itemid}{'commblocks'}{$type} = 'on';
@@ -12809,7 +12805,7 @@
         }
         $env{'form.ipaccess_cnum_'.$idx} =~ s/^\s+|\s+$//g;
         $env{'form.ipaccess_cdom_'.$idx} =~ s/^\s+|\s+$//g;
-        if (($env{'form.ipaccess_cnum_'.$idx} =~ /^$match_courseid$/) && 
+        if (($env{'form.ipaccess_cnum_'.$idx} =~ /^$match_courseid$/) &&
             ($env{'form.ipaccess_cdom_'.$idx} =~ /^$match_domain$/)) {
             if (&Apache::lonnet::homeserver($env{'form.ipaccess_cnum_'.$idx},
                                             $env{'form.ipaccess_cdom_'.$idx}) eq 'no_host') {
@@ -12889,7 +12885,7 @@
                     if (keys(%{$confhash{$itemid}{'courses'}})) {
                         my @courses;
                         foreach my $cid (sort(keys(%{$confhash{$itemid}{'courses'}}))) {
-                            my %courseinfo = &Apache::lonnet::coursedescription($cid,{'one_time' => 1}); 
+                            my %courseinfo = &Apache::lonnet::coursedescription($cid,{'one_time' => 1});
                             push(@courses,$courseinfo{'description'}.' ('.$cid.')');
                         }
                         $resulttext .= '<li>'.&mt('Courses/Communities allowed').':<ul><li>'.
@@ -16659,7 +16655,7 @@
                     $contacts_hash{'contacts'}{'overrides'}{$type}{'include'} = $includeloc{$type}.':'.&escape($includestr{$type});
                     $newsetting{'override_'.$type}{'include'} = $contacts_hash{'contacts'}{'overrides'}{$type}{'include'};
                 }
-            }     
+            }
         }
     }
     if (keys(%currsetting) > 0) {
@@ -16717,12 +16713,12 @@
             }
         }
         if (@statuses) {
-            if (ref($currsetting{'overrides'}) eq 'HASH') { 
+            if (ref($currsetting{'overrides'}) eq 'HASH') {
                 foreach my $key (keys(%{$currsetting{'overrides'}})) {
                     if (ref($currsetting{'overrides'}{$key}) eq 'HASH') {
                         if (ref($newsetting{'override_'.$key}) eq 'HASH') {
                             foreach my $item (@contacts,'bcc','others','include') {
-                                if ($currsetting{'overrides'}{$key}{$item} ne $newsetting{'override_'.$key}{$item}) { 
+                                if ($currsetting{'overrides'}{$key}{$item} ne $newsetting{'override_'.$key}{$item}) {
                                     push(@{$changes{'overrides'}},$key);
                                     last;
                                 }
@@ -16739,7 +16735,7 @@
                 }
             } else {
                 foreach my $key (@overrides) {
-                    push(@{$changes{'overrides'}},$key); 
+                    push(@{$changes{'overrides'}},$key);
                 }
             }
         }
@@ -16921,7 +16917,7 @@
                             $resulttext .= $bcctext.': <span class="LC_cusr_emph">'.$bcc{$type}.'</span>';
                         } elsif (!@text) {
                             $resulttext .= &mt('No one');
-                        }   
+                        }
                         if ($includestr{$type} ne '') {
                             if ($includeloc{$type} eq 'b') {
                                 $resulttext .= '<br />'.&mt('Text automatically added to e-mail body:').' '.$includestr{$type};
@@ -16945,14 +16941,14 @@
                             if (ref($newsetting{'override_'.$type}) eq 'HASH') {
                                 my @text;
                                 foreach my $item (@contacts) {
-                                    if ($newsetting{'override_'.$type}{$item}) { 
+                                    if ($newsetting{'override_'.$type}{$item}) {
                                         push(@text,$short_titles->{$item});
                                     }
                                 }
                                 if ($newsetting{'override_'.$type}{'others'} ne '') {
                                     push(@text,$newsetting{'override_'.$type}{'others'});
                                 }
-  
+
                                 if (@text) {
                                     $resulttext .= &mt('Helpdesk e-mail sent to: [_1]',
                                                        '<span class="LC_cusr_emph">'.join(', ', at text).'</span>');
@@ -17793,7 +17789,7 @@
                                                    );
                                 my $needed = '<ul><li>'.
                                              join('</li><li>',map {$rulenames{$_} } @{$confighash{'passwords'}{'chars'}}).
-                                             '</li></ul>'; 
+                                             '</li></ul>';
                                 $resulttext .= '<li>'.&mt('[_1] set to: [_2]',$titles{'chars'},$needed).'</li>';
                             } else {
                                 $resulttext .= '<li>'.&mt('[_1] set to none',$titles{'chars'}).'</li>';
@@ -18276,7 +18272,7 @@
                             if (($chosen eq 'inst') || ($chosen eq 'noninst')) {
                                 my $emaildom;
                                 if ($env{'form.cancreate_emaildomain_'.$chosen.'_'.$type} =~ /^\@[^\@]+$/) {
-                                    $emaildom = $env{'form.cancreate_emaildomain_'.$chosen.'_'.$type}; 
+                                    $emaildom = $env{'form.cancreate_emaildomain_'.$chosen.'_'.$type};
                                     $cancreate{'emaildomain'}{$type}{$chosen} = $emaildom;
                                     if (ref($curremaildom{$type}) eq 'HASH') {
                                         if (exists($curremaildom{$type}{$chosen})) {
@@ -18288,7 +18284,7 @@
                                         }
                                     } elsif ($emaildom ne '') {
                                         push(@{$changes{'cancreate'}},'emaildomain');
-                                    } 
+                                    }
                                 }
                                 $cancreate{'emailoptions'}{$type} = $env{'form.cancreate_emailoptions_'.$type};
                             } elsif ($chosen eq 'custom') {
@@ -18715,7 +18711,7 @@
                                                                   );
                         if (@types) {
                             if (@statuses) {
-                                $chgtext .= &mt('Processing of requests to create account with e-mail verification set as follows:'). 
+                                $chgtext .= &mt('Processing of requests to create account with e-mail verification set as follows:').
                                             '<ul>';
                                 foreach my $status (@statuses) {
                                     if ($status eq 'default') {
@@ -18923,7 +18919,7 @@
                                 $typename = $othertitle;
                             } else {
                                 $typename = $usertypes{$type};
-                            } 
+                            }
                             $chgtext .= &mt('(Affiliation: [_1])',$typename);
                         }
                         if (@{$email_rule{$type}} > 0) {
@@ -19268,7 +19264,7 @@
         }
         if ($item eq 'portal_def') {
             unless (grep(/^\Q$item\E$/, at errors)) {
-                if ($newvalues{$item} eq '') { 
+                if ($newvalues{$item} eq '') {
                     foreach my $field ('email','web') {
                         if (exists($domdefaults{$item.'_'.$field})) {
                             delete($domdefaults{$item.'_'.$field});
@@ -19453,7 +19449,7 @@
                             $resulttext =~ s/, $//;
                             $resulttext .= '</li>';
                         } else {
-                            $resulttext .= '<li>'.&mt('Institutional user status types deleted').'</li>'; 
+                            $resulttext .= '<li>'.&mt('Institutional user status types deleted').'</li>';
                         }
                     }
                 } elsif ($item eq 'unamemap_rule') {
@@ -20690,7 +20686,7 @@
         }
         my (%newdomexttool,%newexttool,%olddomexttool,%oldexttool);
         map { $newdomexttool{$_} = 1; } &Apache::loncommon::get_env_multiple('form.domexttool');
-        map { $newexttool{$_} = 1; } &Apache::loncommon::get_env_multiple('form.exttool'); 
+        map { $newexttool{$_} = 1; } &Apache::loncommon::get_env_multiple('form.exttool');
         if (ref($domconfig{'coursedefaults'}{'domexttool'}) eq 'HASH') {
             %olddomexttool = %{$domconfig{'coursedefaults'}{'domexttool'}};
         } else {
@@ -20703,7 +20699,7 @@
             }
         }
         if (ref($domconfig{'coursedefaults'}{'exttool'}) eq 'HASH') {
-            %oldexttool = %{$domconfig{'coursedefaults'}{'exttool'}};     
+            %oldexttool = %{$domconfig{'coursedefaults'}{'exttool'}};
         } else {
             foreach my $type (@types) {
                if ($staticdefaults{'exttool'}) {
@@ -21356,7 +21352,7 @@
                 }
             } elsif ($currvalue{$item}) {
                 $changes{$item} = 1;
-            } 
+            }
         }
     } else {
         if (keys(%curralias)) {
@@ -21364,7 +21360,7 @@
         }
         if (keys(%currsaml)) {
             $changes{'saml'} = 1;
-        } 
+        }
         if (keys(%currvalue)) {
             foreach my $key (keys(%currvalue)) {
                 $changes{$key} = 1;
@@ -21374,7 +21370,7 @@
     if (keys(%changes)) {
         my %defaultshash = (
                               wafproxy => \%wafproxy,
-                           ); 
+                           );
         my $putresult = &Apache::lonnet::put_dom('configuration',\%defaultshash,
                                                  $dom);
         if ($putresult eq 'ok') {
@@ -21390,7 +21386,7 @@
                         $domdefaults{'waf_'.$item} = $wafproxy{$item};
                     } elsif (exists($domdefaults{'waf_'.$item})) {
                         delete($domdefaults{'waf_'.$item});
-                    } 
+                    }
                 }
             }
             if ($updatedomdefs) {
@@ -21457,7 +21453,7 @@
                             $output .= '<li>'.&mt('Aliases deleted for hostnames').'</li>';
                         }
                     } elsif ($item eq 'saml') {
-                        my $shown; 
+                        my $shown;
                         if (ref($wafproxy{'saml'}) eq 'HASH') {
                             if (keys(%{$wafproxy{'saml'}})) {
                                 $shown = join(', ',sort(keys(%{$wafproxy{'saml'}})));
@@ -21787,7 +21783,7 @@
                 if (($offload eq 'offloadoth') && (@okoffloadoth)) {
                     $changes{'offloadoth'} = 1;
                 }
-            } 
+            }
         }
     } else {
         if (@okoffload) {
@@ -22325,7 +22321,7 @@
         }
         if ($env{'form.loadbalancing_cookie_'.$i}) {
             $defaultshash{'loadbalancing'}{$balancer}{'cookie'} = 1;
-            if (exists($currbalancer{$balancer})) { 
+            if (exists($currbalancer{$balancer})) {
                 unless ($currcookies{$balancer}) {
                     $changes{'curr'}{$balancer}{'cookie'} = 1;
                 }
@@ -23011,7 +23007,6 @@
 END
 }
 
-
 sub new_spares_js {
     my @sparestypes = ('primary','default');
     my $types = join("','", at sparestypes);


More information about the LON-CAPA-cvs mailing list