]>
iEval git - gruntmaster-page.git/blob - lib/Gruntmaster/Page/Pb/Entry.pm
2dd0a7b5674afa577350a7da7551a7eaa61605ca
1 package Gruntmaster
::Page
::Pb
::Entry
;
6 use Gruntmaster
::Page
::Base pb_entry
=> '<tmpl_var name>';
7 our @ISA = qw
/Gruntmaster::Page::Base/;
8 our $VERSION = '0.001';
10 use constant TEMPLATES
=> {
12 <tmpl_var ESCAPE=0 statement>
15 <h1>Submit solution</h1>
16 <form action="https://gm.ieval.ro/action/submit" method="POST" enctype="multipart/form-data">
17 <input type="hidden" name="problem" value="<tmpl_var id>">
18 <tmpl_if_defined contest><input type="hidden" name="contest" value="<tmpl_var contest>"></tmpl_if_defined>
19 <label>File: <input name="prog" required type="file"></label>
21 <label>File format: <select name="prog_format" required>
22 <tmpl_loop formats><option value="<tmpl_var _>"><tmpl_var _></option>
23 </tmpl_loop></select></label>
25 <input type="submit" value="Submit job">
32 my ($self, $htc, $path, $lang) = @_;
34 $path =~ m
,(?
:ct
/([^/]+)/)?pb/(\w
+)\
.html
$,;
36 my ($contest, $id) = ($1, $2);
38 $htc->param(cansubmit
=> 1);
39 if (defined $contest) {
40 $htc->param(cansubmit
=> time <= contest_end
$contest);
41 $htc->param(contest
=> $contest);
43 $htc->param(formats
=> Gruntmaster
::Page
::Submit
::FORMATS
);
44 $htc->param(id
=> $id);
45 local $Gruntmaster::Data
::contest
= $contest if $contest;
46 $htc->param(name
=> problem_name
$id);
47 $htc->param(author
=> problem_author
$id);
48 $htc->param(owner
=> problem_owner
$id);
49 $htc->param(statement
=> problem_statement
$id);
This page took 0.062146 seconds and 3 git commands to generate.