--- loncom/interface/loncreateuser.pm 2024/05/01 15:18:58 1.477 +++ loncom/interface/loncreateuser.pm 2024/05/01 21:23:20 1.479 @@ -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.479 2024/05/01 21:23:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -245,7 +245,7 @@ function toggleCustom(form,item,name) { 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 "WebDAV access to Authoring Spaces (https)", 'editors' => "Available Editors", 'managers' => "Co-authors who can add/revoke roles", - 'archive' => "Managers can download tar.gz file of Authoring Space", + 'archive' => "Managers can download tar.gz file of Authoring Space", 'portfolio' => "Personal User Portfolio", 'portaccess' => "Portfolio Shareable", 'timezone' => "Can set Time Zone", @@ -362,6 +362,14 @@ sub build_tools_display { 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 @@ sub build_tools_display { 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 @@ sub print_user_modification_page { 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')); @@ -3366,12 +3376,12 @@ sub update_user_data { if ($env{'form.customwebdav'} == 1) { $newcustom{'webdav'} = $env{'form.authordefaults_webdav'}; $changed{'webdav'} = &tool_admin('webdav',$newcustom{'webdav'}, - \%changeHash,'authordefaults'); + \%changeHash,'authordefaults'); } if ($env{'for.customarchive'} == 1) { $newcustom{'archive'} = $env{'form.authordefaults_archive'}; $changed{'archive'} = &tool_admin('archive',$newcustom{'archive'}, - \%changeHash,'authordefaults'); + \%changeHash,'authordefaults'); } }