PASCAL => 'pas',
PERL => 'pl',
PYTHON => 'py',
+ SBCL => 'l',
};
use constant NOT_FOUND => [404, ['Content-Type' => 'text/plain'], ['Not found']];
sub (/ed/:contest) {
forbid contest->is_running;
- response ed => 'Editorial of ' . contest->name, db->problem_list(contest => $_{contest}, solution => 1);
+ my $pblist = db->problem_list(contest => $_{contest}, solution => 1);
+ response ed => 'Editorial of ' . contest->name, {%$pblist, editorial => contest->editorial};
},
sub (/login) {
my $source = $prog ? read_file $prog->path : $_{source_code};
unlink $prog->path if $prog;
my $private = (problem->private && !$_{contest}) ? 1 : 0;
+ $private = 1 if contest && contest->is_pending;
my $newjob = db->jobs->create({
maybe contest => $_{contest},
private => $private,