[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm

raeburn raeburn@source.lon-capa.org
Wed, 17 Dec 2008 22:12:54 -0000


raeburn		Wed Dec 17 22:12:54 2008 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - Check that $settings ($domainconfig{'quotas'}) actually is a reference to a hash, to avoid an ISE if values have yet to be stored.
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.78 loncom/interface/domainprefs.pm:1.79
--- loncom/interface/domainprefs.pm:1.78	Wed Dec 17 21:50:29 2008
+++ loncom/interface/domainprefs.pm	Wed Dec 17 22:12:53 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.78 2008/12/17 21:50:29 raeburn Exp $
+# $Id: domainprefs.pm,v 1.79 2008/12/17 22:12:53 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1317,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>'.