X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=sidebyside;f=lib%2FGruntmaster%2FPage%2FPb%2FEntry.pm;h=78560fd061b023eae962c01c98c67cdb2df4aa04;hb=db3d5b78fecd78a000cd92b2b29ca8cffea59b4d;hp=f2fa9626c0aefd7298fb68ae076cc2be86e102fc;hpb=adfcbf49c9a50ffc4d6f273a5837c0108125b55c;p=plack-app-gruntmaster.git
diff --git a/lib/Gruntmaster/Page/Pb/Entry.pm b/lib/Gruntmaster/Page/Pb/Entry.pm
index f2fa962..78560fd 100644
--- a/lib/Gruntmaster/Page/Pb/Entry.pm
+++ b/lib/Gruntmaster/Page/Pb/Entry.pm
@@ -9,35 +9,43 @@ our $VERSION = '0.001';
use constant TEMPLATES => {
en => <<'HTML',
+
+
+
+
+
+
+- Author
+- Owner
+
Submit solution
-
+
HTML
};
sub _generate{
- my ($self, $htc, $path, $lang) = @_;
-
- $path =~ m,(?:ct/([^/]+)/)?pb/(\w+)\.html$,;
-
- my ($contest, $id) = ($1, $2);
+ my ($self, $htc, $lang, $logger, $contest, $id) = @_;
+ debug $logger => "language is '$lang', contest is '$contest', id is '$id'";
$htc->param(cansubmit => 1);
- if (defined $contest) {
- $htc->param(cansubmit => time >= contest_start $contest && time <= contest_end $contest);
+ if ($contest) {
+ $htc->param(cansubmit => time <= contest_end $contest);
$htc->param(contest => $contest);
}
$htc->param(formats => Gruntmaster::Page::Submit::FORMATS);