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

raeburn raeburn at source.lon-capa.org
Mon Jan 23 18:50:12 EST 2017


raeburn		Mon Jan 23 23:50:12 2017 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - Remove trailing white space.  No code changes.
  
  
-------------- next part --------------
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.288 loncom/interface/domainprefs.pm:1.289
--- loncom/interface/domainprefs.pm:1.288	Mon Jan 23 22:46:44 2017
+++ loncom/interface/domainprefs.pm	Mon Jan 23 23:50:11 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.288 2017/01/23 22:46:44 raeburn Exp $
+# $Id: domainprefs.pm,v 1.289 2017/01/23 23:50:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3024,7 +3024,7 @@
                 if (exists($settings->{'helpform'}{'maxsize'})) {
                     $maxsize = $settings->{'helpform'}{'maxsize'};
                 } else {
-                    $maxsize = '1.0'; 
+                    $maxsize = '1.0';
                 }
             } else {
                 if (ref($fields) eq 'ARRAY') {
@@ -3041,7 +3041,7 @@
             $to{'adminemail'} = $Apache::lonnet::perlvar{'lonAdmEMail'};
             $checked{'errormail'}{'adminemail'} = ' checked="checked" ';
             $checked{'packagesmail'}{'adminemail'} = ' checked="checked" ';
-            $checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" '; 
+            $checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" ';
             $checked{'requestsmail'}{'adminemail'} = ' checked="checked" ';
             $checked{'updatesmail'}{'adminemail'} = ' checked="checked" ';
             $checked{'idconflictsmail'}{'adminemail'} = ' checked="checked" ';
@@ -3117,8 +3117,8 @@
     if ($position eq 'middle') {
         my %choices;
         $choices{'reporterrors'} = &mt('E-mail error reports to [_1]',
-                                    &Apache::loncommon::modal_link('http://loncapa.org/core.html',
-                                    &mt('LON-CAPA core group - MSU'),600,500));
+                                       &Apache::loncommon::modal_link('http://loncapa.org/core.html',
+                                       &mt('LON-CAPA core group - MSU'),600,500));
         $choices{'reportupdates'} = &mt('E-mail record of completed LON-CAPA updates to [_1]',
                                         &Apache::loncommon::modal_link('http://loncapa.org/core.html',
                                         &mt('LON-CAPA core group - MSU'),600,500));
@@ -3134,7 +3134,7 @@
                       '<td>'.&mt('Extra helpdesk form fields:').'<br />'.
                       &mt('(e-mail, subject, and description always shown)').
                       '</td><td class="LC_left_item">';
-        if ((ref($fields) eq 'ARRAY') && (ref($fieldtitles) eq 'HASH') && 
+        if ((ref($fields) eq 'ARRAY') && (ref($fieldtitles) eq 'HASH') &&
             (ref($fieldoptions) eq 'HASH') && (ref($possoptions) eq 'HASH')) {
             $datatable .= '<table><tr><th>'.&mt('Field').'</th><th>'.&mt('Status').'</th></tr>';
             foreach my $field (@{$fields}) {
@@ -3188,7 +3188,7 @@
 function screenshotSize(field) {
     if (document.getElementById('help_screenshotsize')) {
         if (field.value == 'no') {
-            document.getElementById('help_screenshotsize').style.display="none"; 
+            document.getElementById('help_screenshotsize').style.display="none";
         } else {
             document.getElementById('help_screenshotsize').style.display="";
         }
@@ -3497,7 +3497,7 @@
 function toggleHelpdeskItem(num,field) {
     if (document.getElementById('helproles_'+num+'_'+field)) {
         if (document.getElementById('helproles_'+num+'_'+field).className.match(/(?:^|\\s)LC_hidden(?!\\S)/)) {
-            document.getElementById('helproles_'+num+'_'+field).className = 
+            document.getElementById('helproles_'+num+'_'+field).className =
                 document.getElementById('helproles_'+num+'_'+field).className.replace(/(?:^|\\s)LC_hidden(?!\\S)/g ,'');
             if (document.getElementById('helproles_'+num+'_'+field+'_vis')) {
                 document.getElementById('helproles_'+num+'_'+field+'_vis').value = '$html_js_lt{hide}';
@@ -3623,7 +3623,7 @@
         } else {
             $datatable .= '<td class="LC_right_item">';
         }
-        $datatable .= 
+        $datatable .=
             '<span class="LC_nobreak">'.
             '<label><input type="radio" name="'.
             $item.'" '.$checkedon{$item}.' value="1"'.$onclick.' />'.&mt('Yes').
@@ -4009,7 +4009,7 @@
                             'canuse_pdfforms' => 'off',
                             'uselcmath'       => 'on',
                             'usejsme'         => 'on',
-                            'canclone'        => 'none', 
+                            'canclone'        => 'none',
                           );
         @toggles = ('canuse_pdfforms','uselcmath','usejsme');
         ($datatable,$itemcount) = &radiobutton_prefs($settings,\@toggles,\%defaultchecked,
@@ -4048,7 +4048,7 @@
                     $currcanclone = $settings->{'canclone'};
                 }
             }
-        } 
+        }
         foreach my $option (@cloneoptions) {
             my ($checked,$additional);
             if ($currcanclone eq $option) {
@@ -4117,7 +4117,7 @@
                     foreach my $type (@types) {
                         if (ref($settings->{'postsubmit'}->{'timeout'}) eq 'HASH') {
                             if ($settings->{'postsubmit'}->{'timeout'}->{$type} =~ /^\d+$/) {
-                                $deftimeout{$type} = $settings->{'postsubmit'}->{'timeout'}->{$type}; 
+                                $deftimeout{$type} = $settings->{'postsubmit'}->{'timeout'}->{$type};
                             } else {
                                 $deftimeout{$type} = $staticdefaults{'postsubmit'};
                             }
@@ -4932,7 +4932,7 @@
                             <span class="LC_nobreak">'.
                           &mt('[_1] when busy, offloads to:'
                               ,'<b>'.$server.'</b>').'</span><br />'.
-                          '<span class="LC_nobreak">'."\n". 
+                          '<span class="LC_nobreak">'."\n".
                           '<label><input type="checkbox" name="offloadnow" value="'.$server.'"'.$checkednow.' />'.
                           ' '.&mt('Switch active users on next access').'</label></span>'.
                           "\n";
@@ -5426,7 +5426,7 @@
                    'errormail'       => 'Error reports to be e-mailed to',
                    'packagesmail'    => 'Package update alerts to be e-mailed to',
                    'helpdeskmail'    => "Helpdesk requests for this domain's users",
-                   'otherdomsmail'   => 'Helpdesk requests for other (unconfigured) domains',  
+                   'otherdomsmail'   => 'Helpdesk requests for other (unconfigured) domains',
                    'lonstatusmail'   => 'E-mail from nightly status check (warnings/errors)',
                    'requestsmail'    => 'E-mail from course requests requiring approval',
                    'updatesmail'     => 'E-mail from nightly check of LON-CAPA module integrity/updates',
@@ -5447,14 +5447,14 @@
                        'cc'         => 'Cc e-mail',
                        'course'     => 'Course Details',
                        'section'    => 'Sections',
-                       'screenshot' => 'File upload', 
+                       'screenshot' => 'File upload',
     );
     my @fields = ('username','phone','user','course','section','cc','screenshot');
     my %possoptions = (
                         username     => ['yes','no','req'],
-                        phone        => ['yes','no','req'],   
+                        phone        => ['yes','no','req'],
                         user         => ['yes','no'],
-                        cc           => ['yes','no'], 
+                        cc           => ['yes','no'],
                         course       => ['yes','no'],
                         section      => ['yes','no'],
                         screenshot   => ['yes','no'],
@@ -6766,7 +6766,7 @@
 
 sub defaults_javascript {
     my ($settings) = @_;
-    return unless (ref($settings) eq 'HASH'); 
+    return unless (ref($settings) eq 'HASH');
     if ((ref($settings->{'inststatusorder'}) eq 'ARRAY') && (ref($settings->{'inststatustypes'}) eq 'HASH')) {
         my $maxnum = scalar(@{$settings->{'inststatusorder'}});
         if ($maxnum eq '') {
@@ -7557,7 +7557,7 @@
             } elsif ($currheadtagurls{$lonhost}) {
                 $loginhash{'login'}{'headtag'}{$lonhost}{'url'} = $currheadtagurls{$lonhost};
                 if ($currexempt{$lonhost}) {
-                    if ((!exists($possexempt{$lonhost})) || ($possexempt{$lonhost} ne $currexempt{$lonhost})) { 
+                    if ((!exists($possexempt{$lonhost})) || ($possexempt{$lonhost} ne $currexempt{$lonhost})) {
                         $changes{'headtag'}{$lonhost} = 1;
                     }
                 } elsif ($possexempt{$lonhost}) {
@@ -7789,7 +7789,6 @@
     return $resulttext;
 }
 
-
 sub check_exempt_addresses {
     my ($iplist) = @_;
     $iplist =~ s/^\s+//;
@@ -8700,7 +8699,7 @@
                                     my $newpos = $env{'form.'.$itemid};
                                     $newpos =~ s/\D+//g;
                                     foreach my $item ('subject','title','publisher','author') {
-                                        next if ((($item eq 'author') || ($item eq 'publisher')) && 
+                                        next if ((($item eq 'author') || ($item eq 'publisher')) &&
                                                  ($type eq 'templates'));
                                         $confhash{$type}{$key}{$item} = $env{'form.'.$type.'_'.$item.'_'.$i};
                                         if ($domconfig{$action}{$type}{$key}{$item} ne $confhash{$type}{$key}{$item}) {
@@ -8869,7 +8868,7 @@
                     }
                 } elsif ($confhash{'validation'}{'dc'} ne '') {
                     $changes{'validation'}{'dc'} = $confhash{'validation'}{'dc'};
-                }  
+                }
             } else {
                 if (ref($domconfig{'requestcourses'}) eq 'HASH') {
                     if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') {
@@ -10170,7 +10169,7 @@
     my %title = ( available => 'Institutional directory search available',
                   localonly => 'Other domains can search institution',
                   lcavailable => 'LON-CAPA directory search available',
-                  lclocalonly => 'Other domains can search LON-CAPA domain', 
+                  lclocalonly => 'Other domains can search LON-CAPA domain',
                   searchby => 'Search types',
                   searchtypes => 'Search latitude');
     my @offon = ('off','on');
@@ -10264,27 +10263,27 @@
             }
         }
         if (exists($currdirsrch{'lcavailable'})) {
-             if ($currdirsrch{'lcavailable'} ne $env{'form.dirsrch_domavailable'}) {
-                 $changes{'lcavailable'} = 1;
-             }
+            if ($currdirsrch{'lcavailable'} ne $env{'form.dirsrch_domavailable'}) {
+                $changes{'lcavailable'} = 1;
+            }
         } else {
             if ($env{'form.dirsrch_lcavailable'} eq '1') {
                 $changes{'lcavailable'} = 1;
             }
         }
         if (exists($currdirsrch{'localonly'})) {
-             if ($currdirsrch{'localonly'} ne $env{'form.dirsrch_instlocalonly'}) {
-                 $changes{'localonly'} = 1;
-             }
+            if ($currdirsrch{'localonly'} ne $env{'form.dirsrch_instlocalonly'}) {
+                $changes{'localonly'} = 1;
+            }
         } else {
             if ($env{'form.dirsrch_instlocalonly'} eq '1') {
                 $changes{'localonly'} = 1;
             }
         }
         if (exists($currdirsrch{'lclocalonly'})) {
-             if ($currdirsrch{'lclocalonly'} ne $env{'form.dirsrch_domlocalonly'}) {
-                 $changes{'lclocalonly'} = 1;
-             }
+            if ($currdirsrch{'lclocalonly'} ne $env{'form.dirsrch_domlocalonly'}) {
+                $changes{'lclocalonly'} = 1;
+            }
         } else {
             if ($env{'form.dirsrch_domlocalonly'} eq '1') {
                 $changes{'lclocalonly'} = 1;
@@ -10303,7 +10302,7 @@
             }
             if ($changes{'lclocalonly'}) {
                 $resulttext .= '<li>'.&mt("$title{'lclocalonly'} set to: $otherdoms[$env{'form.dirsrch_domlocalonly'}]").'</li>';
-            }   
+            }
             if (ref($changes{'cansearch'}) eq 'ARRAY') {
                 my $chgtext;
                 if (ref($usertypes) eq 'HASH') {
@@ -10386,7 +10385,7 @@
             } else {
                 $contacts_hash{contacts}{$type}{$item} = 0;
             }
-        }  
+        }
         $others{$type} = $env{'form.'.$type.'_others'};
         $contacts_hash{contacts}{$type}{'others'} = $others{$type};
         if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) {
@@ -10444,7 +10443,7 @@
             if ($others{$type} ne $currsetting{$type}{'others'}) {
                 push(@{$changes{$type}},'others');
             }
-            if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) {   
+            if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) {
                 if ($bcc{$type} ne $currsetting{$type}{'bcc'}) {
                     push(@{$changes{$type}},'bcc'); 
                 }
@@ -10522,7 +10521,7 @@
                     }
                 }
             }
-        }   
+        }
     }
     foreach my $item (@toggles) {
         if (($env{'form.'.$item} == 1) && ($currsetting{$item} == 0)) {
@@ -10553,7 +10552,7 @@
             foreach my $type (@mailings) {
                 if (ref($changes{$type}) eq 'ARRAY') {
                     if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) {
-                        $resulttext .= '<li>'.$titles->{$type}.' -- '.&mt('sent to').': '; 
+                        $resulttext .= '<li>'.$titles->{$type}.' -- '.&mt('sent to').': ';
                     } else {
                         $resulttext .= '<li>'.$titles->{$type}.': ';
                     }
@@ -10572,7 +10571,7 @@
                         if ($bcc{$type} ne '') {
                             my $bcctext;
                             if (@text) {
-                                $bcctext = ' '.&mt('with Bcc to'); 
+                                $bcctext = ' '.&mt('with Bcc to');
                             } else {
                                 $bcctext = '(Bcc)';
                             }
@@ -10580,7 +10579,7 @@
                         } elsif (!@text) {
                             $resulttext .= &mt('No one');
                         }   
-                        if ($includestr{$type} ne '') { 
+                        if ($includestr{$type} ne '') {
                             if ($includeloc{$type} eq 'b') {
                                 $resulttext .= '<br />'.&mt('Text automatically added to e-mail body:').' '.$includestr{$type};
                             } elsif ($includeloc{$type} eq 's') {
@@ -10618,11 +10617,11 @@
                         next;
                     }
                     if ($contacts_hash{'contacts'}{'helpform'}{$field} eq 'yes') {
-                        push(@optional,$field);    
+                        push(@optional,$field);
                     } elsif ($contacts_hash{'contacts'}{'helpform'}{$field} eq 'no') {
                         push(@unused,$field);
                     } elsif ($contacts_hash{'contacts'}{'helpform'}{$field} eq 'req') {
-                        push(@required,$field);   
+                        push(@required,$field);
                     }
                 }
                 if (@optional) {
@@ -12501,7 +12500,7 @@
             $identifier = 'custhelp'.$num;
             my %newprivs = &Apache::lonuserutils::custom_role_update($rolename,$identifier);
             my %currprivs;
-            ($currprivs{'s'},$currprivs{'d'},$currprivs{'c'}) = 
+            ($currprivs{'s'},$currprivs{'d'},$currprivs{'c'}) =
                 split(/\_/,$existing{'rolesdef_'.$rolename});
             foreach my $level ('c','d','s') {
                 if ($newprivs{$level} ne $currprivs{$level}) {
@@ -12543,7 +12542,7 @@
             if ($access eq 'status') {
                 my @statuses = &Apache::loncommon::get_env_multiple('form.'.$prefix.'_status');
                 if (scalar(@statuses) == 0) {
-                    $helphash{'helpsettings'}{'adhoc'}{$rolename}{'access'} = 'none'; 
+                    $helphash{'helpsettings'}{'adhoc'}{$rolename}{'access'} = 'none';
                 } else {
                     my (@shownstatus,$numtypes);
                     $helphash{'helpsettings'}{'adhoc'}{$rolename}{$access} = [];
@@ -12616,7 +12615,7 @@
                     if (ref($current{'adhoc'}{$rolename}) eq 'HASH') {
                         if ($current{'adhoc'}{$rolename}{'order'} ne $idx) {
                             $changes{'customrole'}{$rolename}{'order'} = 1;
-                            $newsettings{$rolename}{'order'} = $idx+1; 
+                            $newsettings{$rolename}{'order'} = $idx+1;
                         }
                     }
                 }
@@ -12814,7 +12813,7 @@
                         $changes{$item} = 1;
                     }
                 } elsif ($item =~ /^(uploadquota|mysqltables)_/) {
-                    my $setting = $1; 
+                    my $setting = $1;
                     unless (($currdef eq '') && ($newdef == $staticdefaults{$setting})) {
                         $changes{$setting} = 1;
                     }
@@ -12829,7 +12828,7 @@
             }
         }
         my $newclone;
-        if ($env{'form.canclone'} =~ /^(none|domain|instcode)$/) { 
+        if ($env{'form.canclone'} =~ /^(none|domain|instcode)$/) {
             $newclone = $env{'form.canclone'};
         }
         if ($newclone eq 'instcode') {
@@ -12852,8 +12851,8 @@
                 $newclone eq '';
             }
         } elsif ($newclone ne '') {
-            $defaultshash{'coursedefaults'}{'canclone'} = $newclone; 
-        } 
+            $defaultshash{'coursedefaults'}{'canclone'} = $newclone;
+        }
         if ($newclone ne $currclone) {
             $changes{'canclone'} = 1;
         }
@@ -12871,10 +12870,10 @@
                 $defaultshash{'coursedefaults'}{'coursecredits'}{$type} = $credits{$type};
             }
         } else {
-            if ($env{'form.coursecredits'} eq '1') { 
+            if ($env{'form.coursecredits'} eq '1') {
                 foreach my $type (@types) {
                     unless ($type eq 'community') {
-                        if ($domconfig{'coursedefaults'}{'coursecredits'}{$type} ne $credits{$type}) {        
+                        if ($domconfig{'coursedefaults'}{'coursecredits'}{$type} ne $credits{$type}) {
                             $changes{'coursecredits'} = 1;
                         }
                         $defaultshash{'coursedefaults'}{'coursecredits'}{$type} = $credits{$type};
@@ -12917,7 +12916,7 @@
                 }
                 if (exists($currtimeout{$type})) {
                     if ($timeout ne $currtimeout{$type}) {
-                        $changes{'postsubmit'} = 1; 
+                        $changes{'postsubmit'} = 1;
                     }
                 } elsif ($timeout ne '') {
                     $changes{'postsubmit'} = 1;
@@ -12946,7 +12945,7 @@
                     if ($changes{$item}) {
                         $domdefaults{$item}=$defaultshash{'coursedefaults'}{$item};
                     }
-                } 
+                }
                 if ($changes{'coursecredits'}) {
                     if (ref($defaultshash{'coursedefaults'}{'coursecredits'}) eq 'HASH') {
                         foreach my $type (keys(%{$defaultshash{'coursedefaults'}{'coursecredits'}})) {
@@ -13009,7 +13008,7 @@
                     if ($env{'form.'.$item} eq '1') {
                         $resulttext .= '<li>'.&mt('Molecule editor uses JSME (HTML5), if supported by browser.').'</li>';
                     } else {
-                        $resulttext .= '<li>'.&mt('Molecule editor uses JME (Java), if supported by client OS.').'</li>'; 
+                        $resulttext .= '<li>'.&mt('Molecule editor uses JME (Java), if supported by client OS.').'</li>';
                     }
                 } elsif ($item eq 'anonsurvey_threshold') {
                     $resulttext .= '<li>'.&mt('Responder count required for display of anonymous survey submissions set to [_1].',$defaultshash{'coursedefaults'}{'anonsurvey_threshold'}).'</li>';
@@ -13044,7 +13043,7 @@
                         $resulttext .= '<li>'.&mt('Submit button(s) remain enabled on page after student makes submission.');
                     } else {
                         $resulttext .= '<li>'.&mt('Submit button(s) disabled on page after student makes submission').'; ';
-                        if (ref($defaultshash{'coursedefaults'}{'postsubmit'}) eq 'HASH') { 
+                        if (ref($defaultshash{'coursedefaults'}{'postsubmit'}) eq 'HASH') {
                             $resulttext .= &mt('durations:').'<ul>';
                             foreach my $type (@types) {
                                 $resulttext .= '<li>';
@@ -13075,7 +13074,7 @@
                             }
                             $resulttext .= '</ul>';
                         }
-                        $resulttext .= '</li>';    
+                        $resulttext .= '</li>';
                     }
                 } elsif ($item eq 'coursecredits') {
                     if (ref($defaultshash{'coursedefaults'}{'coursecredits'}) eq 'HASH') {
@@ -13103,7 +13102,7 @@
                     } elsif ($defaultshash{'coursedefaults'}{'canclone'} eq 'domain') {
                         $resulttext .= '<li>'.&mt('By default, a course requester can clone any course from his/her domain.').'</li>';
                     } else {
-                        $resulttext .= '<li>'.&mt('By default, only course owner and coordinators may clone a course.').'</li>'; 
+                        $resulttext .= '<li>'.&mt('By default, only course owner and coordinators may clone a course.').'</li>';
                     }
                 }
             }
@@ -13558,7 +13557,7 @@
                 }
             }
             unless ($changes{'offloadnow'}) {
-                foreach my $lonhost (keys(%{$defaultshash{'usersessions'}{'offloadnow'}})) { 
+                foreach my $lonhost (keys(%{$defaultshash{'usersessions'}{'offloadnow'}})) {
                     unless ($domconfig{'usersessions'}{'offloadnow'}{$lonhost}) {
                         $changes{'offloadnow'} = 1;
                         last;
@@ -14076,7 +14075,7 @@
                 }
                 if ($rule eq 'specific') {
                     my $specifiedhost = $env{'form.loadbalancing_singleserver_'.$i.'_'.$type};
-                    if (exists($servers{$specifiedhost})) { 
+                    if (exists($servers{$specifiedhost})) {
                         $rule = $specifiedhost;
                     }
                 }
@@ -14152,7 +14151,7 @@
                                         if ($rule eq '') {
                                             $balancetext =  $ruletitles{'default'};
                                         } elsif (($rule eq 'homeserver') || ($rule eq 'externalbalancer') ||
-                                                 ($type eq '_LC_ipchange') || ($type eq '_LC_ipchangesso')) { 
+                                                 ($type eq '_LC_ipchange') || ($type eq '_LC_ipchangesso')) {
                                             if (($type eq '_LC_ipchange') || ($type eq '_LC_ipchangesso')) {
                                                 foreach my $sparetype (@sparestypes) {
                                                     if (ref($defaultshash{'loadbalancing'}{$balancer}{'targets'}{$sparetype}) eq 'ARRAY') {
@@ -14879,7 +14878,7 @@
             privtext.innerHTML = "$lt{'priv'}";
             versionitem.type = 'text';
             versionitem.size = '3';
-            versiontext.innerHTML = "$lt{'ver'}"; 
+            versiontext.innerHTML = "$lt{'ver'}";
         } else {
             pubitem.type = 'hidden';
             privitem.type = 'hidden';
@@ -14952,7 +14951,7 @@
                  original  => 'original (CAPTCHA)',
                  recaptcha => 'successor (ReCAPTCHA)',
                  notused   => 'unused',
-                 ver => 'ReCAPTCHA version (1 or 2)', 
+                 ver => 'ReCAPTCHA version (1 or 2)',
     );
 }
 


More information about the LON-CAPA-cvs mailing list