--- loncom/interface/domainprefs.pm 2010/09/12 22:12:52 1.123.2.2 +++ loncom/interface/domainprefs.pm 2010/12/05 21:56:38 1.123.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.123.2.2 2010/09/12 22:12:52 raeburn Exp $ +# $Id: domainprefs.pm,v 1.123.2.3 2010/12/05 21:56:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5437,6 +5437,15 @@ sub modify_defaults { my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); my @items = ('auth_def','auth_arg_def','lang_def','timezone_def','datelocale_def'); my @authtypes = ('internal','krb4','krb5','localauth'); + my @doms = &Apache::lonnet::current_machine_domains(); + my @langs; + foreach my $dom (@doms) { + if ($dom =~ /^(\w+c)itest$/) { + push (@langs,$1.'t'); + } else { + push(@langs,$dom); + } + } foreach my $item (@items) { $newvalues{$item} = $env{'form.'.$item}; if ($item eq 'auth_def') { @@ -5449,7 +5458,7 @@ sub modify_defaults { if ($newvalues{$item} ne '') { if ($newvalues{$item} =~ /^(\w+)/) { my $langcode = $1; - if (($langcode ne 'gci') && ($langcode ne 'gct') && + if ((!grep(/^\Q$langcode\E,@langs)) && ($langcode ne 'x_chef')) { if (code2language($langcode) eq '') { push(@errors,$item);