-
Notifications
You must be signed in to change notification settings - Fork 42
Home
Matt Leathes edited this page Oct 23, 2017
·
5 revisions
Welcome to the adapt-contrib-spoor wiki.
If you need to get access the SCORM API in your own code, /js/scorm/wrapper.js
exposes a number of functions for your use (via a singleton object called ScormWrapper). Requiring /js/scorm/scorm.js
will return the instanciated wrapper for you. Once you have this, you get access to a whole host of lovely utility functions. Here are a few of the most useful (you'll need to dig around in the js for the full list):
- Lesson status:
getStatus
setStatus
setIncomplete
setCompleted
setPassed
setFailed
- Scoring:
getScore
setScore
- Bookmarking/lesson location:
getLessonLocation
setLessonLocation
- Suspend Data:
getSuspendData
setSuspendData
- Student data:
getStudentName
getStudentId
- Misc:
-
isFirstSession
-- whether the user has accessed the course/SCO before (more reliable than checking for 'incomplete' lesson status)
-
See below for a working example.
Adapt.on("app:dataReady", function() {
var spoorConfig = Adapt.config.get('_spoor');
if(spoorConfig && spoorConfig._isEnabled) {
try {
var scormAPI = require('extensions/adapt-contrib-spoor/js/scorm');
} catch(e) {
console.log('Something went wrong', e);
}
console.log(scormAPI.getStudentName());
}
});
- Framework in Five Minutes
- Setting up Your Development Environment
- Manual Installation of the Adapt Framework
- Adapt Command Line Interface
- Common Issues
- Creating Your First Course
- Styling Your Course
- Core Plugins in the Adapt Learning Framework
- Deploying and Testing Your Adapt Course
- Contributing to the Adapt Framework
- Git Flow
- Adapt API
- Adapt Command Line Interface
- Core Events
- Core Model Attributes
- Core Modules
- Web Security Audit
- Peer Code Review
- Plugins
- Developing Plugins
- Developer's Guide: Components
- Developer's Guide: Theme
- Registering a Plugin
- Semantic Version Numbers
- Core Model Attributes
- Adapt Command Line Interface
- Accessibility
- Adapt Framework Right to Left (RTL) Support