Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCORM Objectives support #181

Open
wants to merge 2 commits into
base: legacy
from

Conversation

Projects
None yet
1 participant
@chris-steele
Copy link
Contributor

commented Jan 8, 2019

N.B. this functionality is being introduced into the legacy version of spoor first. If successful it will be introduced into master.

Objectives are implemented as being completion-based or event-based. A list of one or more Adapt models is given for a completion-based objective. As these models are completed the status of the objective changes. The functionality for completion-based objectives is built into spoor. Event-based objectives allow the state of the objective to be controlled externally (e.g. by a third party plugin). For event-based objectives it is the responsibility of the implementer to trigger a given event to request that the objective state should change.

Objective types

Objectives can be completion-based or event-based. A completion-based objective changes state as the given content models (components, blocks, articles, content objects) are completed. State changes for event-based objectives are handled externally; allowing the behaviour of the objective to be implemented arbitrarily. Specify a completion-based objective using the property _content and assigning to it an array of content model IDs. An event-based objective is specified by assigning the name of the event to the _event property.

Objective identifiers

Objective IDs can be given directly in config.json. Alternatively, objective IDs can be given by paths. A path uses standard dot and array notation. The path is relative to the global Adapt object. An example use of paths could be localisation; where the localised identifiers are stored with the associated JSON (e.g. contentObjects.json).

Example objective ID paths

Prefix with @@ to specify a path and use dot and array notation. All paths are relative to the global Adapt object. For example:

@@course._objectives.objective1._id
@@course._objectives[0]._id
@@contentObjects._byAdaptID[co-05][0]._objectiveId

Objective states

On first run of a course an objective can be optionally initialised with the state not attempted. Specify whether this should happen with the property _initialiseWithNotAttempted. How the objective state changes depends on the type of objective: for completion-based objectives the state will change as the content models are completed. The state of event-based objectives is controlled externally; typically this will be from a custom plugin. When an objective enters a new state it can be locked into this state to prevent future changes. Such states are described as immutable. By default the completed state is immutable. Specify which states are immutable by using the _immutableStates property.

Notes

Storage of interactions by the offline API was removed by this change. To allow objectives (and interactions) to be stored by the offline API for testing purposes there are two new configuration options in spoor: _debugInteractions and _debugObjectives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.