Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paging does not work with attachments #150

Open
tseabrooks opened this issue Mar 26, 2018 · 0 comments
Open

Paging does not work with attachments #150

tseabrooks opened this issue Mar 26, 2018 · 0 comments
Assignees

Comments

@tseabrooks
Copy link

TinCanJS/src/LRS.js

Lines 770 to 786 in 8733f14

else {
boundary = xhr.getResponseHeader("Content-Type").split("boundary=")[1];
parsedResponse = lrs._parseMultipart(boundary, xhr.response);
statements = JSON.parse(parsedResponse[0].body);
for (i = 1; i < parsedResponse.length; i += 1) {
attachmentMap[parsedResponse[i].headers["X-Experience-API-Hash"]] = parsedResponse[i].body;
}
lrs._assignAttachmentContent(statements.statements, attachmentMap);
result = new TinCan.StatementsResult({ statements: statements.statements });
for (i = 0; i < result.statements.length; i += 1) {
if (! (result.statements[i] instanceof TinCan.Statement)) {
result.statements[i] = new TinCan.Statement(result.statements[i]);
}
}

When turning on attachment support the more link in the StatementResult is always null. Issue is in linked lines above. Code should be modified to grab the more value from the parsed JSON when doing attachments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants