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

cmi.student_preference support #241

Closed
danielghost opened this issue Apr 24, 2020 · 4 comments
Closed

cmi.student_preference support #241

danielghost opened this issue Apr 24, 2020 · 4 comments

Comments

@danielghost
Copy link
Contributor

When checking if cmi.student_preference is supported by the LMS, cmi.student_preference._children should ideally be used. It is recommended to use ._children to determine which elements of a data model are supported. Directly checking one of the children properties can result in an error if the LMS doesn't return a 401 error code, even though it should. For safety, would recommend this is amended:
https://github.com/adaptlearning/adapt-contrib-spoor/blob/master/js/scorm/wrapper.js#L249

@moloko
Copy link
Contributor

moloko commented Apr 24, 2020

@danielghost my only issue with dealing with exceptions like this is that by changing it to something else you're just opening it up to failing on a different exception for some other LMS that also doesn't quite adhere to the standards - but in a slightly different way!

Which LMS is this by the way?

@danielghost
Copy link
Contributor Author

It is for Adobe Captivate Prime and I have flagged this to them. I agree that we shouldn't need to change this as the LMS should return a 401 regardless if it is not supported, but there shouldn't be any issues with checking for ._children first before attempting to check if a child element is supported. That is actually the reason why that method exists.

I can just change locally for the relevant project if it is a concern, but worth flagging in case other projects use this LMS.

@moloko
Copy link
Contributor

moloko commented May 1, 2020

Adobe made an LMS?? 🤦

@oliverfoster oliverfoster transferred this issue from adaptlearning/adapt_framework Jul 26, 2022
@oliverfoster oliverfoster changed the title adapt-contrib-spoor: cmi.student_preference support cmi.student_preference support Aug 17, 2022
@oliverfoster
Copy link
Member

stale

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

No branches or pull requests

3 participants