Populating the section of a SCORM manifest

Other Tech. Add comments

Usually, eLearning courses are deployed in SCORM 1.2 format.  One of the features of this format is that it can easily determine which files are necessary to run the course.  Often, I see this data placed into the manifest in an incomplete format.  For example, only the .htm file will be listed in this section, but not the supporting files (.css, .js, etc.).

In searching for a way of quickly knowing which files are used, I have come across the following shell command (sorry PC users) which will read out the entire directory contents and format it correctly for SCORM 1.2:

 find ./html -type f -exec echo "<file href=\""{}"\" />"  \;

This simply lists out all the files in the directory tree, and surrounds them w/the appropriate XML so that they can be dropped into the manifest.  (It also assumes that all your files in are the "html" subdirectory, relative to your manifest.  Adjust accordingly for your setup.)

What this will not do is provide you with knowledge of which assets really are used; if you have extra files inside the course directories that are not used (e.g. storyboards, thumbs.db, .DS_Store), they will also be listed.  Best to purge those before running the script, unless you really intent to package them with your corse.  (Listing them in the manifest, but not packaging them results in an invalid SCORM package.)


2 responses to “Populating the section of a SCORM manifest”

  1. Scott Talsma Says:
    Addendum: sometimes I need to kick all the versioning directories (e.g. svn) out. Find lets me do this as well:

    find ./html -type f -not -iwholename '*.svn*' -exec echo "<file href=\""{}"\" />" \;
  2. Scott Talsma Says:
    While we're at it, let's also get rid of the pesky .DS_Store files:

    find ./html -type f -not -iwholename '*.svn*' -and -not -iwholename '*.DS_Store' -exec echo "<file href=\""{}"\" />" \;

Leave a Reply

Powered by Mango Blog. Design and Icons by N.Design Studio