version 1.477, 2024/05/01 15:18:58
|
version 1.483, 2025/01/13 01:00:58
|
Line 245 function toggleCustom(form,item,name) {
|
Line 245 function toggleCustom(form,item,name) {
|
if (radioname) { |
if (radioname) { |
if (radioname.length > 0) { |
if (radioname.length > 0) { |
var setvis; |
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++) { |
for (var i=0; i<radioname.length; i++) { |
if (radioname[i].checked == true) { |
if (radioname[i].checked == true) { |
if (radioname[i].value == 1) { |
if (radioname[i].value == 1) { |
Line 285 sub build_tools_display {
|
Line 285 sub build_tools_display {
|
'webdav' => "WebDAV access to Authoring Spaces (https)", |
'webdav' => "WebDAV access to Authoring Spaces (https)", |
'editors' => "Available Editors", |
'editors' => "Available Editors", |
'managers' => "Co-authors who can add/revoke roles", |
'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", |
'portfolio' => "Personal User Portfolio", |
'portaccess' => "Portfolio Shareable", |
'portaccess' => "Portfolio Shareable", |
'timezone' => "Can set Time Zone", |
'timezone' => "Can set Time Zone", |
Line 362 sub build_tools_display {
|
Line 362 sub build_tools_display {
|
if ($userenv{'author'.$item} ne '') { |
if ($userenv{'author'.$item} ne '') { |
$cust_on = ' checked="checked" '; |
$cust_on = ' checked="checked" '; |
$cust_off = ''; |
$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') { |
} elsif ($item eq 'webdav') { |
if ($userenv{'tools.'.$item} ne '') { |
if ($userenv{'tools.'.$item} ne '') { |
$cust_on = ' checked="checked" '; |
$cust_on = ' checked="checked" '; |
$cust_off = ''; |
$cust_off = ''; |
|
$curr_access = $userenv{'tools.'.$item}; |
|
} else { |
|
$curr_access = |
|
&Apache::lonnet::usertools_access($ccuname,$ccdomain,$item,'reload', |
|
undef,\%userenv,'', |
|
{'is_adv' => $isadv}); |
} |
} |
} |
} |
} elsif ($userenv{$context.'.'.$item} ne '') { |
} elsif ($userenv{$context.'.'.$item} ne '') { |
Line 458 sub build_tools_display {
|
Line 472 sub build_tools_display {
|
my $current = $userenv{$context.'.'.$item}; |
my $current = $userenv{$context.'.'.$item}; |
if ($item eq 'webdav') { |
if ($item eq 'webdav') { |
$current = $userenv{'tools.webdav'}; |
$current = $userenv{'tools.webdav'}; |
|
} elsif ($item eq 'archive') { |
|
$current = $userenv{'author'.$item}; |
} |
} |
if ($current eq '') { |
if ($current eq '') { |
$custom_access = |
$custom_access = |
Line 1515 sub print_user_modification_page {
|
Line 1531 sub print_user_modification_page {
|
'bread_crumbs_component' => 'User Management'}; |
'bread_crumbs_component' => 'User Management'}; |
if ($env{'form.popup'}) { |
if ($env{'form.popup'}) { |
$args->{'no_nav_bar'} = 1; |
$args->{'no_nav_bar'} = 1; |
|
$args->{'add_modal'} = 1; |
} |
} |
if (($context eq 'domain') && ($env{'request.role.domain'} eq $ccdomain)) { |
if (($context eq 'domain') && ($env{'request.role.domain'} eq $ccdomain)) { |
my @toggles; |
my @toggles; |
Line 1524 sub print_user_modification_page {
|
Line 1541 sub print_user_modification_page {
|
unless ($isauthor) { |
unless ($isauthor) { |
push(@toggles,'requestauthor'); |
push(@toggles,'requestauthor'); |
} |
} |
push(@toggles,('webdav','editors')); |
push(@toggles,('webdav','editors','archive')); |
} |
} |
if (&Apache::lonnet::allowed('mut',$ccdomain)) { |
if (&Apache::lonnet::allowed('mut',$ccdomain)) { |
push(@toggles,('aboutme','blog','portfolio','portaccess','timezone')); |
push(@toggles,('aboutme','blog','portfolio','portaccess','timezone')); |
Line 2900 sub personal_data_display {
|
Line 2917 sub personal_data_display {
|
$rowcount ++; |
$rowcount ++; |
} |
} |
} |
} |
|
my %shownfields; |
|
if ($env{'request.role.domain'} ne $ccdomain) { |
|
my %shownfields_by_type = |
|
&Apache::lonuserutils::get_othdom_shownfields($ccdomain,\@userinfo); |
|
my @types = split(/:/,$userenv{'inststatus'}); |
|
if (@types == 0) { |
|
@types = ('default'); |
|
} |
|
foreach my $type (@types) { |
|
if (ref($shownfields_by_type{$type}) eq 'HASH') { |
|
foreach my $field (keys(%{$shownfields_by_type{$type}})) { |
|
if ($shownfields_by_type{$type}{$field}) { |
|
$shownfields{$field} = 1; |
|
} |
|
} |
|
} |
|
} |
|
} |
foreach my $item (@userinfo) { |
foreach my $item (@userinfo) { |
my $rowtitle = $lt{$item}; |
my $rowtitle = $lt{$item}; |
my $hiderow = 0; |
my $hiderow = 0; |
Line 2946 sub personal_data_display {
|
Line 2981 sub personal_data_display {
|
$row .= '<br />'.&Apache::lonuserutils::forceid_change($context); |
$row .= '<br />'.&Apache::lonuserutils::forceid_change($context); |
} |
} |
} else { |
} else { |
$row .= $userenv{$item}; |
if ($env{'request.role.domain'} ne $ccdomain) { |
|
if ($shownfields{$item}) { |
|
$row .= $userenv{$item}; |
|
} else { |
|
$row .= &mt('not shown'); |
|
} |
|
} else { |
|
$row .= $userenv{$item}; |
|
} |
} |
} |
} |
} |
$row .= &Apache::lonhtmlcommon::row_closure(1); |
$row .= &Apache::lonhtmlcommon::row_closure(1); |
Line 3366 sub update_user_data {
|
Line 3409 sub update_user_data {
|
if ($env{'form.customwebdav'} == 1) { |
if ($env{'form.customwebdav'} == 1) { |
$newcustom{'webdav'} = $env{'form.authordefaults_webdav'}; |
$newcustom{'webdav'} = $env{'form.authordefaults_webdav'}; |
$changed{'webdav'} = &tool_admin('webdav',$newcustom{'webdav'}, |
$changed{'webdav'} = &tool_admin('webdav',$newcustom{'webdav'}, |
\%changeHash,'authordefaults'); |
\%changeHash,'authordefaults'); |
} |
} |
if ($env{'for.customarchive'} == 1) { |
if ($env{'form.customarchive'} == 1) { |
$newcustom{'archive'} = $env{'form.authordefaults_archive'}; |
$newcustom{'archive'} = $env{'form.authordefaults_archive'}; |
$changed{'archive'} = &tool_admin('archive',$newcustom{'archive'}, |
$changed{'archive'} = &tool_admin('archive',$newcustom{'archive'}, |
\%changeHash,'authordefaults'); |
\%changeHash,'authordefaults'); |
|
|
} |
} |
} |
} |
Line 3857 sub update_user_data {
|
Line 3900 sub update_user_data {
|
$newenvhash{'environment.editors'} = 'edit,xml'; |
$newenvhash{'environment.editors'} = 'edit,xml'; |
} |
} |
} |
} |
|
} elsif ($key eq 'archive') { |
|
$newenvhash{'environment.author.'.$key} = |
|
$changeHash{'author.'.$key}; |
|
if ($changeHash{'author.'.$key} ne '') { |
|
$newenvhash{'environment.canarchive'} = |
|
$changeHash{'author.'.$key}; |
|
} else { |
|
unless ($got_domdefs) { |
|
%domdefaults = |
|
&Apache::lonnet::get_domain_defaults($env{'user.domain'}); |
|
$got_domdefs = 1; |
|
} |
|
$newenvhash{'environment.canarchive'} = |
|
$domdefaults{'archive'}; |
|
} |
} elsif ($key ne 'quota') { |
} elsif ($key ne 'quota') { |
$newenvhash{'environment.tools.'.$key} = |
$newenvhash{'environment.tools.'.$key} = |
$changeHash{'tools.'.$key}; |
$changeHash{'tools.'.$key}; |
Line 6461 sub handler {
|
Line 6519 sub handler {
|
$r->internal_redirect('/adm/viewcoauthors'); |
$r->internal_redirect('/adm/viewcoauthors'); |
return OK; |
return OK; |
} |
} |
|
} elsif (($env{'form.action'} eq 'setenv') && ($context eq 'author')) { |
|
my ($role,$audom,$auname,$canview,$canedit) = |
|
&Apache::lonviewcoauthors::get_allowable(); |
|
push(@{$brcrum}, |
|
{href => '/adm/createuser?action=calist', |
|
text => 'Coauthor-viewable list', |
|
help => 'Author_List_Coauthors'}); |
|
my $args = { 'bread_crumbs' => $brcrum }; |
|
$r->print(&Apache::loncommon::start_page('Coauthor-viewable list',undef, |
|
$args)); |
|
my %viewsettings = |
|
&Apache::lonviewcoauthors::retrieve_view_settings($auname,$audom,$role); |
|
if ($viewsettings{'show'} eq 'none') { |
|
$r->print('<h3>'.&mt('Coauthor-viewable listing').'</h3>'. |
|
'<p class="LC_info">'. |
|
&mt('Listing of co-authors not enabled for this Authoring Space'). |
|
'</p>'); |
|
} else { |
|
&Apache::lonviewcoauthors::print_coauthors($r,$auname,$audom,$role, |
|
'/adm/createuser',\%viewsettings); |
|
} |
} else { |
} else { |
$bread_crumbs_component = 'User Management'; |
$bread_crumbs_component = 'User Management'; |
$args = { bread_crumbs => $brcrum, |
$args = { bread_crumbs => $brcrum, |
Line 6965 sub print_main_menu {
|
Line 7044 sub print_main_menu {
|
); |
); |
} |
} |
} elsif ($context eq 'author') { |
} elsif ($context eq 'author') { |
|
my $coauthorlist; |
|
if ($env{'request.role'} =~ m{^(?:ca|aa)\./($match_domain)/($match_username)$}) { |
|
if ($env{'environment.internal.coauthorlist./'.$1.'/'.$2}) { |
|
$coauthorlist = 1; |
|
} |
|
} elsif ($env{'request.role'} eq "au./$env{'user.domain'}/") { |
|
if ($env{'environment.coauthorlist'}) { |
|
$coauthorlist = 1; |
|
} |
|
} |
|
if ($coauthorlist) { |
|
push(@{ $menu[1]->{items} }, |
|
{ |
|
linktext => 'Co-author-viewable list', |
|
icon => 'clst.png', |
|
#help => 'Coauthor_Listing', |
|
url => '/adm/createuser?action=calist&forceedit=0', |
|
permission => $permission->{'cusr'}, |
|
linktitle => 'Co-author-viewable listing', |
|
}); |
|
} |
push(@{ $menu[2]->{items} }, #Category: Administration |
push(@{ $menu[2]->{items} }, #Category: Administration |
{ |
{ |
linktext => 'Change Log', |
linktext => 'Change Log', |