├── README.md ├── scorm_sample.zip └── src ├── css └── style.css ├── img └── bgtile.gif ├── imsmanifest.xml ├── index.html └── scormify.js /README.md: -------------------------------------------------------------------------------- 1 | SCORMIFY 2 | ======= 3 | 4 | Create your own SCORM 1.2 compliant content that can be uploaded into any LMS 5 | 6 | ## A few rules... 7 | 8 | * The starting point for your content must be the index.html page 9 | * Index.html must reference scormify.js as this communicates with the LMS 10 | * Don't modify the imsmanifest.xml unless you know what you're doing 11 | 12 | ## What content can I use? 13 | 14 | You can use any content that you want including: 15 | 16 | * Videos, images, audio, flash 17 | * Links to other html pages. i.e. create a basic website with navigation. 18 | * Javascript. Could be included in the package or referenced from another site like a CDN. 19 | * Stylesheets 20 | 21 | ## Publish & Deploy 22 | 23 | Once you're ready to deply you will need to zip all of your files ensuring that index.html and imsmanifest.xml are in the root of the zip. 24 | 25 | You will then upload your new zip file to a SCORM compliant LMS. 26 | 27 | _Note:_ A common mistake is to zip the folder that contains your content. In this case the folder becomes the root item of the zip which could prevent the destination LMS from being able to unpackage the SCORM correctly. 28 | 29 | ## License 30 | 31 | (The MIT License) 32 | 33 | Copyright (c) 2012 Daniel Allen, Litmos.com 34 | 35 | Permission is hereby granted, free of charge, to any person obtaining 36 | a copy of this software and associated documentation files (the 37 | 'Software'), to deal in the Software without restriction, including 38 | without limitation the rights to use, copy, modify, merge, publish, 39 | distribute, sublicense, and/or sell copies of the Software, and to 40 | permit persons to whom the Software is furnished to do so, subject to 41 | the following conditions: 42 | 43 | The above copyright notice and this permission notice shall be 44 | included in all copies or substantial portions of the Software. 45 | 46 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 47 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 48 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 49 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 50 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 51 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 52 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /scorm_sample.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Litmos/SCORMify/651ed1088b3cfe43489aee9606f7be864ffcea6b/scorm_sample.zip -------------------------------------------------------------------------------- /src/css/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #F0F0F0 url(../img/bgtile.gif) repeat -70% 0; 3 | color: #444; 4 | font-family: Verdana, Helvetica, Arial; 5 | } 6 | h1, h2{ 7 | text-transform: uppercase; 8 | text-shadow: 0px 1px 1px white; 9 | } 10 | h2{ 11 | border: solid 1px #ccc; 12 | background-color: #ddd; 13 | padding: 5px; 14 | font-size: 1em; 15 | } 16 | p{ 17 | margin: 10px; 18 | } 19 | ul li{ 20 | padding:5px; 21 | } 22 | #content{ 23 | width:800px; 24 | margin:40px auto; 25 | } 26 | p.intro{ 27 | font-style:italic; 28 | padding-bottom: 20px; 29 | } 30 | p.italic{ 31 | font-style:italic; 32 | } -------------------------------------------------------------------------------- /src/img/bgtile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Litmos/SCORMify/651ed1088b3cfe43489aee9606f7be864ffcea6b/src/img/bgtile.gif -------------------------------------------------------------------------------- /src/imsmanifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | ADL SCORM 9 | 1.2 10 | 13 | 14 | 15 | <langstring xml:lang="x-none">SCORMify - Custom Scorm Wrapper</langstring> 16 | 17 | 18 | SCORMify - Custom Scorm Wrapper 19 | 20 | untitled 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ADL SCORM 1.2 32 | 33 | 34 | 35 | 36 | 37 | Course Title 38 | 39 | Course Title 40 | 41 | 42 | 43 | exit,message 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SCORMify Sample 5 | 6 | 7 | 8 | 9 |
10 |
11 |

SCORMify Sample Course

12 |

Create your own SCORM 1.2 compliant content that can be uploaded into any LMS

13 |
14 |
15 |

A few rules...

16 | 21 |

What content can I use?

22 |

You can use any content that you want including:

23 | 29 |

Publish & deploy

30 |

Once you're ready to deply you will need to zip all of your files ensuring that index.html and imsmanifest.xml are in the root of the zip.

31 |

You will then upload your new zip file to a SCORM compliant LMS.

32 |

Note: A common mistake is to zip the folder that contains your content. In this case the folder becomes the root item of the zip which could prevent the destination LMS from being able to unpackage the SCORM correctly.

33 |
34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /src/scormify.js: -------------------------------------------------------------------------------- 1 | // SCORMify.js 2 | // (c) 2012 Daniel Allen, Litmos.com 3 | // SCORMify.js may be freely distributed under the MIT license. 4 | 5 | var SCORMify = (function () { 6 | 7 | var lms = null; 8 | var timeCurrent_int = new Date().getTime(); 9 | var timeLimit_int = new Date().getTime() + (30 * 1000); 10 | 11 | function findLMS(win) { 12 | var retries = 0; 13 | while ((win.API == null) && (win.parent != null) && (win.parent != win)) { 14 | retries++; 15 | if (retries > 7) { 16 | alert("Error finding LMS SCORM API -- too deeply nested."); 17 | return null; 18 | } 19 | win = win.parent; 20 | } 21 | return win.API; 22 | } 23 | 24 | function getLMS() { 25 | var scormApi = findLMS(window); 26 | 27 | if ((scormApi == null) && (window.opener != null) && (typeof (window.opener) != "undefined")) 28 | scormApi = findAPI(window.opener); 29 | 30 | if (scormApi == null) 31 | alert("Unable to find an API adapter"); 32 | 33 | return scormApi; 34 | } 35 | 36 | function complete(s) { 37 | setValue("cmi.core.score.raw", s); 38 | setValue("cmi.core.lesson_status", "completed"); 39 | lms.LMSCommit(); 40 | } 41 | 42 | function setValue(n, v) { 43 | var s = lms.LMSSetValue(n, v); 44 | return s; 45 | } 46 | 47 | function exit() { 48 | lms.LMSExit(); 49 | } 50 | 51 | // This simply loops for a set period of time, waiting for the API to load and/or be found. 52 | while ((lms == null) && timeCurrent_int < timeLimit_int) { 53 | lms = getLMS(); 54 | } 55 | if (lms == null) { 56 | alert("whoops cannot find lms api"); 57 | } else { 58 | lms.LMSInitialize(""); 59 | complete(100); // set to complete once loaded 60 | } 61 | })(); --------------------------------------------------------------------------------