--- loncom/interface/domainprefs.pm 2014/05/09 17:43:13 1.243 +++ loncom/interface/domainprefs.pm 2014/05/30 01:39:48 1.246 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.243 2014/05/09 17:43:13 raeburn Exp $ +# $Id: domainprefs.pm,v 1.246 2014/05/30 01:39:48 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -8530,7 +8530,7 @@ sub modify_selfcreation { # value set to one), if self-creation with e-mail address permitted, where $type is user type: faculty, staff, student etc. # - if ($env{'form.cancreate_email'} eq 'email') { + if ($env{'form.cancreate_email'}) { push(@contexts,'emailusername'); if (ref($types) eq 'ARRAY') { foreach my $type (@{$types}) { @@ -8948,17 +8948,19 @@ sub modify_selfcreation { foreach my $type (@{$types}) { if (ref($cancreate{'emailusername'}{$type}) eq 'HASH') { if (keys(%{$cancreate{'emailusername'}{$type}}) > 0) { - $chgtext .= &mt('When self-creating account with e-mail as username, the following information will be provided by [_1]:',$usertypes->{$type}). + $chgtext .= &mt('When self-creating account with e-mail as username, the following information will be provided by [_1]:',"'$usertypes->{$type}'"). ''; + } else { + $chgtext .= &mt('When self creating account with e-mail as username, no information besides e-mail address will be provided by [_1].',"'$usertypes->{$type}'").'
'; } - $chgtext .= ''; } else { - $chgtext .= &mt('When self creating account with e-mail as username, no information besides e-mail address will be provided by [_1].',$usertypes->{$type}).'
'; + $chgtext .= &mt('When self creating account with e-mail as username, no information besides e-mail address will be provided by [_1].',"'$usertypes->{$type}'").'
'; } } } @@ -9765,9 +9767,17 @@ sub modify_coursecategories { } $resulttext .= ''; if ($changes{'unauth'} || $changes{'auth'}) { - &Apache::loncommon::devalidate_domconfig_cache($dom); + my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); + if ($changes{'auth'}) { + $domdefaults{'catauth'} = $domconfig{'coursecategories'}{'auth'}; + } + if ($changes{'unauth'}) { + $domdefaults{'catunauth'} = $domconfig{'coursecategories'}{'unauth'}; + } + my $cachetime = 24*60*60; + &Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime); if (ref($lastactref) eq 'HASH') { - $lastactref->{'domainconfig'} = 1; + $lastactref->{'domdefaults'} = 1; } } } else {