[LON-CAPA-cvs] cvs: doc /loncapafiles loncapafiles.lpml loncom/auth londatecheck.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 01 Jun 2004 14:41:00 -0000


albertel		Tue Jun  1 10:41:00 2004 EDT

  Modified files:              
    /loncom/auth	londatecheck.pm 
    /doc/loncapafiles	loncapafiles.lpml 
  Log:
  - fix up install comments
  - modified londatecheck to work in the default unset case
  - add GPL header
  
  
Index: loncom/auth/londatecheck.pm
diff -u loncom/auth/londatecheck.pm:1.1 loncom/auth/londatecheck.pm:1.2
--- loncom/auth/londatecheck.pm:1.1	Mon May 31 16:24:11 2004
+++ loncom/auth/londatecheck.pm	Tue Jun  1 10:40:59 2004
@@ -1,3 +1,29 @@
+# Checks contentopen/close settings disable subsequent PerlHandlers if not open
+# $Id: londatecheck.pm,v 1.2 2004/06/01 14:40:59 albertel Exp $
+#
+# Copyright Michigan State University Board of Trustees
+#
+# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
+#
+# LON-CAPA is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# LON-CAPA is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LON-CAPA; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+# /home/httpd/html/adm/gpl.txt
+#
+# http://www.lon-capa.org/
+#
+
 use strict;
 package Apache::londatecheck;
 use Apache::lonnet();
@@ -8,8 +34,9 @@
     my $open=&Apache::lonnet::EXT('resource.0.contentopen',$symb);
     &Apache::lonnet::logthis("Hrrm got an open of $open");
     my $close=&Apache::lonnet::EXT('resource.0.contentclose',$symb);
-    if ( (defined($open)  && time < $open) ||
-	 (defined($close) && time > $close)) {
+    if ( (defined($open)  && $open  ne '' && time < $open) ||
+	 (defined($close) && $close ne '' && time > $close)) {
+	&Apache::lonnet::logthis(" returning CLOSED ");
 	return ('CLOSED',$open,$close);
     }
     return ('OPEN',$open,$close);
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.355 doc/loncapafiles/loncapafiles.lpml:1.356
--- doc/loncapafiles/loncapafiles.lpml:1.355	Tue Jun  1 09:35:19 2004
+++ doc/loncapafiles/loncapafiles.lpml	Tue Jun  1 10:40:59 2004
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.355 2004/06/01 13:35:19 matthew Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.356 2004/06/01 14:40:59 albertel Exp $ -->
 
 <!--
 
@@ -3929,8 +3929,8 @@
 <source>loncom/auth/londatecheck.pm</source>
 <target dist='default'>home/httpd/lib/perl/Apache/londatecheck.pm</target>
 <categoryname>handler</categoryname>
-<description>Part of the "due date interval" code Guy recently submitted recently.</description>
-<status>Must not be very good as it lacks GPL headers and does not even contain a single comment explaining what it's doing.</status>
+<description>Checks contentopen/close settings disable subsequent PerlHandlers if not open</description>
+<status>works/unverified</status>
 </file>
 <file>
 <source>loncom/auth/lonlogout.pm</source>