[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Mon May 10 12:08:40 EDT 2021


raeburn		Mon May 10 16:08:40 2021 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Fix logic
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1451 loncom/lonnet/perl/lonnet.pm:1.1452
--- loncom/lonnet/perl/lonnet.pm:1.1451	Tue May  4 18:47:38 2021
+++ loncom/lonnet/perl/lonnet.pm	Mon May 10 16:08:40 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1451 2021/05/04 18:47:38 raeburn Exp $
+# $Id: lonnet.pm,v 1.1452 2021/05/10 16:08:40 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -8242,8 +8242,8 @@
                         my $adom = $1;
                         foreach my $key (keys(%env)) {
                             if ($key =~ m{^user\.role\.(ca|aa)/\Q$adom\E}) {
-                                my ($start,$end) = split('.',$env{$key});
-                                if (($now >= $start) && (!$end || $end < $now)) {
+                                my ($start,$end) = split(/\./,$env{$key});
+                                if (($now >= $start) && (!$end || $end > $now)) {
                                     $ownaccess = 1;
                                     last;
                                 }
@@ -8255,8 +8255,8 @@
                         foreach my $role ('ca','aa') { 
                             if ($env{"user.role.$role./$adom/$aname"}) {
                                 my ($start,$end) =
-                                    split('.',$env{"user.role.$role./$adom/$aname"});
-                                if (($now >= $start) && (!$end || $end < $now)) {
+                                    split(/\./,$env{"user.role.$role./$adom/$aname"});
+                                if (($now >= $start) && (!$end || $end > $now)) {
                                     $ownaccess = 1;
                                     last;
                                 }




More information about the LON-CAPA-cvs mailing list