adlnet / xAPIWrapper

Wrapper to simplify communication to an LRS
https://adlnet.gov/projects/xapi/
Apache License 2.0
219 stars 114 forks source link

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

Closed rscharfer closed 6 years ago

rscharfer commented 6 years ago

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?

ajanderson1209 commented 6 years ago

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

rscharfer commented 6 years ago

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.

ajanderson1209 commented 6 years ago

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.