[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /interface loncommon.pm

raeburn raeburn@source.lon-capa.org
Thu, 11 Dec 2008 18:46:14 -0000


raeburn		Thu Dec 11 18:46:14 2008 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/interface	loncommon.pm 
  Log:
  - Backport 1.711.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.692.2.2 loncom/interface/loncommon.pm:1.692.2.3
--- loncom/interface/loncommon.pm:1.692.2.2	Thu Dec 11 18:41:03 2008
+++ loncom/interface/loncommon.pm	Thu Dec 11 18:46:14 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.692.2.2 2008/12/11 18:41:03 raeburn Exp $
+# $Id: loncommon.pm,v 1.692.2.3 2008/12/11 18:46:14 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4701,6 +4701,11 @@
   background-color: $data_table_head;
   font-size: smaller;
 }
+table.LC_data_table tr.LC_info_row > td {
+  background-color: #CCC;
+  font-weight: bold;
+  text-align: left;
+}
 table.LC_data_table tr.LC_odd_row > td, 
 table.LC_aboutme_port tr td {
   background-color: $data_table_light;
@@ -6507,19 +6512,35 @@
         if ($inststatus ne '') {
             my @statuses = split(/:/,$inststatus);
             foreach my $item (@statuses) {
-                if ($quotahash{'quotas'}{$item} ne '') {
-                    if ($defquota eq '') {
-                        $defquota = $quotahash{'quotas'}{$item};
-                        $settingstatus = $item;
-                    } elsif ($quotahash{'quotas'}{$item} > $defquota) {
-                        $defquota = $quotahash{'quotas'}{$item};
-                        $settingstatus = $item;
+                if (ref($quotahash{'quotas'}{'defaultquota'}) eq 'HASH') {
+                    if ($quotahash{'quotas'}{'defaultquota'}{$item} ne '') {
+                        if ($defquota eq '') {
+                            $defquota = $quotahash{'quotas'}{'defaultquota'}{$item};
+                            $settingstatus = $item;
+                        } elsif ($quotahash{'quotas'}{'defaultquota'}{$item} > $defquota) {
+                            $defquota = $quotahash{'quotas'}{'defaultquota'}{$item};
+                            $settingstatus = $item;
+                        }
+                    }
+                } else {
+                    if ($quotahash{'quotas'}{$item} ne '') {
+                        if ($defquota eq '') {
+                            $defquota = $quotahash{'quotas'}{$item};
+                            $settingstatus = $item;
+                        } elsif ($quotahash{'quotas'}{$item} > $defquota) {
+                            $defquota = $quotahash{'quotas'}{$item};
+                            $settingstatus = $item;
+                        }
                     }
                 }
             }
         }
         if ($defquota eq '') {
-            $defquota = $quotahash{'quotas'}{'default'};
+            if (ref($quotahash{'quotas'}{'defaultquota'}) eq 'HASH') {
+                $defquota = $quotahash{'quotas'}{'defaultquota'}{'default'};
+            } else {
+                $defquota = $quotahash{'quotas'}{'default'};
+            }
             $settingstatus = 'default';
         }
     } else {