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

raeburn raeburn at source.lon-capa.org
Sun Jan 1 11:32:01 EST 2017


raeburn		Sun Jan  1 16:32:01 2017 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - If log-in results in user session being hosted on load balancer, subsequent
    page requests in user's session are exempt from checking if they should be
    load balanced.    
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1267 loncom/interface/loncommon.pm:1.1268
--- loncom/interface/loncommon.pm:1.1267	Tue Nov 29 03:01:04 2016
+++ loncom/interface/loncommon.pm	Sun Jan  1 16:32:01 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1267 2016/11/29 03:01:04 raeburn Exp $
+# $Id: loncommon.pm,v 1.1268 2017/01/01 16:32:01 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -15981,6 +15981,15 @@
             $env{'user.noloadbalance'} = $lonhost;
         }
 
+        if ($form->{'noloadbalance'}) {
+            my @hosts = &Apache::lonnet::current_machine_ids();
+            my $hosthere = $form->{'noloadbalance'};
+            if (grep(/^\Q$hosthere\E$/, at hosts)) {
+                $initial_env{"user.noloadbalance"} = $hosthere;
+                $env{'user.noloadbalance'} = $hosthere;
+            }
+        }
+
         my %is_adv = ( is_adv => $env{'user.adv'} );
         my %domdef;
         unless ($domain eq 'public') {




More information about the LON-CAPA-cvs mailing list