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 35103a5..a8b7b20 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.028492 seconds and 4 git commands to generate.