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

raeburn lon-capa-cvs@mail.lon-capa.org
Tue, 04 Oct 2005 18:49:34 -0000


raeburn		Tue Oct  4 14:49:34 2005 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  Correction to identification of future students.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.277 loncom/interface/loncommon.pm:1.278
--- loncom/interface/loncommon.pm:1.277	Tue Oct  4 14:29:54 2005
+++ loncom/interface/loncommon.pm	Tue Oct  4 14:49:32 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.277 2005/10/04 18:29:54 albertel Exp $
+# $Id: loncommon.pm,v 1.278 2005/10/04 18:49:32 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3082,6 +3082,7 @@
         my $startidx = &Apache::loncoursedata::CL_START();
         my $endidx = &Apache::loncoursedata::CL_END();
         my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist($cdom,$cnum);
+        my $now = time;
         foreach my $student (keys(%{$classlist})) {
             if (defined($$types{'active'})) {
                 if ($$classlist{$student}[$statusidx] eq 'Active') {
@@ -3089,12 +3090,12 @@
                 }
             }
             if (defined($$types{'previous'})) {
-                if ($$classlist{$student}[$endidx] <= time) {
+                if ($$classlist{$student}[$endidx] <= $now) {
                     push(@{$$users{st}{$student}},'previous');
                 }
             }
             if (defined($$types{'future'})) {
-                if (($$classlist{$student}[$startidx] > 0) && ($$classlist{$student}[$endidx] > time) || ($$classlist{$student}[$endidx] == 0) || ($$classlist{$student}[$endidx] eq '')) {
+                if (($$classlist{$student}[$startidx] > $now) && ($$classlist{$student}[$endidx] > $now) || ($$classlist{$student}[$endidx] == 0) || ($$classlist{$student}[$endidx] eq '')) {
                     push(@{$$users{st}{$student}},'future');
                 }
             }