Closed popvasilevlad closed 4 years ago
This package simplifies SCORM API calls from React projects. It does not include the SCORM API. Typically that is provided by the LMS in the parent window. In fact, if you look through the SCORM API wrapper that this project depends on, you will see that it attempts to locate the SCORM API in either the current window context or the parent window.
If it cannot find the API, it will give an error like you encountered. All this project does is take that pipwerks wrapper and make it a bit more React-friendly. So you'd still need to ensure that your environment provides a SCORM API. For development environments, you can mock the API. Here's an example you can put in your index.html that will make the mock API available to you React app.
Later on, you can bundle up and package your React app and upload it to either your LMS or ScormCloud to test that the API calls are functioning as expected. You can use something like simple-scorm-packager to package your built React app.
This is a somewhat difficult topic as the SCORM API can be a bit tricky to understand because despite being a standard, LMS's implement the API in different ways. When I have more time I'll attempt to explain in detail in a blog post and some improved documentation here.
In the meantime, I may be able to answer specific questions and possibly set up a sample project for you to take a look at.
Closing this as an issue. I will continue to answer questions if needed.
Hey everyone,
I am a frontend developer for a LMS platform and I need to give the users the possibility to take courses provided from our stakeholders through our application. The problem is that this is completely new to me so I did some research and then I found this package which seems useful for me at the moment.
The problem is that I don't know how to start with it. I ran the example available in READ.me and I'm getting this error:
As I understand, maybe I'm wrong but I need to insert the API from where the Scorm Provider will get the courses. But the question is where and how?
I can use some help right now and I think a better documentation and some examples would solve this problem in the future.
Cheers, Vlad