* Return the json description of an artifact, stored in the artifactclasses directory
...
...
@@ -194,14 +194,6 @@ function DEPRECATEDupdate($conn, $artifact)
}
/*
* for all running artifact of a user, update their state
* Which order ? Which one to start with ?
*/
functionupdateAll($conn){
}
/*
* update
*
...
...
@@ -343,18 +335,6 @@ function startAllArtifact($conn,$userid){
update($conn,$artifactid);
}
}
/*
$table=$conn->query("select id from Artifact where ownerid=0");
if($table->rowCount()>0){
debug("Artifacts available");
while($tuple=$table->fetch()){
$artifactid=$tuple['id'];
debug("starting one");
startArtifact($conn, $artifactid, $userid);
}
}
*/
}
/**
...
...
@@ -369,7 +349,6 @@ function startAllArtifact($conn,$userid){
functionpignistic($conn,$artifactid){
$table=$conn->query("select value from Answer where Artifact=$artifactid group by value order by sum(mass) desc limit 1");
$choice=$table->fetch()['value'];
//$conn->query("insert into Answer(idtask,user,Artifact,value,mass) values (1,1,$artifactid,$choice,1)");
$conn->query("insert into Answer(idtask,user,Artifact,value,mass) select MAX(idtask)+1,1,$artifactid,$choice,1 from Answer where Artifact=$artifactid");