From: Marius Gavrilescu Date: Wed, 25 Feb 2015 18:04:07 +0000 (+0200) Subject: Merge branch 'master' into newmc X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=750b40cb7cf4c9dbf2b85c18e3d0db172441facd;hp=f2d78743a891311cf02a3a80a60c8a1ddc72b98e;p=plack-app-gruntmaster.git Merge branch 'master' into newmc Conflicts: lib/Plack/App/Gruntmaster.pm --- diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 80bcc1a..aa473d8 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -165,7 +165,7 @@ sub dispatch_request{ }, sub (/ed/:contest) { - forbid contest->is_running; + forbid !contest->is_finished; my $pblist = db->problem_list(contest => $_{contest}, solution => 1); response ed => 'Editorial of ' . contest->name, {%$pblist, editorial => contest->editorial}; }, diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index 319a5e5..66468ca 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -287,6 +287,6 @@ sub process_ed { $div->set_child_content(class => 'solution', literal $data->{solution}); $div->fclass('problem')->namedlink($data->{id}, $data->{name}); }; - my @pb = map { @{$args{$_}} } qw/beginner easy medium hard/; + my @pb = map { @{$args{$_} // []} } qw/beginner easy medium hard/; $tree->fclass('well')->iter3(\@pb, $iter); }