X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FPb%2FEntry.pm;h=8b770efe3a24bcc5f193675171a685e364480227;hb=a266a1eec3524b872380efad6f2e1f360eda9a0d;hp=95b15a40abf74c3a4f43f084325e3cd9ef200b00;hpb=e1f9d2ac0aa6950eded9551b220a18e34414243e;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Pb/Entry.pm b/lib/Gruntmaster/Page/Pb/Entry.pm index 95b15a4..8b770ef 100644 --- a/lib/Gruntmaster/Page/Pb/Entry.pm +++ b/lib/Gruntmaster/Page/Pb/Entry.pm @@ -12,6 +12,12 @@ use constant FORMATS => [qw/C CPP JAVA PERL PYTHON/]; 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) { + local $Gruntmaster::Data::contest = $contest; + mark_open $id, $user; + debug $env => "Marking problem $id of contest $contest open by $user"; + } $htc->param(cansubmit => 1); if ($contest) { @@ -27,4 +33,7 @@ sub _generate{ $htc->param(statement => problem_statement $id); } +sub vary { 'Authorization' } +sub max_age { 600 } + 1