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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 27 Sep 2004 19:00:17 -0000


albertel		Mon Sep 27 15:00:17 2004 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - getsection is dysfunctional with end time unset
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.547 loncom/lonnet/perl/lonnet.pm:1.548
--- loncom/lonnet/perl/lonnet.pm:1.547	Fri Sep 24 08:45:16 2004
+++ loncom/lonnet/perl/lonnet.pm	Mon Sep 27 15:00:16 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.547 2004/09/24 12:45:16 raeburn Exp $
+# $Id: lonnet.pm,v 1.548 2004/09/27 19:00:16 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -795,11 +795,11 @@
         if ($key eq $courseid.'_st') { $section=''; }
         my ($dummy,$end,$start)=split(/\_/,&unescape($value));
         my $now=time;
-        if (defined($end) && ($now > $end)) {
+        if (defined($end) && $end && ($now > $end)) {
             $Expired{$end}=$section;
             next;
         }
-        if (defined($start) && ($now < $start)) {
+        if (defined($start) && $start && ($now < $start)) {
             $Pending{$start}=$section;
             next;
         }