skfriese / simple-scorm-api

A simple SCORM1.2 SCO run-time test environment in one file (NOT MAINTAINED)
68 stars 48 forks source link

how can i run localhost url course here #1

Closed ashuw20001 closed 8 years ago

skfriese commented 8 years ago

I haven't tried this, but assuming you mean running the SimpleAPI and the course in the same domain (localhost), you can simply enter the full URL in the launch page area. You need to be more descriptive about what you're referring to.

If you're launching content that exists in a different domain, then you're going to run into cross-domain scripting issues. There are other ways of getting around this, but those are outside the scope of this tool.

ashuw20001 commented 8 years ago

Hi Skfriese, I try with full url ex :- http://localhost/SCORM_Package/index.html and in console i am getting "ERROR: LMSInitialize not called within 20 seconds from launching."

My aim to run course online in my own android/iphone application. Request you please give me some idea how to achieve this task.

I will try how to solve cross domain issue.

Thanks.

skfriese commented 8 years ago

Where are you running the SimpleAPI from? Is it also being served up by your localhost, or are you running it locally from the file system (file://)?

SCORM uses Javascript to communicate between the SCO and the SCORM API exposed by the LMS. In this case, the SimpleAPI acts as the LMS. Due to cross-domain scripting restrictions you cannot simply attempt to communicate between between the SimpleAPI running locally (from the file system) and a SCO loaded via HTTP.

Depending on which browser you're using, you should be able to hit F12 in your SCO window and see the XD/security-related errors displaying there. To get around this, simply place the SimpleAPI in your web root and load it from http://localhost/simple-api.htm.

ashuw20001 commented 8 years ago

Thanks Skfirese for above words.

I already try this. But thing is like i am making one android web application for e-learning which will load courses from http protocol . Will you please suggset how i will load the course from server to android app and so that it will init the SCORM API and will give status of courses.