--- loncom/interface/domainprefs.pm 2009/07/25 14:44:50 1.98
+++ loncom/interface/domainprefs.pm 2009/08/02 07:21:18 1.99
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.98 2009/07/25 14:44:50 raeburn Exp $
+# $Id: domainprefs.pm,v 1.99 2009/08/02 07:21:18 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1599,7 +1599,11 @@ sub print_usercreation {
&Apache::loncommon::sorted_inst_types($dom);
if (ref($usertypes) eq 'HASH') {
if (keys(%{$usertypes}) > 0) {
- $datatable .= &insttypes_row($settings->{cancreate},$types,$usertypes,
+ my $createsettings;
+ if (ref($settings) eq 'HASH') {
+ $createsettings = $settings->{cancreate};
+ }
+ $datatable .= &insttypes_row($createsettings,$types,$usertypes,
$dom,$numinrow,$othertitle,
'statustocreate');
$$rowtotal ++;
@@ -2520,12 +2524,14 @@ sub insttypes_row {
$output .= '
';
}
my $check = ' ';
- if (ref($settings->{$context}) eq 'ARRAY') {
- if (grep(/^\Q$types->[$i]\E$/,@{$settings->{$context}})) {
+ if (ref($settings) eq 'HASH') {
+ if (ref($settings->{$context}) eq 'ARRAY') {
+ if (grep(/^\Q$types->[$i]\E$/,@{$settings->{$context}})) {
+ $check = ' checked="checked" ';
+ }
+ } elsif ($context eq 'statustocreate') {
$check = ' checked="checked" ';
}
- } elsif ($context eq 'statustocreate') {
- $check = ' checked="checked" ';
}
$output .= ''.
' |