--- loncom/interface/loncreateuser.pm 2023/11/03 01:12:15 1.470 +++ loncom/interface/loncreateuser.pm 2023/11/04 00:06:00 1.472 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.470 2023/11/03 01:12:15 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.472 2023/11/04 00:06:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -324,7 +324,8 @@ sub build_tools_display { %domconfig = &Apache::lonnet::get_dom('configuration',['quotas','authordefaults'],$ccdomain); %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,'tools.webdav', - 'authoreditors','authormanagers'); + 'authoreditors','authormanagers', + 'domcoord.author'); @usertools = ('webdav','editors','managers'); $colspan = ' colspan="2"'; } else { @@ -590,7 +591,9 @@ sub build_tools_display { } elsif ($item eq 'managers') { $output .= '
'.&mt('Select manager(s)').': '; + $output .= '
'.&mt('If checked, can manage').': '; foreach my $user (@possmanagers) { my $checked; if (grep(/^\Q$user\E$/,@custommanagers)) { @@ -6502,6 +6510,15 @@ function updateCols(caller) { document.getElementById('showcolstart').checked = false; document.getElementById('showcolend').checked = false; } + if (context == 'author') { + if (document.studentform.Status.options[document.studentform.Status.selectedIndex].value == 'Expired') { + document.getElementById('showcolmanager').checked = false; + document.getElementById('showcolmanager').disabled = 'disabled'; + } else if (document.studentform.showrole.options[document.studentform.showrole.selectedIndex].value != 'aa') { + document.getElementById('showcolmanager').checked = true; + document.getElementById('showcolmanager').disabled = ''; + } + } } } if (caller == 'output') { @@ -6587,6 +6604,15 @@ function updateCols(caller) { } } } + if (context == 'author') { + if (document.studentform.showrole.options[document.studentform.showrole.selectedIndex].value == 'aa') { + document.getElementById('showcolmanager').checked = false; + document.getElementById('showcolmanager').disabled = 'disabled'; + } else if (document.studentform.Status.options[document.studentform.Status.selectedIndex].value != 'Expired') { + document.getElementById('showcolmanager').checked = true; + document.getElementById('showcolmanager').disabled = ''; + } + } } return; } @@ -6892,7 +6918,7 @@ sub print_main_menu { linktitle => 'View change log.', }, { - linktext => 'Co-authors who can add/revoke co-author roles', + linktext => 'Co-author Managers', icon => 'helpdesk-access.png', #help => 'Coauthor_Management', url => '/adm/createuser?action=camanagers', @@ -6900,7 +6926,7 @@ sub print_main_menu { linktitle => 'Assign/Revoke right to manage co-author roles', }, { - linktext => 'Configure coauthor-viewable listing', + linktext => 'Configure Coauthor Listing', icon => 'helpdesk-access.png', #help => 'Coauthor_Settings', url => '/adm/createuser?action=calist&forceedit=1',