--- loncom/interface/loncreateuser.pm 2005/01/30 15:34:46 1.99 +++ loncom/interface/loncreateuser.pm 2005/06/17 21:04:40 1.104 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.99 2005/01/30 15:34:46 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.104 2005/06/17 21:04:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -108,10 +108,7 @@ sub my_custom_roles { sub authorpriv { my ($auname,$audom)=@_; - if (($auname ne $ENV{'user.name'}) || - (($audom ne $ENV{'user.domain'}) && - ($audom ne $ENV{'request.role.domain'}))) { return ''; } - unless (&Apache::lonnet::allowed('cca',$audom)) { return ''; } + unless (&Apache::lonnet::allowed('cca',$audom.'/'.$auname)) { return ''; } return 1; } @@ -119,9 +116,10 @@ sub authorpriv { sub print_username_entry_form { my $r=shift; - my $defdom=$ENV{'request.role.domain'}; + my $defdom=$env{'request.role.domain'}; my @domains = &Apache::loncommon::get_domains(); my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain'); + my $html=&Apache::lonxml::xmlbegin(); my $bodytag =&Apache::loncommon::bodytag('Create Users, Change User Privileges').&Apache::loncommon::help_open_menu('',undef,undef,'',282,'Instructor Interface'); my $selscript=&Apache::loncommon::studentbrowser_javascript(); my $sellink=&Apache::loncommon::selectstudent_link @@ -141,7 +139,7 @@ sub print_username_entry_form { my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges'); my $helpecpr=&Apache::loncommon::help_open_topic('Course_Editing_Custom_Roles'); $r->print(<<"ENDDOCUMENT"); - +$html