--- loncom/interface/domainprefs.pm 2009/08/02 07:21:18 1.99 +++ loncom/interface/domainprefs.pm 2009/08/06 15:14:08 1.100 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.99 2009/08/02 07:21:18 raeburn Exp $ +# $Id: domainprefs.pm,v 1.100 2009/08/06 15:14:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1518,7 +1518,7 @@ sub print_usercreation { $rowcount ++; } } elsif ($position eq 'middle') { - my @creators = ('author','course','selfcreate'); + my @creators = ('author','course','requestcrs','selfcreate'); my ($rules,$ruleorder) = &Apache::lonnet::inst_userrules($dom,'username'); my %lt = &usercreation_types(); @@ -1721,6 +1721,7 @@ sub usercreation_types { my %lt = &Apache::lonlocal::texthash ( author => 'When adding a co-author', course => 'When adding a user to a course', + requestcrs => 'When requesting a course', selfcreate => 'User creates own account', any => 'Any', official => 'Institutional only ', @@ -4028,7 +4029,7 @@ sub modify_usercreation { my @username_rule = &Apache::loncommon::get_env_multiple('form.username_rule'); my @id_rule = &Apache::loncommon::get_env_multiple('form.id_rule'); my @email_rule = &Apache::loncommon::get_env_multiple('form.email_rule'); - my @contexts = ('author','course','selfcreate'); + my @contexts = ('author','course','requestcrs','selfcreate'); foreach my $item(@contexts) { if ($item eq 'selfcreate') { @{$cancreate{$item}} = &Apache::loncommon::get_env_multiple('form.can_createuser_'.$item); @@ -4232,37 +4233,63 @@ sub modify_usercreation { if (ref($changes{'cancreate'}) eq 'ARRAY') { my %lt = &usercreation_types(); foreach my $type (@{$changes{'cancreate'}}) { - my $chgtext = $lt{$type}.', '; + my $chgtext; + unless ($type eq 'statustocreate') { + $chgtext = $lt{$type}.', '; + } if ($type eq 'selfcreate') { if (@{$cancreate{$type}} == 0) { $chgtext .= &mt('creation of a new user account is not permitted.'); } else { - $chgtext .= &mt('creation of a new account is permitted for: