From: Marius Gavrilescu Date: Sat, 10 Jan 2015 13:26:23 +0000 (+0200) Subject: Hide solution link on problems without solution X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=2dfeee941a31f31400e8e4b4f0f2de5ff5456b0c;p=gruntmaster-page.git Hide solution link on problems without solution --- diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index 5505a39..91f1fc4 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -157,6 +157,7 @@ sub process_pb_entry { $_->detach for $tree->fclass('rc'); # requires contest $tree->fid('solution_modal')->fclass('modal-body')->replace_content(literal $args{solution}); } + $tree->fid('solution')->detach unless $args{solution}; if ($args{cansubmit}) { $tree->look_down(name => 'problem')->attr(value => $args{id}); my $contest = $tree->look_down(name => 'contest');