]> iEval git - gruntmaster-data.git/blobdiff - lib/Gruntmaster/Data.pm
Do not return solution during contests
[gruntmaster-data.git] / lib / Gruntmaster / Data.pm
index 846d7721f21748735910c86d7bc7de3e930d29bd..301bdfd483040e91a888701fe0d5dfca9369ef0d 100644 (file)
@@ -15,9 +15,7 @@ use DBIx::Simple;
 use List::Util qw/sum/;
 use SQL::Abstract;
 
-use constant CONTEST_PUBLIC_COLUMNS => [qw/id name description start stop owner/];
 use constant PROBLEM_PUBLIC_COLUMNS => [qw/id author writer level name owner private timeout olimit value/];
-use constant USER_PUBLIC_COLUMNS => [qw/id admin name town university country level/];
 use constant JOBS_PER_PAGE => 50;
 
 my %statements = (
@@ -42,7 +40,7 @@ my %statements = (
        job_full_sth => 'SELECT * FROM jobs WHERE id = ?',
 );
 
-my $db;
+our $db;
 
 sub init {
        $db = DBIx::Simple->new(@_);
@@ -127,6 +125,7 @@ sub problem_entry {
        if ($contest) {
                $ret->{contest_start} = $contest->{start};
                $ret->{contest_stop}  = $contest->{stop};
+               delete $ret->{solution}
        }
 
        $ret
This page took 0.026952 seconds and 4 git commands to generate.