--- loncom/interface/loncreateuser.pm 2017/08/03 16:22:09 1.443 +++ loncom/interface/loncreateuser.pm 2017/08/07 20:22:13 1.444 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.443 2017/08/03 16:22:09 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.444 2017/08/07 20:22:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -886,7 +886,15 @@ ENDBLOCK (!(($env{'form.action'} eq 'singleuser') && ($context eq 'domain') && (!&Apache::lonnet::allowed('mau',$env{'request.role.domain'}))))) { my $defdom=$env{'request.role.domain'}; - my $domform = &Apache::loncommon::select_dom_form($defdom,'srchdomain'); + my ($trustedref,$untrustedref); + if ($context eq 'course') { + ($trustedref,$untrustedref) = &Apache::lonnet::trusted_domains('enroll',$defdom); + } elsif ($context eq 'author') { + ($trustedref,$untrustedref) = &Apache::lonnet::trusted_domains('othcoau',$defdom); + } elsif ($context eq 'domain') { + ($trustedref,$untrustedref) = &Apache::lonnet::trusted_domains('domroles',$defdom); + } + my $domform = &Apache::loncommon::select_dom_form($defdom,'srchdomain',undef,undef,undef,$trustedref,$untrustedref); my %lt=&Apache::lonlocal::texthash( 'enro' => 'Enroll one student', 'enrm' => 'Enroll one member', @@ -1476,8 +1484,10 @@ ENDAUTH if ($env{'request.role.domain'} eq $ccdomain) { $r->print(&build_tools_display($ccuname,$ccdomain,'requestcourses')); } else { - $r->print(&coursereq_externaluser($ccuname,$ccdomain, - $env{'request.role.domain'})); + if (&Apache::lonnet::will_trust('reqcrs',$ccdomain,$env{'request.role.domain'})) { + $r->print(&coursereq_externaluser($ccuname,$ccdomain, + $env{'request.role.domain'})); + } } $r->print(&Apache::loncommon::end_data_table()); } @@ -6129,10 +6139,11 @@ ENDSCRIPT } elsif ($curr_types eq '') { $add_domtitle = &mt('Users in other domain:'); } + my ($trustedref,$untrustedref) = &Apache::lonnet::trusted_domains('enroll',$cdom); $output .= &Apache::loncommon::start_data_table_row() .''.$add_domtitle.'
' .&Apache::loncommon::select_dom_form('','selfenroll_newdom', - $includeempty,$showdomdesc,'','','',$readonly) + $includeempty,$showdomdesc,'',$trustedref,$untrustedref,$readonly) .'' .''.&Apache::loncommon::end_data_table_row() .&Apache::loncommon::end_data_table();