chatpongs / scorm-player

BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

Versions of dependencies should be updated! #1

Open cemberkongay opened 4 years ago

cemberkongay commented 4 years ago

In order for the application to run, the package.json file must look like this:

{
  "name": "scorm",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "preinstall": "npx npm-force-resolutions",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "resolutions": {
    "graceful-fs": "^4.2.2"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "async": "^2.1.2",
    "express": "^4.14.0",
    "natives": "^1.1.6",
    "unzip": "^0.1.11",
    "xmldoc": "^0.5.1"
  }
}
dipakdas99 commented 3 years ago

Hi @cemberkongay, Some of the SCORM files require learner_id to run the SCORM file. For example, I have one synapse SCORM file when I tried to run that I get "The host LMS for this launch returned an empty learner id. The learner id is required for RXD, the launch has been halted" error. Could you please guide me on how to resolve the above issue? The synapse SCORM files version is 1.2 and I have modified the scormPlayer.js file a little bit to fetch the completion percentage/ status when a user commits.

//Setting up dummy API
  window.scorm = new SCOBotBase({
    debug: true,
    time_type: "UTC", // or GMT
    exit_type: "suspend", // or finish
    success_status: "unknown", // passed, failed, unknown
    cmi: {}, // optional way to resume locally or some other custom use case
    learner_id: 123,
    learner_name: "dipak",
  });
  window.scorm.initialize();
  const options = {
    learner_id: 123,
    learner_name: "dipak",
  };
  // window.API.student_id = options.learner_id;
  // window.API.student_name = options.learner_name;

  //This is where content providers will look for the SCORM RTE
  window.API_1484_11 = new SCOBot_API_1484_11(options);

I don't know which API will provide the completion status/percentage. I would appreciate it if you could help me with the guidance.