From: S7012MY Date: Fri, 14 Feb 2014 15:10:43 +0000 (+0200) Subject: add time limits X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=d393302889074d8c0b43609c1a801ba2989d299e;p=gruntmaster-page.git add time limits --- diff --git a/lib/Gruntmaster/Page/Pb/Entry.pm b/lib/Gruntmaster/Page/Pb/Entry.pm index 84fbf05..fb78ba5 100644 --- a/lib/Gruntmaster/Page/Pb/Entry.pm +++ b/lib/Gruntmaster/Page/Pb/Entry.pm @@ -18,10 +18,10 @@ sub _generate{ mark_open $id, $user; debug $env => "Marking problem $id of contest $contest open by $user"; } - +t $htc->param(cansubmit => 1); if ($contest) { - $htc->param(cansubmit => time <= contest_end $contest); + $htc->param(cansubmit => (time <= contest_end $contest)); $htc->param(contest => $contest); } $htc->param(formats => FORMATS); @@ -31,6 +31,7 @@ sub _generate{ $htc->param(author => problem_author $id); $htc->param(owner => problem_owner $id); $htc->param(statement => problem_statement $id); + $htc->param(timelimit => problem_timeout $id); } sub vary { 'Authorization' } diff --git a/tmpl/pb_entry.en b/tmpl/pb_entry.en index aa519f4..81df915 100644 --- a/tmpl/pb_entry.en +++ b/tmpl/pb_entry.en @@ -8,6 +8,7 @@

Problem information

+
Time limit:
Author
Owner