1

I'm coming from a SCORM end and trying to figure out two related issues with how to do update and find the most recent data (ie, looking for best practices).

In SCORM I'd have a set of activities that would all store their answers and scores (easily understandable from the docs etc). The "how" I'm after is specifically related to resuming the set of activities multiple times, and hitting "reset" and submitting a different answer to a single activity after a statement has been sent in.

From what I read with xAPI it states that statements are immutable - so how would I go about this.

My first thought was that I'd make the statement id generated from the activity id and void the old answer when it changes - but that sounds wrong (not least because it reads like you can't re-use the id even with voiding).

So it looks like the Statement id needs to be unique, which would mean that multiple identical Objects would be found - so would I have to look through every attempt and check for the latest one?

I'm currently looking at using xAPIWrapper in the middle.

Rycochet
  • 2,860
  • 1
  • 22
  • 39

1 Answers1

2

Moving from SCORM to xAPI requires a change of mindset. SCORM deals with statuses which get updated; xAPI logs events like a journal.

You can think of it like Facebook. You post a photo of your new cat; a month later you post a photo of your cat 1 month older. There's no need to go back and delete the old post. If you want the latest photo of your cat you just go and get the most recent photo tagged "Ryochet's cat". You can also look at older photos to see how your cat developed. xAPI is like that activity stream on Facebook.

So, if somebody scores 10 points on their first attempt, then 20 points on their second attempt, you'd simply send a second set of statements about the 2nd attempt. There's no need to get rid of the statements about the old attempt, that happened and is useful data to see how the learner developed.

Andrew Downes
  • 1,068
  • 8
  • 20
  • That's what I figured - so when getting the data back should I be storing all that in State so it's updatable and a single get, or should I be getting the Statements and filtering? – Rycochet Jan 13 '16 at 16:47
  • I don't 100% understand the scenario, but certainly you should use the State for status data where appropriate. – Andrew Downes Jan 15 '16 at 10:08
  • They're test type activities, so when re-loading they want to be able to display the previous score - but saving it in the state is easy enough and means I don't need to filter through the Statements - my aspie brain just couldn't figure out "already storing it in one place, nothing wrong with doing it somewhere else too" :-P – Rycochet Jan 15 '16 at 13:45
  • Very crudely, the statement API is designed to be used for reporting and the state (and other document APIs) are designed for bookmarking. There might be some times where you'd use each outside of this design, but that's a helpful rule of thumb for most cases. It's not technically duplication of data either. The state API says "the learner's score is 89", the statement API says "the learner scored 89 at this time" – Andrew Downes Jan 18 '16 at 09:32
  • Makes sense - hopefully this will help others who come at it from the wrong mindset too ;-) – Rycochet Jan 21 '16 at 15:19