--- loncom/auth/londatecheck.pm 2004/08/23 19:34:00 1.7 +++ loncom/auth/londatecheck.pm 2005/04/25 21:21:17 1.9 @@ -1,5 +1,5 @@ # Checks contentopen/close settings disable subsequent PerlHandlers if not open -# $Id: londatecheck.pm,v 1.7 2004/08/23 19:34:00 albertel Exp $ +# $Id: londatecheck.pm,v 1.9 2005/04/25 21:21:17 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -26,12 +26,12 @@ use strict; package Apache::londatecheck; -use Apache::lonnet(); +use Apache::lonnet; use Apache::lonlocal; 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) ) { @@ -50,7 +50,7 @@ sub content_date_check { sub handler { my ($r)=@_; if (&Apache::lonnet::allowed('bre',$r->uri) eq 'F') { - return OK; + return DECLINED; } my ($status,$open,$close,$msg)=&content_date_check(); if ($status ne 'OPEN') { @@ -68,7 +68,8 @@ sub handler { $r->print($msg); $r->print(''); + return OK; } - return OK; + return DECLINED; } 1;