--- loncom/interface/loncreateuser.pm	2017/01/28 03:48:44	1.432
+++ loncom/interface/loncreateuser.pm	2017/01/28 21:35:49	1.433
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.432 2017/01/28 03:48:44 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.433 2017/01/28 21:35:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7207,7 +7207,7 @@ sub print_helpdeskaccess_display {
     my $confname = $cdom.'-domainconfig';
     my $crstype = &Apache::loncommon::course_type();
 
-    my @accesstypes = ('all','none');
+    my @accesstypes = ('all','anydh','anyda','none');
     my ($numstatustypes,@jsarray);
     my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($cdom);
     if (ref($types) eq 'ARRAY') {
@@ -7416,7 +7416,9 @@ ENDJS
                     'rou'    => 'Role usage',
                     'whi'    => 'Which helpdesk personnel may use this role?',
                     'udd'    => 'Use domain default',
-                    'all'    => 'All',
+                    'all'    => 'All with domain helpdesk or helpdesk assistant role',
+                    'anydh'  => 'All with domain helpdesk role',
+                    'anyda'  => 'All with domain helpdesk assistant role',
                     'none'   => 'None',
                     'status' => 'Determined based on institutional status',
                     'inc'    => 'Include all, but exclude specific personnel',
@@ -7659,6 +7661,10 @@ sub domain_adhoc_access {
                 }
             } elsif ($access eq 'none') {
                 $domusage{$role} = &mt('No one in the domain');
+            } elsif ($access eq 'anydh') {
+                $domusage{$role} = &mt('Any user in domain with active [_1] role',&Apache::lonnet::plaintext('dh'));
+            } elsif ($access eq 'anyda') {
+                $domusage{$role} = &mt('Any user in domain with active [_1] role',&Apache::lonnet::plaintext('da'));
             } elsif ($access eq 'all') {
                 $domusage{$role} = &mt('Any user in domain with active [_1] or [_2] role',
                                        &Apache::lonnet::plaintext('dh'),&Apache::lonnet::plaintext('da'));
@@ -7846,7 +7852,7 @@ sub update_helpdeskaccess {
         $r->print('<p class="LC_error">'.&mt('You do not have permission to change helpdesk access.').'</p>');
         return;
     }
-    my @accesstypes = ('all','none','status','inc','exc');
+    my @accesstypes = ('all','anydh','anyda','none','status','inc','exc');
     my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
     my $confname = $cdom.'-domainconfig';
@@ -8097,6 +8103,12 @@ sub update_helpdeskaccess {
                         if ($env{'form.'.$role.'_incrs'}) {
                             if ($newsettings{$role}{'access'} eq 'all') {
                                 $r->print(&mt('All helpdesk staff can access '.lc($crstype).' with this role.'));
+                            } elsif ($newsettings{$role}{'access'} eq 'anydh') {
+                                $r->print(&mt('Helpdesk staff can use this role if they have an active [_1] role',
+                                              &Apache::lonnet::plaintext('dh')));
+                            } elsif ($newsettings{$role}{'access'} eq 'anyda') {
+                                $r->print(&mt('Helpdesk staff can use this role if they have an active [_1] role',
+                                              &Apache::lonnet::plaintext('da')));
                             } elsif ($newsettings{$role}{'access'} eq 'none') {
                                 $r->print(&mt('No helpdesk staff can access '.lc($crstype).' with this role.'));
                             } elsif ($newsettings{$role}{'access'} eq 'status') {