projects
/
gruntmaster-data.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
347ea1e
)
Add the solution to pb_entry when not in contest
author
Marius Gavrilescu
<marius@ieval.ro>
Thu, 11 Dec 2014 21:50:15 +0000
(23:50 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Thu, 11 Dec 2014 21:50:15 +0000
(23:50 +0200)
lib/Gruntmaster/Data.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Data.pm
b/lib/Gruntmaster/Data.pm
index ce87c254c9b85027fa1d1c7dbeceaa6bd030e8e7..9cb313d67ca7073e6f92a69b7beb24a99b403894 100644
(file)
--- a/
lib/Gruntmaster/Data.pm
+++ b/
lib/Gruntmaster/Data.pm
@@
-116,8
+116,10
@@
sub problem_list {
sub problem_entry {
my ($self, $id, $contest, $user) = @_;
sub problem_entry {
my ($self, $id, $contest, $user) = @_;
- my $pb = $self->problems->find($id, {columns => PROBLEM_PUBLIC_COLUMNS, prefetch => 'owner'});
my $running = $contest && $self->contest($contest)->is_running;
my $running = $contest && $self->contest($contest)->is_running;
+ my $columns = PROBLEM_PUBLIC_COLUMNS;
+ push @$columns, 'solution' unless $running;
+ my $pb = $self->problems->find($id, {columns => $columns, prefetch => 'owner'});
eval { ## no critic (RequireCheckingReturnValueOfEval)
$self->opens->create({
contest => $contest,
eval { ## no critic (RequireCheckingReturnValueOfEval)
$self->opens->create({
contest => $contest,
This page took
0.011207 seconds
and
4
git commands to generate.