adlnet / xAPIWrapper

Wrapper to simplify communication to an LRS

Home Page:https://adlnet.gov/projects/xapi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ADL.XAPIWrapper.getStatements() only returns the newest statements

rscharfer opened this issue · comments

commented

Hello,

ADL.XAPIWrapper.getStatements() seems to only return the statements produced the last two days. The statements that are not returned are over a month old. Is this on purpose?

Hi Ryan,

So by default, when querying for statements, an LRS returns the latest 'n' number of statements based on it's limit. The ADL LRS returns, by default, 100 statements.

If you'd like to retrieve additional statements, you would have to query the 'more' link inside the statement result object. Here's an example of how you might accomplish this: https://github.com/adlnet/xAPIWrapper#use-the-more-property-to-get-more-statements

commented

Hi there,

I am using the SCORM Cloud LRS. It seems that the problem is that the parsed response I receive from ADL.XAPIWrapper.getStatements() has a "more" value of empty string when there are clearly a lot more statements in the LRS. And because the more value is empty string, the example code will not work.

This more than likely is not an issue with the wrapper, but with the SCORM Cloud LRS itself. After testing the wrapper against the ADL LRS, we received a valid 'more' link with no issue.

One recommendation would be to test your wrapper against our LRS. If you're able to get a valid 'more' link, then the wrapper is not the issue.