I am trying to implement this endpoint activities/state/?method=GET in my LRS - but I can not seem to get the resume functionality working. I have all the data, but not sure what does Articulate expect the LRS to return in order to resume where the user left off. I also tried looking at Articulate support page, but nothing useful so far. Any help would be appreciated.
-
That is an "IE mode request" or CORS request and you'll want to also look at https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#cors. We'd need to see the body of the request to know what should occur. – Brian J. Miller Jan 14 '15 at 15:22
3 Answers
It's looking for the state string to be returned. Which is just a long string that is sent out when the state ( bookmark ) is saved.

- 26,756
- 46
- 158
- 277
I recommend testing with the Golf Prototype at http://tincanapi.com/prototypes/ first so that you know the issue is with the LRS. Try the prototypes in both Internet Explorer and another browser such as Chrome; any difference in behaviour could be a clue.
Please also look at your network tab in Chrome's developer tools and let us know if any requests are failing and what is being stored and retrieved from the State.
Full details of how the State API is supposed to work are found in the spec. Here's the relevant section in version 1.0.2: https://github.com/adlnet/xAPI-Spec/blob/a752217060b83a2e15dfab69f8c257cd86a888e6/xAPI.md#stateapi
It's also worth noting that building an LRS is hard. There are a number of commercial and open source LRS that will likely be cheaper than building one yourself.

- 1,068
- 8
- 20
I managed to get this working. I was using .NET Web API.
I had to explicitly set the content-type
header to octet-stream
- It was defaulting to text/html
.
The following code did the trick:
HttpResponseMessage httpResponseMessage = Request.CreateResponse(HttpStatusCode.OK);
httpResponseMessage.Content = new StringContent(studentModuleName.SuspendData);
httpResponseMessage.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");

- 613
- 4
- 10