TinCanPHP | PHP library for the Experience API | REST library
kandi X-RAY | TinCanPHP Summary
kandi X-RAY | TinCanPHP Summary
A PHP library for implementing the Experience API (Tin Can API).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Send the request
- Verify the JWS
- Compare two values .
- Return all object properties as a version .
- Returns a UUID .
- Returns the preferred language string
- Set list property
- Set the timestamp
- Sets the raw value .
- Set instructor
TinCanPHP Key Features
TinCanPHP Examples and Code Snippets
Community Discussions
Trending Discussions on TinCanPHP
QUESTION
My question relates to the Tin Can PHP API library's Person
object and what use may be made of it.
The library's Person
object is (so far as I understand) an implementation of the Agents Resource in Part 3 Section 2.4 of the xAPI specification (link: https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#24-agents-resource). The specification recognises a Person object and indicates that the purpose of the object is to
provide combined information about an Agent derived from an outside service, such as a directory service
It seems from that description, and from the developers of the library (see link), that the specification's Person object is intended to provide a means of collecting, within the one object, information about a person which is dispersed among a number of different Agent objects.
I have had difficulty following the examples in the library but the following (oversimplified) code seems to work in the SCORM Cloud LRS:
...ANSWER
Answered 2017-Jan-25 at 20:50The API does not provide a means to save this object. It is intended for the LRS to use whatever means it can to assemble multiple Agents that represent the same entity into the Person object. The intended purpose is to allow systems accessing the statement stream to be able to combine those streams for multiple Agents to get a fuller picture of that person's overall activity.
For example, I may have 3 (or X) identifiers that represent me as a person, let's assume they are:
mailto:dave.personal@example.com
mailto:davelastname@work.example.com
{"name": "@dave11785","homePage": "https://twitter.com"}
Passing any one of those Agent identifiers (as a full Agent representation) to the Person read only resource will return a Person object that includes all of them assuming sufficient knowledge by the LRS to map them together. For a reporting system therefore, it would be possible while it is reading the statement stream to request the Person object for each new Agent it sees and then coordinate statements with disparate actor
properties (for instance) into a single record of that person's complete activity. The key here is that the LRS has to have been developed (or integrated) in such a manner that it has the requisite knowledge to associate Agents together.
TinCanPHP provides the full range of data model objects because in theory it could be used to write an LRS just as much as to communicate with one as an LRP. The key implementation detail here is that it provides the GET /agents
readonly resource via the TinCan\RemoteLRS
class which will provide back a TinCan\Person
object. Since your code is not interacting with an instance of the TinCan\RemoteLRS
class it isn't actually communicating with the LRS so SCORM Cloud's LRS is irrelevant in this case. If you were to interact using the available resource you would get a Person object returned that includes only the Agent you passed into it because (at least at the time of writing) Cloud does not know how to associate multiple Agents, but it does know that the default is the Agent provided to it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TinCanPHP
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page