adlnet/xAPIWrapper

Auto generate statement.id

Closed this issue · 3 comments

It looks like the wrapper generates a statement.id if it hasn't already been set:
https://github.com/adlnet/xAPIWrapper/blob/master/src/xapiwrapper.js#L356

Doesn't the xAPI spec suggest the LRS should be responsible for these?
https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#requirements-2

In this case, the wrapper itself does align with the spec:

Statement ids SHOULD be generated by the Learning Record Provider.

Where the LRP in our case is the entity using the wrapper.

As an aside to your point though, I tend to agree that the LRS should be responsible for it. The spec already requires that the LRS respond with an ordered list of the UUIDs of each statement it stored, so UUID generation by an LRP has always felt like overkill with a (statistically improbable) collision risk.

Sorry, I actually read LRP as LRS. You're right, it does match the spec in this case.

Oh it's no problem, can always use an extra pair of eyes.

Thanks for bringing it up!