--- loncom/auth/londatecheck.pm 2004/06/28 16:26:55 1.3 +++ loncom/auth/londatecheck.pm 2006/04/13 21:02:34 1.12 @@ -1,5 +1,5 @@ # Checks contentopen/close settings disable subsequent PerlHandlers if not open -# $Id: londatecheck.pm,v 1.3 2004/06/28 16:26:55 albertel Exp $ +# $Id: londatecheck.pm,v 1.12 2006/04/13 21:02:34 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -26,38 +26,51 @@ use strict; package Apache::londatecheck; -use Apache::lonnet(); +use Apache::lonnet; +use Apache::lonlocal; +use Apache::loncommon(); use Apache::Constants qw(:common :http :methods); sub content_date_check { - my $symb=$ENV{'request.symb'}; + my $symb=$env{'request.symb'}; my $open=&Apache::lonnet::EXT('resource.0.contentopen',$symb); my $close=&Apache::lonnet::EXT('resource.0.contentclose',$symb); - if ( (defined($open) && $open ne '' && time < $open) || - (defined($close) && $close ne '' && time > $close)) { - return ('CLOSED',$open,$close); + if ( (defined($open) && $open ne '' && time < $open) ) { + return ('CLOSED',$open,$close, + '