[LON-CAPA-cvs] cvs: loncom /enrollment Autoenroll.pl

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 18 Mar 2004 19:40:39 -0000


raeburn		Thu Mar 18 14:40:39 2004 EDT

  Modified files:              
    /loncom/enrollment	Autoenroll.pl 
  Log:
  Modified messages written to log when no student enrollment is retrieved.
  
  
Index: loncom/enrollment/Autoenroll.pl
diff -u loncom/enrollment/Autoenroll.pl:1.7 loncom/enrollment/Autoenroll.pl:1.8
--- loncom/enrollment/Autoenroll.pl:1.7	Sun Feb  8 10:47:45 2004
+++ loncom/enrollment/Autoenroll.pl	Thu Mar 18 14:40:39 2004
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 #
 #Automated Enrollment script
-# $Id: Autoenroll.pl,v 1.7 2004/02/08 15:47:45 raeburn Exp $
+# $Id: Autoenroll.pl,v 1.8 2004/03/18 19:40:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -163,7 +163,15 @@
                 }
             }
         } else {
-            print $fh "No institutional classlist data could be retrieved for $crs\n";
+            if ( ($enrollvar{$crs}{autoadds} == 1) || ($enrollvar{$crs}{autodrops} == 1) ) {
+                if ( ($enrollvar{$crs}{autostart} < $timenow) && ( ($enrollvar{$crs}{autoend} > $timenow) || ($enrollvar{$crs}{autoend} == 0) ) ) {
+                    print $fh "No institutional classlist data could be retrieved for $crs\n";
+                } else {
+                    print $fh "Not within time window for auto-enrollment in $crs\n";
+                }
+            } else {
+                print $fh "Auto-enrollment not currently enabled for $crs\n";
+            }
         }
     }
     print $fh "-- ".localtime(time)." Enrollment messages end\n*******************\n\n";