--- loncom/interface/domainprefs.pm 2009/08/11 23:24:29 1.102 +++ loncom/interface/domainprefs.pm 2009/08/20 20:13:06 1.103 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.102 2009/08/11 23:24:29 raeburn Exp $ +# $Id: domainprefs.pm,v 1.103 2009/08/20 20:13:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1222,9 +1222,12 @@ sub print_quotas { if ($option eq 'autolimit') { $cell{$item} .= ''; + 'value="'.$currlimit.'" />'; } $cell{$item} .= '  '; + if ($option eq 'autolimit') { + $cell{$item} .= $titles{'unlimited'} + } } } else { my $checked = 'checked="checked" '; @@ -1872,6 +1875,7 @@ sub courserequest_titles { approve => 'Approval by Dom. Coord.', validate => 'With validation', autolimit => 'Numerical limit', + unlimited => '(blank for unlimited)', ); return %titles; } @@ -4530,6 +4534,8 @@ sub modify_usercreation { if (@{$types} > 0) { @{$cancreate{'statustocreate'}} = &Apache::loncommon::get_env_multiple('form.statustocreate'); + } else { + @{$cancreate{'statustocreate'}} = (); } push(@contexts,'statustocreate'); } @@ -4538,9 +4544,11 @@ sub modify_usercreation { if (($item eq 'selfcreate') || ($item eq 'statustocreate')) { if (ref($curr_usercreation{'cancreate'}{$item}) eq 'ARRAY') { foreach my $curr (@{$curr_usercreation{'cancreate'}{$item}}) { - if (!grep(/^$curr$/,@{$cancreate{$item}})) { - if (!grep(/^$item$/,@{$changes{'cancreate'}})) { - push(@{$changes{'cancreate'}},$item); + if (ref($cancreate{$item}) eq 'ARRAY') { + if (!grep(/^$curr$/,@{$cancreate{$item}})) { + if (!grep(/^$item$/,@{$changes{'cancreate'}})) { + push(@{$changes{'cancreate'}},$item); + } } } } @@ -5009,8 +5017,10 @@ sub modify_defaults { if ($newvalues{$item} ne '') { if ($newvalues{$item} =~ /^(\w+)/) { my $langcode = $1; - if (code2language($langcode) eq '') { - push(@errors,$item); + if ($langcode ne 'x_chef') { + if (code2language($langcode) eq '') { + push(@errors,$item); + } } } else { push(@errors,$item);