From 2dfeee941a31f31400e8e4b4f0f2de5ff5456b0c Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 10 Jan 2015 15:26:23 +0200 Subject: [PATCH] Hide solution link on problems without solution --- lib/Plack/App/Gruntmaster/HTML.pm | 1 + 1 file changed, 1 insertion(+) 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'); -- 2.39.2