コード例 #1
0
ファイル: VerbTest.php プロジェクト: skedone/experience-api
 public function testIsVoidVerbWithoutVoidVerb()
 {
     $verb = new Verb();
     $verb->setId('http://www.adlnet.gov/XAPIprofile/ran(travelled_a_distance)');
     $verb->setDisplay(array('en-US' => 'ran', 'es' => 'corrió'));
     $this->assertFalse($verb->isVoidVerb());
 }
コード例 #2
0
ファイル: statement.php プロジェクト: skedone/experience-api
	$deserialized = \json_decode($serializedStatements, true);


	$client->addEvent('app_project', $deserialized);

	print "\nCreated " . $i . " events";
}
*/
$statement = new Statement();
$actor = new Agent();
$actor->setName($data['agent']['name']);
// $verb = Verb::create('commented');
$verb = new Verb();
$verb->setId($data['verb']['id']);
$verb->setDisplay($data['verb']['display']);
$object = new Activity();
$object->setId($data['object']['id']);
$on = new Activity();
$on->setId($data['object']['id']);
$context = new Context();
$context->setInstructor($actor);
$ca = new ContextActivities();
$ca->setParent($on);
$context->setContextActivities($ca);
$statement->setId(Uuid::uuid4());
$statement->setActor($actor);
$statement->setVerb($verb);
$statement->setObject($object);
$statement->setContext($context);
$serializedStatements = $statementSerializer->serializeStatement($statement);