Releases: cybercussion/SCOBot
Add get learner comments, set learner comment API
Adds support for learner comments and setting a learner comment.
ES6 Migrate legacy feature sets of SCOBot
Release Notes
v5.1.0 (2026-01-20)
Legacy Feature Restoration & Modernization
This release integrates critical complex logic from the original legacy codebase into the modern ES6 architecture, ensuring full feature parity and robust data integrity.
- Complex Interactions Restored: Ported
setInteractionlogic to handle SCORM 1.2 vs 2004 formatting nuances, including:- SCORM 1.2: Correctly formats arrays (e.g.,
tile.target,tile.target) vs 2004 bracket syntax. - Encoders: Added
encodeInteractionTypeanddecodeInteractionTypeto handle matching, performance, and sequencing types. - Helpers: Restored
trueRound,isBadValue,findResponseType.
- SCORM 1.2: Correctly formats arrays (e.g.,
- Mock Functionality Hardened:
- Strict Mode: The Mock API now enforces strict SCORM Data Model dependencies. Checks for ID-first creation and ensures unique IDs for objectives.
- Verification: Added comprehensive test suite
tests/mock_strictness.test.jsto validate these rules.
- Regression Fixes:
- Fixed a bug where string timestamps passed to
setInteractioncaused a crash. - Fixed Mock API not auto-initializing sub-containers for new interactions.
- Fixed a bug where string timestamps passed to
Testing
- Added dedicated test suites:
scobot.test.js(Interaction logic)mock_strictness.test.js(API Data Model enforcement)scorm12.test.js&scorm2004.test.js(Core compliance)
v5.0.0 (2026-01-19)
- Initial Modernization (ES6 Modules, Classes).
- Vite Build System.
- Vitest Testing Framework.
ES6 Update
v5.0.0: Modernization & ES Modules
This major release completely modernizes the SCOBot library, transitioning from a legacy IIFE/Global architecture to a standard ES Module system with modern tooling.
🚀 Key Features
- ES Modules: Native ESM support. Import only what you need:
import { SCOBot } from 'scobot'. - Modern Architecture: All core logic refactored into ES6 Classes (
SCOBot,SCOBotBase,SCOBotUtil). - TypeScript Support: Includes generated type definitions (
.d.ts) for better DX. - Local Persistence: The Mock API (
SCOBot_API_1484_11) now persists student data tolocalStorage, allowing for resumable sessions during local testing. - Data Compression: Built-in support for
lz-stringto compresssuspend_databefore sending to the LMS.
🛠 Tooling & Infrastructure
- Vite: Fast build system generating both ESM (
dist/scobot.js) and UMD (dist/scobot.umd.js) bundles. - Vitest: Modern unit testing suite replacing QUnit.
- CI/CD: Automated testing and NPM publishing via GitHub Actions.
⚠️ Breaking Changes
- Module System: The library is now primarily an ES Module. While a UMD bundle is provided for legacy script tags, the recommended usage is via
import. - Global Layout:
SCOBotdoes not automatically attach to the globalwindowobject unless you explicitly do so or use the UMD build. - Configuration:
Gruntfile.jsand.travis.ymlhave been removed in favor ofvite.config.jsand GitHub Actions.
2020 Update, 'nolms' event for handling (or not) an alert
This is a minor update which can fire a 'nolms' event you can listen for. Then opt to expose a modal, toast, alert, or other display to inform the student the LMS could not be connected.
This is mainly for situations where we have a Same-Origin-Policy or CORS issue.
a.domain.com vs b.domain.com where JavaScript cannot talk to the SCORM Runtime API.
Resume event for possible user prompt
SCOBot (full) will fire a 'resume' event allowing you the opportunity to decide if you want to prompt the user "do you want to resume?" and then handle it accordingly.
SCOBot caches suspend data within its public settings SB.set("suspend_data", "{pages: []}"); to reset it to the default.
4.1.5
Minor fix to local Runtime API to return a 403 for a uninitialized value. This didn't really throw many SCORM Errors as its a light weight mimic, but there was a issue with some 3rd Party content expecting this error code in order to function properly. Adjusted tests to similarly check for this. Altered SCOBotBase to supply a 'getLastError' which will return a error object containing error code, message, and diagnostic. This was previously handled within SCOBot or other means (events) but now has a public API if you need to check.
Updated version/dates to correct last release (4.1.4).
4.1.4
This provides a fix to SCOBots ability to automate the max_time_allowed. In doing prior code cleanup a bug was introduced which broke the ISODurationToCentisecs function within SCOBotBase.js. Unit tests have been added to now test the function. Please update if you use this feature.
4.1.3
Updated copyright dates, and versions. Implemented a fix to interactions numeric data types when passed as a string it would result in a empty string. This was caught in the latest build/unit tests.
4.1.2
Added options for supporting Sequence and Navigation calls in SCORM 2004 content. This gives you the added capability of setting a default 'adl.navigation.request' if you want to automatically continue, or exit for example after the SCO Terminates. Typical behavior (depending on the LMS platform) may be to leave your SCO just hanging out after Terminate is called. Unless you actually visually build something that informs the student their information is no longer tracked, it could and has confused students. So the short bonus is, you could actually exit the content.
The deeper strategy:
SCORM 2004 Implementations typically allow you to request a navigation request like continue, previous, choice, exit, exitAll, abandon, abandonAll, suspendAll. You should familiarize yourself with what these all do, as they may make your content 'less friendly' too students if for example you keep calling 'exitAll' and it kicks them out of the entire lesson.
You can make decisions about implementing your own strategies about remediation, or skipping content based on performance. You could call 'previous' to make the student go backwards and re-take something. You could request '{target=INTRO}choice' to jump to a sibling identifier. This does however put more ownership on making your content more aware of its surroundings in a bundled lesson. You could place extra parameters in launch data to dynamically inject some of that vs. hard coding it (for example). SCOBot may include a decision engine based on more parameters at a later date. It will mainly require expanded imsmanifest.xml construction which can have dependancies on a packaging system, or hand coding XML. So if a strategy is built out, it would have to coincide with added features to the SCOBot Packager or a manual adjustment in XML.
4.1.1
This mainly is a patch to allow people that encounter multiple Runtime APIs being exposed at the same time. This has been on the radar for a little while, and though rare it does happen. Its either the Platform translating SCORM 1.2 or 2004 into a common student attempt or its negligence exposing either API or API_1484_11 simultaneously. Typically one of the API's will not respond but the other will. So due to this, its setup now so you can specify your 'preferred_API' in the SCOBot Base module.
Commonly when SCO's get packaged you specify the version of SCORM you want to use. SCOBot originally would search SCORM 2004, then 1.2 and finally will fail over local if you allow it. In the above situation you could have a platform exposing 1.2 and 2004 runtimes. SCOBot would connect to 2004, but 1.2 was the intended API to communicate on.
If you do not have this problem, or see having this issue downstream it is a low-priority update.