]> iEval git - gruntmaster-page.git/blobdiff - lib/Gruntmaster/Page/Pb/Entry.pm
Make Gruntmaster::Page::Base also act as strict/warnings/feature/etc
[gruntmaster-page.git] / lib / Gruntmaster / Page / Pb / Entry.pm
index 9fcefe5ac30e3d65b58e0121441bc5ad47c1892d..f03fe7aa265b569dfbb03b046daac7f77f64e080 100644 (file)
@@ -1,11 +1,6 @@
 package Gruntmaster::Page::Pb::Entry;
 
-use 5.014000;
-use strict;
-use warnings;
 use Gruntmaster::Page::Base pb_entry => '<tmpl_var name>';
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
 
 use constant FORMATS => [qw/C CPP JAVA PERL PYTHON/];
 
@@ -13,7 +8,8 @@ sub _generate{
        my ($self, $htc, $lang, $env, $contest, $id) = @_;
        debug $env => "language is '$lang', contest is '$contest', id is '$id'";
        my $user = $env->{REMOTE_USER};
-       if ($contest && $user) {
+       if ($contest && $user && time >= contest_start $contest) {
+               local $Gruntmaster::Data::contest = $contest;
                mark_open $id, $user;
                debug $env => "Marking problem $id of contest $contest open by $user";
        }
This page took 0.022634 seconds and 4 git commands to generate.