From d393302889074d8c0b43609c1a801ba2989d299e Mon Sep 17 00:00:00 2001 From: S7012MY Date: Fri, 14 Feb 2014 17:10:43 +0200 Subject: [PATCH] add time limits --- lib/Gruntmaster/Page/Pb/Entry.pm | 5 +++-- tmpl/pb_entry.en | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) 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
-- 2.39.2