X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster.pm;h=c590bc9e2309977edb92554854dd0e66c8605e8b;hb=d4ca2412db2c1c6e021809e9b72d3410abc476c2;hp=39928bc87c5cb9eb5f78e2d8b58c545197da022c;hpb=250e34c727eb5a803abfb68f7b21ba3724211e68;p=gruntmaster-page.git diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 39928bc..c590bc9 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -47,6 +47,7 @@ use constant FORMAT_EXTENSION => { PASCAL => 'pas', PERL => 'pl', PYTHON => 'py', + SBCL => 'l', }; use constant NOT_FOUND => [404, ['Content-Type' => 'text/plain'], ['Not found']]; @@ -159,7 +160,8 @@ sub dispatch_request{ 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) { @@ -244,7 +246,7 @@ sub dispatch_request{ 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->is_pending; + $private = 1 if contest && contest->is_pending; my $newjob = db->jobs->create({ maybe contest => $_{contest}, private => $private,