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

raeburn raeburn at source.lon-capa.org
Mon Aug 1 15:46:50 EDT 2011


raeburn		Mon Aug  1 19:46:50 2011 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - Check if selection for new spare was not blank.
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.145 loncom/interface/domainprefs.pm:1.146
--- loncom/interface/domainprefs.pm:1.145	Sun Jul 31 23:05:00 2011
+++ loncom/interface/domainprefs.pm	Mon Aug  1 19:46:49 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.145 2011/07/31 23:05:00 raeburn Exp $
+# $Id: domainprefs.pm,v 1.146 2011/08/01 19:46:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7099,7 +7099,12 @@
                     }
                 }
             }
-            my @spares = sort(@okspares,$newspare);
+            my @spares;
+            if (($newspare ne '') && (!grep(/^\Q$newspare\E$/, at okspares))) {
+                @spares = sort(@okspares,$newspare);
+            } else {
+                @spares = sort(@okspares);
+            }
             $defaultshash{'usersessions'}{'spares'}{$lonhost}{$type} = \@spares;
         }
         if (keys(%spareschg) > 0) {




More information about the LON-CAPA-cvs mailing list