]>
Commit | Line | Data |
---|---|---|
1 | package Gruntmaster::Page::Pb::Entry; | |
2 | ||
3 | use 5.014000; | |
4 | use strict; | |
5 | use warnings; | |
6 | use Gruntmaster::Page::Base pb_entry => '<tmpl_var name>'; | |
7 | our @ISA = qw/Gruntmaster::Page::Base/; | |
8 | our $VERSION = '0.001'; | |
9 | ||
10 | use constant FORMATS => [qw/C CPP JAVA PERL PYTHON/]; | |
11 | ||
12 | sub _generate{ | |
13 | my ($self, $htc, $lang, $env, $contest, $id) = @_; | |
14 | debug $env => "language is '$lang', contest is '$contest', id is '$id'"; | |
15 | ||
16 | $htc->param(cansubmit => 1); | |
17 | if ($contest) { | |
18 | $htc->param(cansubmit => time <= contest_end $contest); | |
19 | $htc->param(contest => $contest); | |
20 | } | |
21 | $htc->param(formats => FORMATS); | |
22 | $htc->param(id => $id); | |
23 | local $Gruntmaster::Data::contest = $contest if $contest; | |
24 | $htc->param(name => problem_name $id); | |
25 | $htc->param(author => problem_author $id); | |
26 | $htc->param(owner => problem_owner $id); | |
27 | $htc->param(statement => problem_statement $id); | |
28 | } | |
29 | ||
30 | 1 |