/
Import SCORM Courses

Import SCORM Courses

This is a step by step guide to importing SCORM courses into the LMS.  Before getting started ensure the package is the correct version.   Our LMS only supports SCORM v1.2.  This can be checked by opening the imsmanifest.xml in the root of the zipped SCORM package.

In the <metadata> tag there will be a <schemaversion> which should be 1.2.  If the version is incorrect, the client must re-package the course using the correct version.

If the version is correct, and the package is assumed (or tested) to be working, then the following steps will import the course:

Instructions

  1. Upload/copy the SCORMcourse.zip to a directory where you can find it.
    1. If localhost, this can be anywhere on your machine
    2. If a remote server (e.g. Live or Hotbackup) you will need FTP credentials.  Generally the default folder will be 'D:\FTP\Caleb\' (confirm with Operations)
  2. Before importing the course, you must create a 'shell' page to load the course to.  Go to the Org/NavPage you wish to load the course into.  From there:
    1. Click > Edit > Links
    2. Click > Add > Course Home Page
    3.  If the Course Home Page will hold more than just the SCORM course
  3. Add course offering the the Course Home Page created in (2).  While on that page:
    1. Click > Manage > Registrations
    2. Click > Add Offering
    3. Give the offering a Short Id and description.  Set a Start Date (most likely today's date), but note that End Date is optional.  Generally you can leave End Date empty.
    4. Click > 'Add Offering' to confirm.
  4. If the SCORM course is the only thing that will live on the Course Home Page you should change the page template to be 'SCORM.Shell.Workflow.cshtml' (found in the default/NoOrg FileCollection)
    1. Navigate to the Course Home Page created 
    2. Click > Edit > Page
    3. Click > Change Template
    4. In the Pop-up click > Other Repositories > templates > 'Select the SCORM Shell template'  (Unless a SCORM template exists in that org's templates folder)
  5. Next, go to the dev page (domain.marinels.com/pages/dev) directly, or click 'Setup' from any admin page.
    1. Click > 'Clients' to open the command line and run: importScorm [scorm package location (absolute directory incl. file name)] [import path (e.g. /Root/<Organisation>/)] [group display name] [TOC link display name] [optional: -ScoId:"SCO ID HERE" (will only work on scorm courses with one resource)]
      1.  E.g. importScorm "D:\FTP\Caleb\Example_SCORM.zip" "/Root/Fug/Course" "Grouping Name" "SCORM Course XYZ" -ScoId:"11Nov2021"
    2. Note: "Grouping Name" is only used if grouping of links is needed on the NavPage.  This can be removed/edited later (e.g. you can reorder the links to remove the course from the group, or whatever else is needed after the fact; see next step).  However currently the command requires this group name to execute successfully.
  6. Return to the Course Home Page from step (2), and click on the actual course link where you take the course(This will generate an API error which requires the following steps to solve)
    1. Click > Edit > Page
    2. Click > 'Change Template'
    3. Click > 'Other File Repositories' at the top of the pop-up
    4. Navigate to templates folder (generally found under 'MarineLMS Home Page' or 'Online Training Center' but not always).  
    5. Select the desired SCORM template (generally 'SCORMPage.cshtml' or 'SCORMCourse.cshtml')
    6. Save Changes
  7. The course is now loaded, and you can setup a course grade book for SCORM.

Pre 4.0 Manifest Fixes

After running the importSCORM command, the course folder in the File Collection will have a file called SCOManifest.js:

That file will have some declarations.  For example:
myAPI.SCOIDMapping["index_lms.html"] = "__6hNnVhR6ABL_course_id_RES";
myAPI.SCOManifestMapping["index_lms.html"] = {"id":"__6hNnVhR6ABL_course_id_RES","timelimitaction":"ContinueNoMessage"};
Provided the course has the above files, you will only need to duplicate those lines to map to the flash and html5 indexes (pictured above).  Example:
myAPI.SCOIDMapping["index_lms.html"] = "__6hNnVhR6ABL_course_id_RES";
myAPI.SCOIDMapping["index_lms_html5.html"] = "__6hNnVhR6ABL_course_id_RES";
myAPI.SCOIDMapping["index_lms_flash.html"] = "__6hNnVhR6ABL_course_id_RES";
myAPI.SCOManifestMapping["index_lms.html"] = {"id":"__6hNnVhR6ABL_course_id_RES","timelimitaction":"ContinueNoMessage"};
myAPI.SCOManifestMapping["index_lms_html5.html"] = {"id":"__6hNnVhR6ABL_course_id_RES","timelimitaction":"ContinueNoMessage"};
myAPI.SCOManifestMapping["index_lms_flash.html"] = {"id":"__6hNnVhR6ABL_course_id_RES","timelimitaction":"ContinueNoMessage"};
If the course does not have those files ("index_lms_html5.html" and " index_lms_flash.html ") let Caleb know; we'll have to deal with those individually.  As of version 4.0 this mapping is built differently and this will not be needed.

Changing the SCO ID

As per the above, you can also override the SCO Id in the SCOManifest.js file:

myAPI.SCOIDMapping["index_lms.html"] = "NEW SCO ID HERE";
myAPI.SCOIDMapping["index_lms_html5.html"] = "NEW SCO ID HERE";
myAPI.SCOIDMapping["index_lms_flash.html"] = "NEW SCO ID HERE";
myAPI.SCOManifestMapping["index_lms.html"] = {"id":"NEW SCO ID HERE","timelimitaction":"ContinueNoMessage"};
myAPI.SCOManifestMapping["index_lms_html5.html"] = {"id":"NEW SCO ID HERE","timelimitaction":"ContinueNoMessage"};
myAPI.SCOManifestMapping["index_lms_flash.html"] = {"id":"NEW SCO ID HERE","timelimitaction":"ContinueNoMessage"};

New Manifest Mapping

As of version 4.0.x a new manifest mapping has been created and is used on ImportScorm.  This is to prevent manual mapping of the multiple entry points (e.g. index_lms_html5.html) in the SCOManifest.js after import.  The new SCOManifest.js should still have a value mapped after import (lines 6 and 7):

1
2
3
4
5
6
7
8
var myAPI = getAPIHandle();
if (!myAPI) { console.log("Mapping: Could not find API"); }
else{ console.log("APIFOUND");
myAPI.SCOIdFromManifest = {};
myAPI.SCODataFromManifest = {};
myAPI.SCOIdFromManifest = '__6g7FD8imvYA_course_id_RES';
myAPI.SCODataFromManifest = {"id":"__6g7FD8imvYA_course_id_RES","timelimitaction":"ContinueNoMessage"};
}


There are example at 

For any issues that may arise, see the Troubleshooting Guide