Archived
1
0

Fixes on API::Submission

This commit is contained in:
Mercier Pierre-Olivier 2013-09-03 07:21:32 +02:00
parent 9c27bf131e
commit aa7efab83f

View File

@ -1,6 +1,6 @@
#! /usr/bin/env perl #! /usr/bin/env perl
package Submission; package API::Submission;
use v5.10.1; use v5.10.1;
use strict; use strict;
@ -16,7 +16,7 @@ sub add($$$$$)
my $user = shift; my $user = shift;
my $log = shift; my $log = shift;
my $res = Base::send('ResultHandler', "projects/submissions/add.xml", [ leader_login => $user, project_name => $project, year => $year, log => $log, tag => $tag ]); my $res = API::Base::send('ResultHandler', "projects/submissions/add.xml", [ leader_login => $user, project_name => $project, year => $year, log => $log, tag => $tag ]);
if ($res->{result} == '0') { if ($res->{result} == '0') {
say "Rendu ok"; say "Rendu ok";
@ -33,10 +33,10 @@ sub get($$$$)
my $tag = shift; my $tag = shift;
my $user = shift; my $user = shift;
my $res = Base::get('ResultHandler', "projects/submissions/get/$project/$year/$user/$tag.xml"); my $res = API::Base::get('ResultHandler', "projects/submissions/get/$project/$year/$user/$tag.xml");
if ($res->{result} == '0') { if ($res->{result} == '0') {
say "Rendu ok"; say "Rendu déjà effectué";
} }
elsif ($res->{result} == '1') { elsif ($res->{result} == '1') {
say "Pas encore rendu"; say "Pas encore rendu";