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

raeburn raeburn at source.lon-capa.org
Sat Feb 25 14:50:17 EST 2017


raeburn		Sat Feb 25 19:50:17 2017 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Modify comment in init_user_environment
  - Coding style
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1274 loncom/interface/loncommon.pm:1.1275
--- loncom/interface/loncommon.pm:1.1274	Mon Feb 20 18:29:22 2017
+++ loncom/interface/loncommon.pm	Sat Feb 25 19:50:16 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1274 2017/02/20 18:29:22 raeburn Exp $
+# $Id: loncommon.pm,v 1.1275 2017/02/25 19:50:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -16015,8 +16015,6 @@
 
     my $public=($username eq 'public' && $domain eq 'public');
 
-# See if old ID present, if so, remove
-
     my ($filename,$cookie,$userroles,$firstaccenv,$timerintenv);
     my $now=time;
 
@@ -16038,7 +16036,8 @@
 	}
 	if (!$cookie) { $cookie="publicuser_$oldest"; }
     } else {
-	# if this isn't a robot, kill any existing non-robot sessions
+	# See if old ID present, if so, remove if this isn't a robot,
+	# killing any existing non-robot sessions
 	if (!$args->{'robot'}) {
 	    opendir(DIR,$lonids);
 	    while ($filename=readdir(DIR)) {
@@ -16078,8 +16077,7 @@
 
     my %userenv = &Apache::lonnet::dump('environment',$domain,$username);
     my ($tmp) = keys(%userenv);
-    if ($tmp !~ /^(con_lost|error|no_such_host)/i) {
-    } else {
+    if ($tmp =~ /^(con_lost|error|no_such_host)/i) {
 	undef(%userenv);
     }
     if (($userenv{'interface'}) && (!$form->{'interface'})) {




More information about the LON-CAPA-cvs mailing list