--- loncom/interface/loncreateuser.pm 2005/06/17 21:04:40 1.104 +++ loncom/interface/loncreateuser.pm 2005/09/13 19:13:22 1.109 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.104 2005/06/17 21:04:40 albertel Exp $ +# $Id: loncreateuser.pm,v 1.109 2005/09/13 19:13:22 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -108,7 +108,8 @@ sub my_custom_roles { sub authorpriv { my ($auname,$audom)=@_; - unless (&Apache::lonnet::allowed('cca',$audom.'/'.$auname)) { return ''; } + unless ((&Apache::lonnet::allowed('cca',$audom.'/'.$auname)) + || (&Apache::lonnet::allowed('caa',$audom.'/'.$auname))) { return ''; } return 1; } @@ -155,14 +156,18 @@ $lt{'dom'}:$domform +ENDDOCUMENT + if (&Apache::lonnet::allowed('mcr','/')) { + $r->print(<

$lt{'ecrp'}$helpecpr

$lt{'nr'}: $choice
- - -ENDDOCUMENT + +ENDCUSTOM + } + $r->print(''); } # =================================================================== Phase two @@ -571,7 +576,7 @@ END $class='Domain'; } } - if ($role_code eq 'ca') { + if (($role_code eq 'ca') || ($role_code eq 'aa')) { $area=~/\/(\w+)\/(\w+)/; if (&authorpriv($2,$1)) { $allowed=1; @@ -660,7 +665,7 @@ END my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain); if ($currentauth=~/^krb(4|5):/) { $currentauth=~/^krb(4|5):(.*)/; - my $krbdefdom=$1; + my $krbdefdom=$2; my %param = ( formname => 'document.cu', kerb_def_dom => $krbdefdom ); @@ -775,6 +780,7 @@ ENDOTHERAUTHS 'sta' => "Start", 'end' => "End", 'cau' => "Co-Author", + 'caa' => "Assistant Co-Author", 'ssd' => "Set Start Date", 'sed' => "Set End Date" ); @@ -793,6 +799,17 @@ ENDOTHERAUTHS $lt{'sed'} + + +$lt{'caa'} +$cudom\_$cuname + +$lt{'ssd'} + +$lt{'sed'} + ENDCOAUTH } @@ -1533,6 +1550,7 @@ sub set_custom_role { $env{'user.name'}, $rolename)); } + $r->print('

Create another role, or Create/Modify a user.

'); $r->print(''); }