]>
iEval git - gruntmaster-page.git/blob - lib/Gruntmaster/Page/Pb/Entry.pm
1 package Gruntmaster
::Page
::Pb
::Entry
;
3 use Gruntmaster
::Page
::Base pb_entry
=> '<tmpl_var name>';
5 use constant FORMATS
=> [qw
/C CPP JAVA PASCAL PERL PYTHON/];
8 my ($self, $htc, $lang, $env, $contest, $id) = @_;
9 debug
$env => "language is '$lang', contest is '$contest', id is '$id'";
10 my $user = $env->{REMOTE_USER
};
11 if ($contest && $user && time >= contest_start
$contest) {
12 local $Gruntmaster::Data
::contest
= $contest;
14 debug
$env => "Marking problem $id of contest $contest open by $user";
17 $htc->param(cansubmit
=> 1);
19 $htc->param(cansubmit
=> (time <= contest_end
$contest));
20 $htc->param(contest
=> $contest);
22 $htc->param(formats
=> FORMATS
);
23 $htc->param(id
=> $id);
24 local $Gruntmaster::Data
::contest
= $contest if $contest;
25 $htc->param(name
=> problem_name
$id);
26 $htc->param(author
=> problem_author
$id);
27 $htc->param(owner
=> problem_owner
$id);
28 $htc->param(owner_name
=> do{ local $Gruntmaster::Data
::contest
; user_name
$htc->param('owner')} );
29 $htc->param(statement
=> problem_statement
$id);
30 $htc->param(timelimit
=> problem_timeout
$id);
33 sub vary
{ 'Authorization' }
This page took 0.045263 seconds and 4 git commands to generate.