-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Support Cmi5 from the backend #266
feat: Support Cmi5 from the backend #266
Conversation
@emmanuel Thanks for your contribution, this looks really great! Would there need to be any additional helper methods for backend scenarios? I'm unsure how you're going to consume the The general approach here is spot on, if we could get it split up so we have the classes in different files we would have a good candidate. |
e093c33
to
74c1639
Compare
74c1639
to
8320afa
Compare
@CookieCookson I think this is ready for another look now that the first PR landed. To answer your question: I'm working on a project where we have an AU provider that has a backend component: it is consumed via the browser but scoring and some interactions occur on our backend. Because the launch is initiated via query parameters, one of the first steps when an AU is launched is that our frontend calls our backend with the Cmi5 launch parameters, then we send all xAPI statements from the backend. Not long ago I moved our project over to use your I would like to adopt (something like) the |
There's a 405 from codeclimate; I don't know what that means. Also, coverage may have marginally decreased (because lines may have grown slightly by me moving things around, and I didn't add any test coverage to offset that). |
Sounds great, thanks for clearing up the use case! Please ignore codeclimate, I've found it to be quite counter productive at times and will most likely end up removing it in the near future. I can bypass the results for it in the CI so we won't have to make any code changes for it. I'm away for the weekend now but I'll pick this up next week for another review 👀 |
@CookieCookson — howdy! Just checking in. Is this tracking towards landing? And is there anything further you'd like to see done on this PR? |
@emmanuel Great stuff, it's all merged in now! I'll do some testing with the CMI5 demo project to ensure its all working as expected for client-side. EDIT: Demo project seems to be working as before! |
@emmanuel Looking at the rollup output, do you need some additional exports for the AbstractCmi5 class so it can be directly imported into your backend code? |
Building on #264, this adds an
AbstractCmi5
superclass and defines itsconstructor()
to acceptLaunchParameters
, then makeCmi5
extend that class and contain allwindow.location
references in theCmi5
subclass.I'm open to feedback or reworking this. I wanted to get the conversation started with a concrete working implementation to discuss.
Also, I structured this to stack after #264, so please look at the one commit that's distinct in this PR.