[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /interface domainprefs.pm
raeburn
raeburn@source.lon-capa.org
Wed, 17 Dec 2008 22:13:22 -0000
raeburn Wed Dec 17 22:13:22 2008 EDT
Modified files: (Branch: version_2_8_X)
/loncom/interface domainprefs.pm
Log:
- Backport 1.78, 1.79.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.76.2.1 loncom/interface/domainprefs.pm:1.76.2.2
--- loncom/interface/domainprefs.pm:1.76.2.1 Thu Dec 11 13:58:30 2008
+++ loncom/interface/domainprefs.pm Wed Dec 17 22:13:22 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.76.2.1 2008/12/11 13:58:30 raeburn Exp $
+# $Id: domainprefs.pm,v 1.76.2.2 2008/12/17 22:13:22 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1246,10 +1246,12 @@
if (ref($types) eq 'ARRAY') {
foreach my $type (@{$types}) {
my $currdefquota;
- if (ref($settings->{defaultquota}) eq 'HASH') {
- $currdefquota = $settings->{defaultquota}->{$type};
- } else {
- $currdefquota = $settings->{$type};
+ if (ref($settings) eq 'HASH') {
+ if (ref($settings->{defaultquota}) eq 'HASH') {
+ $currdefquota = $settings->{defaultquota}->{$type};
+ } else {
+ $currdefquota = $settings->{$type};
+ }
}
if (defined($usertypes->{$type})) {
$typecount ++;
@@ -1259,9 +1261,11 @@
'<td class="LC_left_item">';
foreach my $item (@usertools) {
my $checked = 'checked="checked" ';
- if (ref($settings->{$item}) eq 'HASH') {
- if ($settings->{$item}->{$type} == 0) {
- $checked = '';
+ if (ref($settings) eq 'HASH') {
+ if (ref($settings->{$item}) eq 'HASH') {
+ if ($settings->{$item}->{$type} == 0) {
+ $checked = '';
+ }
}
}
$datatable .= '<span class="LC_nobreak"><label>'.
@@ -1291,9 +1295,11 @@
'<td class="LC_left_item">';
foreach my $item (@usertools) {
my $checked = 'checked="checked" ';
- if (ref($settings->{$item}) eq 'HASH') {
- if ($settings->{$item}->{'default'} == 0) {
- $checked = '';
+ if (ref($settings) eq 'HASH') {
+ if (ref($settings->{$item}) eq 'HASH') {
+ if ($settings->{$item}->{'default'} == 0) {
+ $checked = '';
+ }
}
}
$datatable .= '<span class="LC_nobreak"><label>'.
@@ -1311,9 +1317,11 @@
'<td class="LC_left_item" colspan="2"><br />';
foreach my $item (@usertools) {
my $checked = 'checked="checked" ';
- if (ref($settings->{$item}) eq 'HASH') {
- if ($settings->{$item}->{'_LC_adv'} == 0) {
- $checked = '';
+ if (ref($settings) eq 'HASH') {
+ if (ref($settings->{$item}) eq 'HASH') {
+ if ($settings->{$item}->{'_LC_adv'} == 0) {
+ $checked = '';
+ }
}
}
$datatable .= '<span class="LC_nobreak"><label>'.