Commit 6bfc0c31 authored by GROSS-AMBLARD David's avatar GROSS-AMBLARD David
Browse files

Recover task quality in Wirk image annotator (as mass in Answer table)

parent a8b23d0c
......@@ -108,8 +108,6 @@ function checkWirkImageAnnotator($conn){
$taskid=$awaitingService['taskid'];
$userid=$awaitingService['userid'];
// TODO recovoer quality into answer
$answerTaskLineAnswer = CallAPI("GET", WIRKTASKLINEENDPOINT."/".$IdTaskLine, WIRKAPIUSER, WIRKAPIPASSWORD);
debug("answer to call: ".$answerTaskLineAnswer);
$jsonAnswer=json_decode($answerTaskLineAnswer);
......@@ -119,7 +117,8 @@ function checkWirkImageAnnotator($conn){
debug("Not yet backed");
else {
$result=$tasks[0]->{'Outputs'}->{'1605'};
$conn->query("insert into Answer(idtask,user,artifact,value) values ($taskid,$userid,$artifactid,'".$result."')");
$quality=$tasks[0]->{'Outputs'}->{'1606'};
$conn->query("insert into Answer(idtask,user,artifact,value,mass) values ($taskid,$userid,$artifactid,'".$result."',$quality)");
$conn->query("insert into Answered(id,artifact) values ($taskid,$artifactid)");
$conn->query("delete from ServiceCall where artifactid=$artifactid and userid=$userid and taskid=$taskid");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment