[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm loncommon.pm loncreateuser.pm lonmenu.pm /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Sun Aug 23 16:37:03 EDT 2026


raeburn		Sun Aug 23 20:37:03 2026 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm loncommon.pm loncreateuser.pm 
                     	lonmenu.pm 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Authoring Space default set in domain for availability of Accessibility 
    Checker can be overridden for a specific Authoring Space.
  
  
-------------- next part --------------
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.463 loncom/interface/domainprefs.pm:1.464
--- loncom/interface/domainprefs.pm:1.463	Sun Aug 23 19:16:30 2026
+++ loncom/interface/domainprefs.pm	Sun Aug 23 20:37:02 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.463 2026/08/23 19:16:30 raeburn Exp $
+# $Id: domainprefs.pm,v 1.464 2026/08/23 20:37:02 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7872,6 +7872,10 @@
                                                       {'archive' => 'off'},
                                                       \%titles,$itemcount);
         $datatable .= $archive."\n";
+        (my $axecheck,$itemcount) = &radiobutton_prefs($settings,['axecheck'],
+                                                       {'axecheck' => 'off'},
+                                                       \%titles,$itemcount);
+        $datatable .= $axecheck."\n";
     }
     $$rowtotal += $itemcount;
     return $datatable;
@@ -7896,6 +7900,7 @@
                overon => 'Override -- webDAV on',
                overoff => 'Override -- webDAV off',
                archive => 'Authors and co-author managers can download tar.gz file of Authoring Space',
+               axecheck => 'Accessibility checking available',
     );
 }
 
@@ -13972,9 +13977,10 @@
                            'authorquota'  => 500,
                            'webdav'       => 0,
                            'archive'      => 'off',
+                           'axecheck'     => 'off',
                          );
     my %titles = &authordefaults_titles();
-    foreach my $item ('nocodemirror','daxecollapse','domcoordacc','archive') {
+    foreach my $item ('nocodemirror','daxecollapse','domcoordacc','archive','axecheck') {
         if ($env{'form.'.$item} =~ /^(0|1)$/) {
             $confhash{$item} = $env{'form.'.$item};
         }
@@ -14019,7 +14025,7 @@
         $save_quotas{'webdav'}{'_LC_adv'} = $env{'form.webdav_LC_adv'};
     }
     if (ref($domconfig{'authordefaults'}) eq 'HASH') {
-        foreach my $item ('nocodemirror','daxecollapse','domcoordacc','copyright','sourceavail','archive') {
+        foreach my $item ('nocodemirror','daxecollapse','domcoordacc','copyright','sourceavail','archive','axecheck') {
             if (exists($domconfig{'authordefaults'}{$item})) {
                 if ($domconfig{'authordefaults'}{$item} ne $confhash{$item}) {
                     $changes{$item} = 1;
@@ -14050,9 +14056,9 @@
             }
         }
     } else {
-        foreach my $item ('nocodemirror','daxecollapse','domcoordacc','archive') {
+        foreach my $item ('nocodemirror','daxecollapse','domcoordacc','archive','axecheck') {
             if ($offon[$confhash{$item}] ne $staticdefaults{$item}) {
-                $changes{$item} = 1; 
+                $changes{$item} = 1;
             }
         }
         foreach my $item ('copyright','sourceavail') {
@@ -14147,7 +14153,7 @@
                 $resulttext .= '</ul></li>';
             }
             my $domcoordoverride;
-            foreach my $key ('editors','authorquota','webdav','webdav_LC_adv','archive') {
+            foreach my $key ('editors','authorquota','webdav','webdav_LC_adv','archive','axecheck') {
                 if (exists($changes{$key})) {
                     my $shown;
                     unless ($domcoordoverride) {
@@ -14179,7 +14185,7 @@
                         } else {
                             $shown = $titles{'none'};
                         }
-                    } elsif ($key eq 'archive') {
+                    } elsif (($key eq 'archive') || ($key eq 'axecheck')) {
                         $domdefaults{$key} = $confhash{$key};
                         $shown = ($confhash{$key} ? &mt('Yes') : &mt('No'));
                     }
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1533 loncom/interface/loncommon.pm:1.1534
--- loncom/interface/loncommon.pm:1.1533	Thu Jul 30 18:26:18 2026
+++ loncom/interface/loncommon.pm	Sun Aug 23 20:37:02 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1533 2026/07/30 18:26:18 raeburn Exp $
+# $Id: loncommon.pm,v 1.1534 2026/08/23 20:37:02 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -18964,6 +18964,12 @@
                          ($domdef{'archive'})) {
                     $userenv{'canarchive'} = 1;
                 }
+                if ($userenv{'authoraxecheck'}) {
+                    $userenv{'canaxecheck'} = 1;
+                } elsif (($userenv{'authoraxecheck'} eq '') &&
+                         ($domdef{'axecheck'})) {
+                    $userenv{'canaxecheck'} = 1;
+                }
             }
 
             $userenv{'canrequest.author'} =
@@ -21100,7 +21106,7 @@
         pdf => 'Recently generated printouts',
         csv => 'Recently generated accessibility reports',
         txt => 'Recently generated non-compliance',
-        log => 'Recently generated non-completion', 
+        log => 'Recently generated non-completion',
     );
     my $output;
     if ($spooldir) {
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.498 loncom/interface/loncreateuser.pm:1.499
--- loncom/interface/loncreateuser.pm:1.498	Sun Aug 23 19:16:30 2026
+++ loncom/interface/loncreateuser.pm	Sun Aug 23 20:37:02 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.498 2026/08/23 19:16:30 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.499 2026/08/23 20:37:02 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -245,7 +245,7 @@
         if (radioname) {
             if (radioname.length > 0) {
                 var setvis;
-                var RegExp = /^customtext_(aboutme|blog|portfolio|portaccess|timezone|webdav|archive)\$/;
+                var RegExp = /^customtext_(aboutme|blog|portfolio|portaccess|timezone|webdav|archive|axecheck)\$/;
                 for (var i=0; i<radioname.length; i++) {
                     if (radioname[i].checked == true) {
                         if (radioname[i].value == 1) {
@@ -286,6 +286,7 @@
                    'editors'    => "Available Editors",
                    'managers'   => "Co-authors who can add/revoke roles",
                    'archive'    => "Author and Managers can download tar.gz file of Authoring Space",
+                   'axecheck'   => "Accessibility Checker available in Authoring Space",
                    'portfolio'  => "Personal User Portfolio",
                    'portaccess' => "Portfolio Shareable",
                    'timezone'   => "Can set Time Zone",
@@ -340,8 +341,9 @@
             &Apache::lonnet::get_dom('configuration',['quotas','authordefaults'],$ccdomain);
         %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,'tools.webdav',
                                                     'authoreditors','authormanagers',
-                                                    'authorarchive','domcoord.author');
-        @usertools = ('webdav','editors','managers','archive');
+                                                    'authorarchive','domcoord.author',
+                                                    'authoraxecheck');
+        @usertools = ('webdav','editors','managers','archive','axecheck');
         $colspan = ' colspan="2"';
     } else {
         %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
@@ -367,17 +369,17 @@
                 $cust_off = '';
             }
         } elsif ($context eq 'authordefaults') {
-            if (($item eq 'editors') || ($item eq 'archive')) {
+            if (($item eq 'editors') || ($item eq 'archive') || ($item eq 'axecheck')) {
                 if ($userenv{'author'.$item} ne '') {
                     $cust_on = ' checked="checked" ';
                     $cust_off = '';
-                    if ($item eq 'archive') {
+                    if (($item eq 'archive') || ($item eq 'axecheck')) {
                         $curr_access = $userenv{'author'.$item};
                     }
-                } elsif ($item eq 'archive') {
+                } elsif (($item eq 'archive') || ($item eq 'axecheck')) {
                     $curr_access = 0;
                     if (ref($domconfig{'authordefaults'}) eq 'HASH') {
-                        $curr_access = $domconfig{'authordefaults'}{'archive'};
+                        $curr_access = $domconfig{'authordefaults'}{$item};
                     }
                 }
             } elsif ($item eq 'webdav') {
@@ -481,7 +483,7 @@
             my $current = $userenv{$context.'.'.$item};
             if ($item eq 'webdav') {
                 $current = $userenv{'tools.webdav'};
-            } elsif ($item eq 'archive') {
+            } elsif (($item eq 'archive') || ($item eq 'axecheck')) {
                 $current = $userenv{'author'.$item};
             }
             if ($current eq '') {
@@ -1568,7 +1570,7 @@
             unless ($isauthor) {
                 push(@toggles,'requestauthor');
             }
-            push(@toggles,('webdav','editors','archive'));
+            push(@toggles,('webdav','editors','archive','axecheck'));
         }
         if (&Apache::lonnet::allowed('mut',$ccdomain)) {
             push(@toggles,('aboutme','blog','portfolio','portaccess','timezone'));
@@ -3328,7 +3330,7 @@
     my @usertools = ('aboutme','blog','portfolio','portaccess','timezone');
     my @requestcourses = ('official','unofficial','community','textbook','placement','lti');
     my @requestauthor = ('requestauthor');
-    my @authordefaults = ('webdav','editors','archive');
+    my @authordefaults = ('webdav','editors','archive','axecheck');
     my ($othertitle,$usertypes,$types) = 
         &Apache::loncommon::sorted_inst_types($env{'form.ccdomain'});
     my %canmodify_status =
@@ -3466,6 +3468,12 @@
                                                       \%changeHash,'authordefaults');
 
                 }
+                if ($env{'form.customaxecheck'} == 1) {
+                    $newcustom{'axecheck'} = $env{'form.authordefaults_axecheck'};
+                    $changed{'axecheck'} = &tool_admin('axecheck',$newcustom{'axecheck'},
+                                                      \%changeHash,'authordefaults');
+
+                }
             }
             if ($canmodify_status{'inststatus'}) {
                 if (exists($env{'form.inststatus'})) {
@@ -3533,7 +3541,8 @@
              'id','permanentemail','portfolioquota','authorquota','inststatus',
              'tools.aboutme','tools.blog','tools.webdav',
              'tools.portfolio','tools.timezone','tools.portaccess',
-             'authormanagers','authoreditors','authorarchive','requestauthor',
+             'authormanagers','authoreditors','authorarchive',
+             'authoraxecheck','requestauthor',
              'requestcourses.official','requestcourses.unofficial',
              'requestcourses.community','requestcourses.textbook',
              'requestcourses.placement','requestcourses.lti',
@@ -3964,6 +3973,21 @@
                                     $newenvhash{'environment.canarchive'} =
                                         $domdefaults{'archive'};
                                 }
+                            } elsif ($key eq 'axecheck') {
+                                $newenvhash{'environment.author.'.$key} =
+                                    $changeHash{'author.'.$key};
+                                if ($changeHash{'author.'.$key} ne '') {
+                                    $newenvhash{'environment.canaxecheck'} =
+                                        $changeHash{'author.'.$key};
+                                } else {
+                                    unless ($got_domdefs) {
+                                        %domdefaults =
+                                           &Apache::lonnet::get_domain_defaults($env{'user.domain'});
+                                        $got_domdefs = 1;
+                                    }
+                                    $newenvhash{'environment.canaxecheck'} =
+                                        $domdefaults{'axecheck'};
+                                }
                             } elsif ($key ne 'quota') {
                                 $newenvhash{'environment.tools.'.$key} = 
                                     $changeHash{'tools.'.$key};
@@ -4188,6 +4212,7 @@
          'editors'        => "Available Editors in Authoring Space",
          'managers'       => "Co-authors who can add/revoke roles",
          'archive'        => "Author and Managers can download tar.gz file of Authoring Space",
+         'axecheck'       => "Accessibility Checking available in Authoring Space",
          'edit'           => 'Standard editor (Edit)',
          'xml'            => 'Text editor (EditXML)',
          'daxe'           => 'Daxe editor (Daxe)',
@@ -4221,7 +4246,7 @@
                     if ($entry eq 'requestauthor') {
                         @items = ($entry);
                     } elsif ($entry eq 'authordefaults') {
-                        @items = ('webdav','managers','editors','archive');
+                        @items = ('webdav','managers','editors','archive','axecheck');
                     } else {
                         @items = @{$requestcourses};
                     }
@@ -4475,6 +4500,9 @@
             } elsif ($tool eq 'archive') {
                 $envkey = 'authorarchive';
                 $newval = $env{'form.'.$context.'_'.$tool};
+            } elsif ($tool eq 'axecheck') {
+                $envkey = 'authoraxecheck';
+                $newval = $env{'form.'.$context.'_'.$tool};
             }
         } else {
             $newval = $env{'form.'.$context.'_'.$tool};
@@ -4506,7 +4534,7 @@
                 } elsif ($tool eq 'editors') {
                     $oldaccesstext->{$tool} = &mt('can use: [_1]',
                                                   join(', ', map { $tooldesc{$_} } split(/,/,$userenv->{$envkey})));
-                } elsif (($tool eq 'webdav') || ($tool eq 'archive')) {
+                } elsif (($tool eq 'webdav') || ($tool eq 'archive') || ($tool eq 'axecheck')) {
                     if ($userenv->{$envkey}) {
                         $oldaccesstext->{$tool} = &mt("availability set to 'on'");
                     } else {
@@ -4552,7 +4580,7 @@
                                     $managers =~ s/,/, /g;
                                     $newaccesstext->{$tool} = $managers;
                                 }
-                            } elsif (($tool eq 'webdav') || ($tool eq 'archive')) {
+                            } elsif (($tool eq 'webdav') || ($tool eq 'archive') || ($tool eq 'axecheck')) {
                                 if ($newval) {
                                     $newaccesstext->{$tool} = &mt("availability set to 'on'");
                                 } else {
@@ -4592,7 +4620,7 @@
                                     $managers =~ s/,/, /g;
                                     $newaccesstext->{$tool} = $managers;
                                 }
-                            } elsif (($tool eq 'webdav') || ($tool eq 'archive')) {
+                            } elsif (($tool eq 'webdav') || ($tool eq 'archive') || ($tool eq 'axecheck')) {
                                 if ($userenv->{$envkey}) {
                                     $newaccesstext->{$tool} = &mt("availability set to 'on'");
                                 } else {
@@ -4641,7 +4669,7 @@
                                 $managers =~ s/,/, /g;
                                 $newaccesstext->{$tool} = $managers;
                             }
-                        } elsif (($tool eq 'webdav') || ($tool eq 'archive')) {
+                        } elsif (($tool eq 'webdav') || ($tool eq 'archive') || ($tool eq 'axecheck')) {
                             if ($userenv->{$envkey}) {
                                 $newaccesstext->{$tool} = &mt("availability set to 'on'");
                             } else {
@@ -4689,7 +4717,7 @@
                         } elsif ($tool eq 'editors') {
                             $newaccesstext->{$tool} = &mt('can use: [_1]',
                                                           join(', ', map { $tooldesc{$_} } split(/,/,$newval)));
-                        } elsif (($tool eq 'webdav') || ($tool eq 'archive')) {
+                        } elsif (($tool eq 'webdav') || ($tool eq 'archive') || ($tool eq 'axecheck')) {
                             if ($newval) {
                                 $newaccesstext->{$tool} = &mt("availability set to 'on'");
                             } else {
@@ -5353,7 +5381,8 @@
             $toolchanged = 1;
             if ($tool eq 'requestauthor') {
                 $changeHash->{$context} = $settool;
-            } elsif (($tool eq 'managers') || ($tool eq 'editors') || ($tool eq 'archive')) {
+            } elsif (($tool eq 'managers') || ($tool eq 'editors') ||
+                     ($tool eq 'archive') || ($tool eq 'axecheck')) {
                 $changeHash->{'author'.$tool} = $settool;
             } elsif ($tool eq 'webdav') {
                 $changeHash->{'tools.'.$tool} = $settool;
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.575 loncom/interface/lonmenu.pm:1.576
--- loncom/interface/lonmenu.pm:1.575	Sun Aug 23 19:16:30 2026
+++ loncom/interface/lonmenu.pm	Sun Aug 23 20:37:02 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.575 2026/08/23 19:16:30 raeburn Exp $
+# $Id: lonmenu.pm,v 1.576 2026/08/23 20:37:02 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1303,10 +1303,14 @@
 s&7&7&archive.png&Export&dir[_1]&gocstr('/adm/cfile?action=archive','$esc_currdir')&Export Authoring Space Archive
 ENDMENUITEMS
                     }
-                }
-                $menuitems .= (<<ENDMENUITEMS);
+                    if ((($env{'environment.canaxecheck'}) &&
+                         ($uname eq $env{'user.name'}) && ($udom eq $env{'user.domain'})) ||
+                        ($env{"environment.internal.axecheck./$udom/$uname"})) {
+                        $menuitems .= (<<ENDMENUITEMS);
 s&7&8&accessibility-22x22.png&Accessibility&dir[_1]&gocstr('/adm/cfile?action=accessibility','$esc_currdir')&Check Accessibility
 ENDMENUITEMS
+                    }
+                }
             } else {
                 $currdir =~ s|[^/]+$||;
 		my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn);
@@ -1352,9 +1356,13 @@
 ENDMENUITEMS
                 }
                 if ($thisdisfn=~/\.(problem|exam|quiz|assess|survey|xml|x?html?)$/) {
-                    $menuitems .= (<<ENDMENUITEMS);
+                    if ((($env{'environment.canaxecheck'}) &&
+                        ($uname eq $env{'user.name'}) && ($udom eq $env{'user.domain'})) ||
+                        ($env{"environment.internal.axecheck./$udom/$uname"})) {
+                        $menuitems .= (<<ENDMENUITEMS);
 s&7&8&accessibility-22x22.png&Accessibility&dir[_1]&gocstr('/adm/cfile?action=accessibility','/priv/$udom/$uname/$cleandisfn')&Check Accessibility
 ENDMENUITEMS
+                    }
                 }
 #
 # "Exit Daxe" in Functions menu when using Daxe
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1550 loncom/lonnet/perl/lonnet.pm:1.1551
--- loncom/lonnet/perl/lonnet.pm:1.1550	Sun Aug 23 19:16:30 2026
+++ loncom/lonnet/perl/lonnet.pm	Sun Aug 23 20:37:03 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1550 2026/08/23 19:16:30 raeburn Exp $
+# $Id: lonnet.pm,v 1.1551 2026/08/23 20:37:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2888,7 +2888,7 @@
         $domdefaults{'requestauthor'} = $domconfig{'requestauthor'};
     }
     if (ref($domconfig{'authordefaults'}) eq 'HASH') {
-        foreach my $item ('nocodemirror','copyright','sourceavail','domcoordacc','editors','archive') {
+        foreach my $item ('nocodemirror','copyright','sourceavail','domcoordacc','editors','archive','axecheck') {
             if ($item eq 'editors') {
                 if (ref($domconfig{'authordefaults'}{'editors'}) eq 'ARRAY') {
                     $domdefaults{$item} = join(',',@{$domconfig{'authordefaults'}{'editors'}});
@@ -7198,13 +7198,13 @@
             if (($trole eq 'ca') || ($trole eq 'aa')) {
                 (undef,my ($audom,$auname)) = split(/\//,$area);
                 unless ($gotcoauconfig{$area}) {
-                    my @ca_settings = ('authoreditors','coauthorlist','coauthoroptin','authorarchive');
+                    my @ca_settings = ('authoreditors','coauthorlist','coauthoroptin','authorarchive','authoraxecheck');
                     my %info = &userenvironment($audom,$auname, at ca_settings);
                     $gotcoauconfig{$area} = 1;
                     foreach my $item (@ca_settings) {
                         if (exists($info{$item})) {
                             my $name = $item;
-                            if (($item eq 'authoreditors') || ($item eq 'authorarchive')) {
+                            if (($item eq 'authoreditors') || ($item eq 'authorarchive') || ($item eq 'authoraxecheck')) {
                                 $name =~ s/^author//;
                                 if ($info{$item} eq '') {
                                     my %domdefs;


More information about the LON-CAPA-cvs mailing list