$tree->fid('solution_modal')->fclass('modal-body')->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{contest}) if $args{contest};
$contest->detach unless $args{contest}
} else {
+ $tree->fid('nosubmit')->find('a')->edit_href(sub{s/id/$args{id}/});
$tree->fid('submit')->detach
}
}
<a href="/log/?problem=problem_id" id="job_log">Job log</a><br>
<a href="/sol/problem_id" id="solution" data-toggle="modal" data-target="#solution_modal">Solution</a>
-<div id="submit">
<h1>Submit solution</h1>
+
+<div id="nosubmit">
+The contest has finished.<br>
+To submit solutions to this problem, please visit the problem <a href="/pb/id">outside the contest</a>.
+</div>
+
+<div id="submit">
<form action="/action/submit" method="POST" enctype="multipart/form-data" role="form">
<input type="hidden" name="problem" value="problem_id">
<input type="hidden" name="contest" value="contest_id">