Commit 216a1f65 authored by GROSS-AMBLARD David's avatar GROSS-AMBLARD David
Browse files

Embark page first draft (unfinished)

parent 63f07e8f
......@@ -106,7 +106,6 @@
$stmt = $conn->query("select distinct project from ArtifactClass");
while($project=@$stmt->fetch()['project'])
array_push($projects,$project);
array_push($projects,'MyOwnProject');
return $projects;
return $projects;
}
?>
......@@ -449,4 +449,10 @@ function DEPRECATEDchooseArtifactH($conn, $id, $artifact)
function addArtifact($conn,$json){
global $VIEW;
$VIEW['MAIN'].="Did it<pre>$json</pre>";
$file=fopen("projects/MyOwnProject/myownproject.sca", "w");
fwrite($file,$json);
fclose($file);
$query="insert into ArtifactClass(id,description,definition,project,autostart) values (10000,'MyOwnProject','MyOwnProject/myownproject.sca', 'MyOwnProject',true)";
$conn->query($query);
}
......@@ -308,6 +308,8 @@ function startAllArtifact($conn,$userid){
$artifactclassid=$tuple['id'];
debug("Instanciating a $artifactclassid");
$conn->query("insert into Artifact(ownerid,classid,state,node,attributes) values ($userid,$artifactclassid,'running',1,1)");
$artifactid=$conn->LastInsertId();
update($conn,$artifactid);
}
}
......
......@@ -22,15 +22,23 @@ UNDER DEVELOPMENT: COMING SOON!
"guard": "none",
"actions": [
"prepare task 1 as basic",
"use &apos;Simple question, simple checking&apos; as title",
"use &apos;Simple question, simple checking&apos; as description",
"use &apos;If I should see only one, which cyberpunk movie should I see?&apos; as title",
"use &apos;If I should see only one, which cyberpunk movie should I see?&apos; as description",
"select @CHECKER:=NULL",
"select @CHECKERMSG:=NULL",
"forget profile for current artifact",
"offer task to anyone",
"install task"
]
}
},
"2": {}
"2": {
"3": {
"guard": "task 1 is answered",
"actions": ["delete from Task where artifact=CURRENT_ARTIFACT"]
}
},
"3":{}
}
'>
<input type="submit" value="submit">
......
Markdown is supported
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