Tincanjs how to delete the statement statement in lrs

397 views Asked by At

I would like to ask a question, tincanapi lrs how to delete the statement, I now use the tincanjs I see the document seems to only access and access, and did not delete and modify, would like to ask how to delete

1

There are 1 answers

0
Brian J. Miller On

There is intentionally no delete from the /statements resource in the Tin Can API (usually called xAPI now). This is because of how the transport mechanism works and so that statements can be easily forwarded from one LRS to another without having to propagate edit and delete events, etc. Instead the specification supports a special type of statement referred to as a voiding statement. See the specification here: https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#232-voiding

The certainty that an LRS has an accurate and complete collection of data is guaranteed by the fact that Statements cannot be logically changed or deleted. This immutability of Statements is a key factor in enabling the distributed nature of Experience API.

TinCanJS doesn't provide a special facility for issuing a voiding statement, but you can use the normal saveStatement mechanism with the special verb as illustrated in the specification to save a voiding statement.