]> iEval git - plack-app-gruntmaster.git/commitdiff
Hide solution link on problems without solution
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 10 Jan 2015 13:26:23 +0000 (15:26 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 10 Jan 2015 13:26:23 +0000 (15:26 +0200)
lib/Plack/App/Gruntmaster/HTML.pm

index 5505a3917973f1f7991b4f691433018b68a521aa..91f1fc4baf091583245eb1ca3c5379cb470ff509 100644 (file)
@@ -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');
This page took 0.0245 seconds and 4 git commands to generate.