[LON-CAPA-cvs] cvs: doc /loncapafiles axe_config_check.piml systemd_config_check.piml updatequery.piml

raeburn raeburn at source.lon-capa.org
Thu Aug 20 16:58:11 EDT 2026


raeburn		Thu Aug 20 20:58:11 2026 EDT

  Modified files:              
    /doc/loncapafiles	updatequery.piml axe_config_check.piml 
                     	systemd_config_check.piml 
  Log:
  - "Accessibility Checking Available" configuration item:
     Values stored in /etc/httpd/conf/loncapa.conf or /etc/apache2/loncapa.conf
     either: PerlSetVar lonAxeUse 1 or PerlSetVar lonAxeUse 0 (replaces Y/N).
  
  
-------------- next part --------------
Index: doc/loncapafiles/updatequery.piml
diff -u doc/loncapafiles/updatequery.piml:1.104 doc/loncapafiles/updatequery.piml:1.105
--- doc/loncapafiles/updatequery.piml:1.104	Mon Aug 17 22:18:44 2026
+++ doc/loncapafiles/updatequery.piml	Thu Aug 20 20:58:11 2026
@@ -1,6 +1,6 @@
 <!-- updatequery.piml -->
 
-<!-- $Id: updatequery.piml,v 1.104 2026/08/17 22:18:44 raeburn Exp $ -->
+<!-- $Id: updatequery.piml,v 1.105 2026/08/20 20:58:11 raeburn Exp $ -->
 
 <!--
 
@@ -1699,7 +1699,11 @@
     $perlvar{'lonAdmEMail'}=$lonAdmEMail;
     $perlvar{'lonSupportEMail'}=$lonSupportEMail;
     $perlvar{'lonRole'}=$lonRole;
-    $perlvar{'lonAxeUse'}=$installAxe;
+    if ($installAxe eq 'Y') {
+        $perlvar{'lonAxeUse'}=1;
+    } elsif ($installAxe eq 'N') {
+        $perlvar{'lonAxeUse'}=0; 
+    }
     unless ($perlvar{'lonLoadLim'} and $perlvar{'lonLoadLim'}!~/\{\[\[\[\[/) {
        $perlvar{'lonLoadLim'}='2.00';
     }
@@ -1719,7 +1723,7 @@
        $perlvar{'lonReceipt'}=$lonReceipt;
     }
     unless ($perlvar{'lonAxeUse'} and $perlvar{'lonAxeUse'}!~/\{\[\[\[\[/) {
-       $perlvar{'lonAxeUse'}='N';
+       $perlvar{'lonAxeUse'}='0';
     }
     open(OUT,">$confdir$filename") or
       die("Cannot output to $confdir$filename\n");
@@ -1773,7 +1777,7 @@
        $perlvar{'loncAllowInsecure'}='1';
     }
     unless ($perlvar{'lonAxeUse'} and $perlvar{'lonAxeUse'}!~/\{\[\[\[\[/) {
-       $perlvar{'lonAxeUse'} ='N';
+       $perlvar{'lonAxeUse'} ='0';
     }
     my ($securestatus,$securenum)=&securesetting(%perlvar);
     unless ($perlvar{'lonReceipt'} and $perlvar{'lonReceipt'}!~/\{\[\[\[\[/) {
@@ -2004,6 +2008,12 @@
 if (ref($sslref) eq 'HASH') {
     %sslstatus = %{$sslref};
 }
+my $showAxeUse;
+if ($perlvar{'lonAxeUse'}) {
+    $showAxeUse = 'Y';
+} else {
+    $showAxeUse = 'N';
+}
 
 while (!$flag) {
   print(<<END);
@@ -2023,7 +2033,7 @@
 11) Cache Expiration Time: $perlvar{'lonExpire'} (seconds)
 12) Server Load: $perlvar{'lonLoadLim'}
 13) User Load: $perlvar{'lonUserLoadLim'}
-14) Accessibility Checking Available: $perlvar{'lonAxeUse'} 
+14) Accessibility Checking Available: $showAxeUse
 15) LON-CAPA "internal" connections: $securestatus
 16) Private Key for SSL: $lonkeystatus
 17) SSL Certificate for LON-CAPA server connections: $lonhostcertstatus
@@ -2259,9 +2269,14 @@
   }
   elsif ($choice==14) {
     my $curr_axe = $perlvar{'lonAxeUse'}; 
-  
+    my $showaxeuse;
+    if ($curr_axe) {
+        $showaxeuse = 'Y';
+    } else {
+        $showaxeuse = 'N';
+    }
     print(<<END);
-14) Accessibility Checking Available: $perlvar{'lonAxeUse'}
+14) Accessibility Checking Available: $showaxeuse
 
 ENTER NEW VALUE: Y or N (Y means "Yes"; N means "No")  
 END
@@ -2274,9 +2289,13 @@
     } else {
         $choice2 = 'N';
     }
-    $perlvar{'lonAxeUse'}=$choice2;
+    if ($choice2 eq 'Y') {
+        $perlvar{'lonAxeUse'}=1;
+    } else {
+        $perlvar{'lonAxeUse'}=0;
+    }
 
-    if (($choice2 eq 'Y') && ($curr_axe ne 'Y')) {
+    if (($choice2 eq 'Y') && (!$curr_axe)) {
         if ($installAxe eq '') {
             &axe_info();
         }
@@ -2547,7 +2566,7 @@
     my (%axestatus,%axeinstall);
     my $browser = &get_axe_status($dist,$version,\%axestatus,\%axeinstall);
     my $slesversion;
-    if ($perlvar{'lonAxeUse'} eq 'Y') {
+    if ($perlvar{'lonAxeUse'}) {
         my @packages;
         if ($axeinstall{'nodejs'}) {
             push(@packages,'nodejs');
Index: doc/loncapafiles/axe_config_check.piml
diff -u doc/loncapafiles/axe_config_check.piml:1.10 doc/loncapafiles/axe_config_check.piml:1.11
--- doc/loncapafiles/axe_config_check.piml:1.10	Tue Aug 18 00:42:18 2026
+++ doc/loncapafiles/axe_config_check.piml	Thu Aug 20 20:58:11 2026
@@ -2,7 +2,7 @@
 	"http://lpml.sourceforge.net/DTD/piml.dtd">
 <!-- axe_config_check.piml -->
 
-<!-- $Id: axe_config_check.piml,v 1.10 2026/08/18 00:42:18 raeburn Exp $ -->
+<!-- $Id: axe_config_check.piml,v 1.11 2026/08/20 20:58:11 raeburn Exp $ -->
 
 <!--
 
@@ -69,7 +69,7 @@
     }
 }
 
-exit unless ($lonAxeUse eq 'Y');
+exit unless ($lonAxeUse);
 
 my $addexport = 1;
 my $wwwuid = getpwnam('www');
Index: doc/loncapafiles/systemd_config_check.piml
diff -u doc/loncapafiles/systemd_config_check.piml:1.3 doc/loncapafiles/systemd_config_check.piml:1.4
--- doc/loncapafiles/systemd_config_check.piml:1.3	Mon Aug 17 23:49:55 2026
+++ doc/loncapafiles/systemd_config_check.piml	Thu Aug 20 20:58:11 2026
@@ -2,7 +2,7 @@
         "http://lpml.sourceforge.net/DTD/piml.dtd">
 <!-- systemd_config_check.piml -->
 
-<!-- $Id: systemd_config_check.piml,v 1.3 2026/08/17 23:49:55 raeburn Exp $ -->
+<!-- $Id: systemd_config_check.piml,v 1.4 2026/08/20 20:58:11 raeburn Exp $ -->
 
 <!--
 
@@ -110,7 +110,7 @@
             }
         }
         close(PIPE);
-        if (($protecthome || $suidsgid) || (($lonAxeUser eq 'Y') && (($restrictnames || $memorydeny)))) { 
+        if (($protecthome || $suidsgid) || (($lonAxeUser) && (($restrictnames || $memorydeny)))) { 
             if (!-d '/etc/systemd/system/'.$service.'.d') {
                 mkdir '/etc/systemd/system/'.$service.'.d', 0755;
             }
@@ -155,7 +155,7 @@
                                 }
                                 $is_no{$key} = $linenum;
                             } elsif (($entry =~ /^(RestrictNamespaces|MemoryDenyWriteExecute)\s*=\s*(\w+)\s*$/) &&
-                                      ($lonAxeUser eq 'Y')) {
+                                      ($lonAxeUser)) {
                                 my ($key,$value) = ($1,$2);
                                 next if ($is_no{$key});
                                 if (lc($value) eq 'no') {
@@ -197,7 +197,7 @@
                                 $needs_update = 1;
                             }
                         }
-                        if ($lonAxeUser eq 'Y') {
+                        if ($lonAxeUser) {
                             foreach my $item ('RestrictNamespaces','MemoryDenyWriteExecute') {
                                 unless (exists($is_no{$item})) {
                                     push(@{$lines{'Service'}},$item.'=no');
@@ -224,7 +224,7 @@
                                                             print $fh "$item\n";
                                                         }
                                                     } elsif (($item =~ /^(RestrictNamespaces|MemoryDenyWriteExecute)\s*=\s*no\s*$/i) &&
-                                                             ($lonAxeUser eq 'Y')) {
+                                                             ($lonAxeUser)) {
                                                         my $key = $1;
                                                         unless (grep/^$key\s*=\s*no\s*$/i,@{$lines{$category}}) {
                                                             print $fh "$item\n";
@@ -255,7 +255,7 @@
                                     print '**** ERROR: Could not open /etc/systemd/system/'.$service.'.d/override.conf to write RestrictSUIDSGID=no.'."\n".
                                           'Creation of sub-directories in Authoring Space will not be possible from the web interface.'."\n";  
                                 }
-                                if (($lonAxeUser eq 'Y') && ($restrictnames || $memorydeny)) {
+                                if (($lonAxeUser) && ($restrictnames || $memorydeny)) {
                                     if (($restrictnames) && ($memorydeny)) {
                                         print '**** ERROR: Could not open /etc/systemd/system/'.$service.'.d/override.conf to write RestrictNamespaces=no and MemoryDenyWriteExecute="no.'."\n";
                                     } elsif ($restrictnames) {
@@ -286,7 +286,7 @@
                             print '**** ERROR: Could not open /etc/systemd/system/'.$service.'.d/override.conf to write RestrictSUIDSGID=no.'."\n".
                                   'Creation of sub-directories in Authoring Space will not be possible from the web interface.'."\n";
                         }
-                        if (($lonAxeUser eq 'Y') && ($restrictnames || $memorydeny)) {
+                        if (($lonAxeUser) && ($restrictnames || $memorydeny)) {
                             if (($restrictnames) && ($memorydeny)) {
                                 print '**** ERROR: Could not open /etc/systemd/system/'.$service.'.d/override.conf to write RestrictNamespaces=no and MemoryDenyWriteExecute="no.'."\n";
                             } elsif ($restrictnames) {
@@ -306,7 +306,7 @@
                 if ($suidsgid) {
                     print 'Creation of sub-directories in Authoring Space will not be possible from the web interface.'."\n";
                 }
-                if (($lonAxeUser eq 'Y') && ($restrictnames || $memorydeny)) {
+                if (($lonAxeUser) && ($restrictnames || $memorydeny)) {
                     print 'Accessibility Checker will be not usable.'."\n";
                 }
             }
@@ -314,7 +314,7 @@
     } else {
         print '**** WARNING *** Could not determine status of ProtectHome property for systemd '.$service.".\n".
               'It was not possible to determine whether LON-CAPA web interface will be usable.'."\n";
-        if ($lonAxeUser eq 'Y') {
+        if ($lonAxeUser) {
             print '**** WARNING *** Could not determine status of RestrictNamespaces property for systemd '.$service.".\n".
                   'It was not possible to determine whether Accessibility Checker will be usable.'."\n";
         }


More information about the LON-CAPA-cvs mailing list