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

raeburn raeburn at source.lon-capa.org
Wed May 1 17:22:09 EDT 2024


raeburn		Wed May  1 21:22:09 2024 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  - Bug 6990: Ability to download tarball of Authoring Space's files/directories.
    Add capability to override domain default for individual author(s).
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.477 loncom/interface/loncreateuser.pm:1.478
--- loncom/interface/loncreateuser.pm:1.477	Wed May  1 15:18:58 2024
+++ loncom/interface/loncreateuser.pm	Wed May  1 21:22:09 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.477 2024/05/01 15:18:58 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.478 2024/05/01 21:22:09 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)\$/;
+                var RegExp = /^customtext_(aboutme|blog|portfolio|portaccess|timezone|webdav|archive)\$/;
                 for (var i=0; i<radioname.length; i++) {
                     if (radioname[i].checked == true) {
                         if (radioname[i].value == 1) {
@@ -362,6 +362,14 @@
                 if ($userenv{'author'.$item} ne '') {
                     $cust_on = ' checked="checked" ';
                     $cust_off = '';
+                    if ($item eq 'archive') {
+                        $curr_access = $userenv{'author'.$item};
+                    }
+                } elsif ($item eq 'archive') {
+                    $curr_access = 0;
+                    if (ref($domconfig{'authordefaults'}) eq 'HASH') {
+                        $curr_access = $domconfig{'authordefaults'}{'archive'};
+                    }
                 }
             } elsif ($item eq 'webdav') {
                 if ($userenv{'tools.'.$item} ne '') {
@@ -458,6 +466,8 @@
             my $current = $userenv{$context.'.'.$item};
             if ($item eq 'webdav') {
                 $current = $userenv{'tools.webdav'};
+            } elsif ($item eq 'archive') {
+                $current = $userenv{'author'.$item};
             }
             if ($current eq '') {
                 $custom_access =
@@ -1524,7 +1534,7 @@
             unless ($isauthor) {
                 push(@toggles,'requestauthor');
             }
-            push(@toggles,('webdav','editors'));
+            push(@toggles,('webdav','editors','archive'));
         }
         if (&Apache::lonnet::allowed('mut',$ccdomain)) {
             push(@toggles,('aboutme','blog','portfolio','portaccess','timezone'));




More information about the LON-CAPA-cvs mailing list