From: Marius Gavrilescu Date: Sun, 29 Mar 2015 21:03:03 +0000 (+0300) Subject: Remove cansubmit/nosubmit X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=dd962dd2b75089dabe9f01ddad0a51529e78f3ec;p=gruntmaster-page.git Remove cansubmit/nosubmit --- diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index f08b66b..b67ef29 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -193,16 +193,11 @@ sub process_pb_entry { $_->detach for $tree->fclass('rc'); # requires contest $tree->fid('solution_modal')->replace_content(literal $args{solution}); } - if ($args{cansubmit}) { - $tree->fid('nosubmit')->detach; - $tree->look_down(name => 'problem')->attr(value => $args{id}); - my $contest = $tree->look_down(name => 'contest'); - $contest->attr(value => $args{args}{contest}) if $args{args}{contest}; - $contest->detach unless $args{args}{contest} - } else { - $tree->fid('nosubmit')->find('a')->edit_href(sub{s/id/$args{id}/}); - $tree->fid('submit')->detach - } + + $tree->look_down(name => 'problem')->attr(value => $args{id}); + my $contest = $tree->look_down(name => 'contest'); + $contest->attr(value => $args{args}{contest}) if $args{args}{contest}; + $contest->detach unless $args{args}{contest} } sub process_sol { diff --git a/tmpl/pb_entry.en b/tmpl/pb_entry.en index 8f42d1b..f2709e3 100644 --- a/tmpl/pb_entry.en +++ b/tmpl/pb_entry.en @@ -15,11 +15,6 @@

Submit solution

-
-The contest has finished.
-To submit solutions to this problem, please visit the problem outside the contest. -
-