Successfully reported this slideshow.
Your SlideShare is downloading. ×

Anatomy of a Tin Can Statement

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 52 Ad

Anatomy of a Tin Can Statement

Download to read offline

Brian Miller is one of the world’s top Tin Can experts, will be presenting a technically oriented webinar that will take a deep-dive into each part of a Tin Can statement.

Topics that Brian will cover:

• Actor/Agent
• Verbs
• Activities
• Objects
• Attachments
• Context
• Result
• Extensions
• Others

Brian Miller is one of the world’s top Tin Can experts, will be presenting a technically oriented webinar that will take a deep-dive into each part of a Tin Can statement.

Topics that Brian will cover:

• Actor/Agent
• Verbs
• Activities
• Objects
• Attachments
• Context
• Result
• Extensions
• Others

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Viewers also liked (20)

Advertisement

Similar to Anatomy of a Tin Can Statement (20)

More from Rustici Software (20)

Advertisement

Anatomy of a Tin Can Statement

  1. 1. TinCanAPI.com #TinCanAPI Anatomy of a Tin Can Statement Brian J. Miller Rustici Software
  2. 2. TinCanAPI.com #TinCanAPI Brian ● Long time web developer ● Maintainer of TinCanJS, TinCanJava, TinCan_Prototypes ● Primary developer, maintainer and now curator of The Registry ● Contributor to the specification ● Up and comer on the Rustici Software Pong Ladder
  3. 3. TinCanAPI.com #TinCanAPI JSON
  4. 4. TinCanAPI.com #TinCanAPI Why JSON? ● JavaScript Object Notation ● Browser support thus library support ● Human Readable ● Minimalist (transfer size) ● Arbitrarily nestable ● “Executable” ● Popular
  5. 5. TinCanAPI.com #TinCanAPI JSON Entities ● Strings are quoted ● Numbers, booleans (`true`, `false`), and `null` are primitives ○ Primitives are not quoted ● { } indicates an Object ○ Objects have a key/value pair structure ○ The key is known as a “property” ○ Keys must be strings (quoted) ○ : is the separator ○ , is the delimiter ○ Values are strings, primitives, arrays and objects ● [ ] indicates an Array ○ Contains a list of values: strings, literals, objects and arrays ○ , is the delimiter ● Whitespace is ignored
  6. 6. TinCanAPI.com #TinCanAPI Sample JSON { “simpleProperty”: “Some string value”, “listProperty”: [ “first in list”, “second in list” ], “booleanProperty”: true, “nullProperty”: null, “nestedObject”: { “somePropertyOfObject”: “I’m inside an object” } }
  7. 7. TinCanAPI.com #TinCanAPI Sample JSON [ { “sample2”: “Array at top level works too” }, { “sample3”: “List of objects this time” } ]
  8. 8. TinCanAPI.com #TinCanAPI Identifiers IRI, UUIDs
  9. 9. TinCanAPI.com #TinCanAPI IRI vs URI vs URL ● Commonly recognizable by the non-technical ● Domain Specific Identifier ● Allows for “Ownership” ● Allows for Resolvability (and Updates) ● Multiple Object Uses ● The Registry tag:adlnet.gov,2013:expapi:0.9:activities:6VoMrbxMPZD http://rusticisoftware.github.com/TinCanJS
  10. 10. TinCanAPI.com #TinCanAPI Gooowhat? ● Two names for basically the same thing ● Specification uses UUID (version 4) ● Good library support 72c099dc-6388-4964-b7e5-3a2a4c34e452 f58f502c-e711-4e77-aed1-7d4ea8c07f44 27c8e14c-9055-4ef3-bdb9-eb5dc60987ee
  11. 11. TinCanAPI.com #TinCanAPI Language Map
  12. 12. TinCanAPI.com #TinCanAPI Language Map ● Object of language code to string mappings ● Provides Internationalization (I18N) ● RFC5646 for properties ● “und” { “en-US”: “...”, “en-GB”: “...”, “es-ES”: “...”, “es-MX”: “...”, “de-DE”: “...” }
  13. 13. TinCanAPI.com #TinCanAPI Building Statements { }
  14. 14. TinCanAPI.com #TinCanAPI Properties vs. Object Types id actor verb object context result timestamp stored authority version attachments Agent Group Verb Activity Activity Definition Context Result Score Statement Reference Sub-Statement Language Map
  15. 15. TinCanAPI.com #TinCanAPI “actor” Agent/Group
  16. 16. TinCanAPI.com #TinCanAPI “actor” ● Who the statement is about ● Required property of a statement ● Value is an Agent or Group
  17. 17. TinCanAPI.com #TinCanAPI Agent ● One Representation of a Person ● Ways to identify an Agent ○ Email Address (or mbox) ○ mbox SHA1 ○ OpenID ○ Account ● Named { “mbox”: “mailto:brian.miller@tincanapi.com”, “name”: “Brian J. Miller” } { “account”: { “homePage”: “http://twitter.com”, “name”: “k95bm01” }, “name”: “Brian J. Miller (on Twitter)” }
  18. 18. TinCanAPI.com #TinCanAPI Group ● Subtype of Agent ● ‘objectType’ property required ● Two kinds ○ Identified ○ Anonymous ● Has a “members” property ○ Value is an array ○ Members are Agents { “objectType”: “Group”, “account”: { “homePage”: “http://twitter.com”, “name”: “rusticisoftware” }, “name”: “Rustici Software (on Twitter)”, “members”: [ { “account”: { “homePage”: “http://twitter.com”, “name”: “k95bm01” }, . . . } ] }
  19. 19. TinCanAPI.com #TinCanAPI Build a Statement { “actor”: { “mbox”: “mailto:brian.miller@tincanapi.com” } }
  20. 20. TinCanAPI.com #TinCanAPI “verb”
  21. 21. TinCanAPI.com #TinCanAPI “verb” ● What occurred, the action ● Required property of a statement ● Value is a Verb ● Past tense
  22. 22. TinCanAPI.com #TinCanAPI Verb ● Required “id” property with URI value ● Optional but highly recommended “display” property with Language Map value { “id”: “http://adlnet.gov/expapi/verbs/experienced”, “display”: { “en-US”: “experienced” } }
  23. 23. TinCanAPI.com #TinCanAPI Build a Statement { “actor”: { “mbox”: “mailto:brian.miller@tincanapi.com” }, “verb”: { “id”: “http://adlnet.gov/expapi/verbs/experienced”, “display”: { “en-US”: “experienced” } } }
  24. 24. TinCanAPI.com #TinCanAPI “object” Activity, Agent/Group Statement Reference, Sub-Statement
  25. 25. TinCanAPI.com #TinCanAPI “object” property ● Target of the action ● Required property of a statement ● Multiple possible types of value ○ Activity ○ Agent/Group ○ Statement Reference ○ Sub-Statement
  26. 26. TinCanAPI.com #TinCanAPI Activity ● “id” property is a URI ● “definition” takes an Activity Definition object ○ “type” is a URI ○ “name” and “description” are language maps ○ “moreInfo” is a URL ○ “extensions” object ○ Other properties for interactions { “id”: “http://tincanapi.com/webinar/anatomy-of-a-statement”, “definition”: { “type”: “http://adlnet.gov/expapi/activities/media”, “name”: { “en-US”: “Anatomy of a Tin Can Statement” }, “description”: { “en-US”: “Presentation about the parts of a Tin Can Statement.” } } }
  27. 27. TinCanAPI.com #TinCanAPI Build a Statement { “actor”: { “mbox”: “mailto:brian.miller@tincanapi.com” }, “verb”: { “id”: “http://adlnet.gov/expapi/verbs/experienced”, “display”: { “en-US”: “experienced” } }, “object”: { “id”: “http://tincanapi.com/webinar/anatomy-of-a-statement”, “definition”: { “type”: “http://adlnet.gov/expapi/activities/media”, “name”: { “en-US”: “Anatomy of a Tin Can Statement” }, “description”: { “en-US”: “Presentation about the parts of a Tin Can Statement.” } } } }
  28. 28. TinCanAPI.com #TinCanAPI Build a Statement { “actor”: { “mbox”: “mailto:mike.rustici@tincanapi.com”, “name”: “Mike Rustici” }, “verb”: { “id”: “http://id.tincanapi.com/verb/hired”, “display”: { “en-US”: “hired” } }, “object”: { “mbox”: “mailto:brian.miller@tincanapi.com”, “name”: “Brian J. Miller”, “objectType”: “Agent” } }
  29. 29. TinCanAPI.com #TinCanAPI “context” Context Object
  30. 30. TinCanAPI.com #TinCanAPI “context” property ● Value is Context object ● All properties optional ○ contextActivities - Object with "parent', "category", "grouping", and "other" ○ registration - UUID ○ instructor - Agent/Group ○ team - Group ○ statement - Statement Reference ○ revision - String ○ platform - String ○ language - RFC5646 String, when known ○ extensions - Object
  31. 31. TinCanAPI.com #TinCanAPI Build a Statement { “actor”: { “mbox”: “mailto:brian.miller@tincanapi.com” }, “verb”: { “id”: “http://adlnet.gov/expapi/verbs/experienced”, “display”: { “en-US”: “experienced” } }, “object”: { “id”: “http://tincanapi.com/webinar/anatomy-of-a-statement/slide37”, “definition”: { “name”: {“en-US”: “Slide 37”} } }, “context”: { “registration”: “111b5f5d-c54d-4b9c-8eb3-0b646f207496”, “contextActivities”: { “parent”: { “id”: “http://tincanapi.com/webinar/anatomy-of-a-statement” } } } }
  32. 32. TinCanAPI.com #TinCanAPI “result” Result Object
  33. 33. TinCanAPI.com #TinCanAPI “result” property ● Value is Result object ● All properties optional ○ "completion" - Boolean ○ "success" - Boolean ○ "duration" - ISO8601 Duration ○ "score" - Score, object of numerical properties ■ "scaled" ■ "raw" ■ "min" ■ "max" ○ "extensions" - Object
  34. 34. TinCanAPI.com #TinCanAPI Build a Statement { “actor”: { “mbox”: “mailto:brian.miller@tincanapi.com” }, “verb”: { “id”: “http://adlnet.gov/expapi/verbs/completed”, “display”: {“en-US”: “completed”} }, “object”: { “id”: “http://tincanapi.com/webinar/anatomy-of-a-statement/pop-quiz”, “definition”: { “name”: {“en-US”: “Pop Quiz”} } }, “context”: { “contextActivities”: { “parent”: {“id”: “http://tincanapi.com/webinar/anatomy-of-a-statement”} } }, “result”: { “completion”: true, “success”: true, “score”: { “raw”: 97, “scaled”: 0.97 }, “duration”: “PT15M32S” } }
  35. 35. TinCanAPI.com #TinCanAPI “id”
  36. 36. TinCanAPI.com #TinCanAPI “id” Property ● Identifies a specific statement ● Value is a UUID ● Optional when sending statement to an LRS ● Set by LRS if not included ● Used in Statement Reference objects ● Use to query single statements ● Provides primary key for systems 72c099dc-6388-4964-b7e5-3a2a4c34e452
  37. 37. TinCanAPI.com #TinCanAPI Build a Statement { “id”: “69552da6-14c0-4e8d-bac5-2c026488f295”, “actor”: { “mbox”: “mailto:brian.miller@tincanapi.com” }, “verb”: { “id”: “http://adlnet.gov/expapi/verbs/experienced”, “display”: { “en-US”: “experienced” } }, “object”: { “id”: “http://tincanapi.com/webinar/anatomy-of-a-statement/slide37”, “definition”: { “name”: {“en-US”: “Slide 37”} } }, “context”: { “registration”: “111b5f5d-c54d-4b9c-8eb3-0b646f207496”, “contextActivities”: { “parent”: { “id”: “http://tincanapi.com/webinar/anatomy-of-a-statement” } } } }
  38. 38. TinCanAPI.com #TinCanAPI “timestamp”
  39. 39. TinCanAPI.com #TinCanAPI “timestamp” Property ● Date and time when statement is created ● Value is an ISO8601 formatted string ● Optional when sending statement to an LRS ● Set by LRS if not included 2013-09-11T14:52:46.907Z
  40. 40. TinCanAPI.com #TinCanAPI Build a Statement { “id”: “69552da6-14c0-4e8d-bac5-2c026488f295”, “timestamp”: “2013-09-11T22:38:16.329Z”, “actor”: { “mbox”: “mailto:brian.miller@tincanapi.com” }, “verb”: { “id”: “http://adlnet.gov/expapi/verbs/experienced”, “display”: { “en-US”: “experienced” } }, “object”: { “id”: “http://tincanapi.com/webinar/anatomy-of-a-statement/slide37”, “definition”: { “name”: {“en-US”: “Slide 37”} } }, “context”: { “registration”: “111b5f5d-c54d-4b9c-8eb3-0b646f207496”, “contextActivities”: { “parent”: { “id”: “http://tincanapi.com/webinar/anatomy-of-a-statement” } } } }
  41. 41. TinCanAPI.com #TinCanAPI Properties Set by the Learning Record Store “stored”, “authority”, “version”
  42. 42. TinCanAPI.com #TinCanAPI LRS Set Properties “authority” ●Indicates who asserts the statement ●Value is an Agent or Group ●Group of two members when using OAuth “stored” ●Date and time when statement is stored in the LRS ●Value is an ISO8601 formatted string ●Not used when sending statement to an LRS ●Set by LRS even if already exists “version” ●1.0.0+ Single Stream
  43. 43. TinCanAPI.com #TinCanAPI Fetch a Statement { "id": "69552da6-14c0-4e8d-bac5-2c026488f295", "actor": { "mbox": "mailto:brian.miller@tincanapi.com", "objectType": "Agent" }, "verb": { "id": "http://adlnet.gov/expapi/verbs/experienced", "display": {"en-US": "experienced"} }, "context": { "registration": "111b5f5d-c54d-4b9c-8eb3-0b646f207496", "contextActivities": { "parent": [ { "id": "http://tincanapi.com/webinar/anatomy-of-a-statement", "objectType": "Activity" } ] } }, "timestamp": "2013-09-12T01:37:13.128Z", "stored": "2013-09-12T01:37:13.128Z", "authority": { "name": "Test Activity Provider", "account": { "homePage": "http://cloud.scorm.com/", "name": "FACN92U0w1fM" }, "objectType": "Agent" }, "version": "1.0.0", "object": { "id": "http://tincanapi.com/webinar/anatomy-of-a-statement/slide37", "definition": { "name": { "en-US": "Slide 37" } }, "objectType": "Activity" } }
  44. 44. TinCanAPI.com #TinCanAPI “extensions” Activity Definition, Context, Result
  45. 45. TinCanAPI.com #TinCanAPI “extensions” property ● Catch all object ● For use in Activity Definition, Context, and Result ● Properties are URIs ● Values can be anything ● See The Registry http://id.tincanapi.com/extension/tweet
  46. 46. TinCanAPI.com #TinCanAPI “attachments”
  47. 47. TinCanAPI.com #TinCanAPI “attachments” ● Array of objects defining a list of files ● Required properties ○ “usageType” - URI, The Registry ○ “display” - Language map ○ “contentType” - RFC2046 MIME Media Type ○ “length” - Integer (number of octets) ○ “sha2” - String hash used as identifier ● Optional properties ○ “description” - Language map ○ “fileUrl” - URL for source
  48. 48. TinCanAPI.com #TinCanAPI Public LRS Statement Viewer
  49. 49. TinCanAPI.com #TinCanAPI Public LRS http://tincanapi.com/public-lrs Statements generated that are sent to the public endpoint provided on SCORM Cloud Clicking a statement will show the raw JSON
  50. 50. TinCanAPI.com #TinCanAPI Questions?
  51. 51. TinCanAPI.com #TinCanAPI Thank You!
  52. 52. TinCanAPI.com #TinCanAPI Contact Us Questions? Comments? http://tincanapi.com/talk/ #TinCanAPI @projecttincan, @k95bm01 info@tincanapi.com, support@tincanapi.com, brian.miller@tincanapi.com /join #tincanapi @ freenode

Editor's Notes

  • Overall objective: Enable people to go out and capture all of the facets of an experience that they ’ d like to, beyond the simple Actor-Verb-Object
  • New to the e-learning industry, landed at the perfect moment to take up Tin Can as .95 was landing “ Maintainer ” and Primary developer as opposed to sole developer, open source software so community contributions appreciated
  • JavaScript is the language of the browser and hence the web Important for understanding because used for things outside of the scope of statements Other APIs are dropping support for XML and converging to JSON
  • Going to use URI instead of IRI cause I ’ ve just been doing this too long 1 character changes a URI, for instance a trailing slash Community effort established by Rustici to advance adoption of the specification Mention that other registries can and do exist
  • GUID is the generic name for a class of unique identifiers, UUID is a specific standard for one implementation
  • Members must be agents but they need not be identified by the same set of parameters as the identified group or each other
  • Vast range of available options, check the registry for an ever growing list
  • Indicate that spec says “ SHOULD ” for “ display ” , so while optional its a best practice to always include it
  • “ there is so much confusion about this you should touch on there being one definition per activity ID, it can't be changed on a per-statement basis. (gross oversimplification, but that's what's needed here) ” -- Ben Clark
  • At this point the statement is spec compliant and can be sent to an LRS.
  • At this point the statement is spec compliant and can be sent to an LRS.
  • contextActivities can take either a single or an array of one or more
  • Key to interoperability, must be a UUID so that collisions should be prevented across systems PK enables things such as favoriting, etc. Necessary for voiding from statement reference
  • Talk about ambiguity of time (start, middle, end of experience)
  • Statement as received back from the SCORM Cloud LRS
  • Sending attachment data requires sending a multipart/mixed request

×