]> iEval git - gruntmaster-daemon.git/commitdiff
Make non-C++ verifiers work
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 4 Apr 2014 07:09:45 +0000 (10:09 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 4 Apr 2014 07:09:45 +0000 (10:09 +0300)
lib/Gruntmaster/Daemon.pm

index 35103a5e57dcf7e25ff5b2f7bff496b64f22df95..a8b7b2097fb8ac9aa7946c3a32cfe3f19bd350dd 100644 (file)
@@ -20,6 +20,15 @@ use Log::Log4perl qw/get_logger/;
 use LWP::UserAgent;
 
 use constant PAGE_SIZE => 10;
+use constant FORMAT_EXTENSION => {
+       C => 'c',
+       CPP => 'cpp',
+       MONO => 'cs',
+       JAVA => 'java',
+       PASCAL => 'pas',
+       PERL => 'pl',
+       PYTHON => 'py',
+};
 
 ##################################################
 
@@ -73,7 +82,7 @@ sub process{
                $meta->{tests} = decode_json $jobr->problem->tests if $meta->{runner} eq 'File';
 
                $meta->{files}{ver} = {
-                       name => 'ver.cpp',
+                       name => 'ver.' . FORMAT_EXTENSION->{$jobr->problem->verformat},
                        format => $jobr->problem->verformat,
                        content => $jobr->problem->versource,
                } if $jobr->problem->verformat;
This page took 0.027466 seconds and 4 git commands to generate.