Skip to content

Commit

Permalink
Merge branch 'master' into json-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgreenfield committed May 14, 2021
2 parents 0884d04 + be723dc commit 2fe6910
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Which, in the above example, indicates that the learner only completed the block
Currently (officially) only supports SCORM 1.2

----------------------------
**Version number:** 3.8.0 <a href="https://community.adaptlearning.org/" target="_blank"><img src="https://github.com/adaptlearning/documentation/blob/master/04_wiki_assets/plug-ins/images/adapt-logo-mrgn-lft.jpg" alt="adapt learning logo" align="right"></a>
**Version number:** 3.8.1 <a href="https://community.adaptlearning.org/" target="_blank"><img src="https://github.com/adaptlearning/documentation/blob/master/04_wiki_assets/plug-ins/images/adapt-logo-mrgn-lft.jpg" alt="adapt learning logo" align="right"></a>
**Framework versions:** 5.5+
**Author / maintainer:** Adapt Core Team with [contributors](https://github.com/adaptlearning/adapt-contrib-spoor/graphs/contributors)
**Accessibility support:** n/a
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapt-contrib-spoor",
"version": "3.9.0-beta.1",
"version": "3.8.1",
"framework": ">=5.5",
"homepage": "https://github.com/adaptlearning/adapt-contrib-spoor",
"issues": "https://github.com/adaptlearning/adapt_framework/issues/new",
Expand Down
6 changes: 5 additions & 1 deletion js/adapt-stateful-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,13 @@ define([
}
const data = SCORMSuspendData.deserialize(suspendData.q);
const max = Math.max(...data.map(item => item[0][0]));
const shouldStoreResponses = (data[0].length === 3);
const completionString = data.reduce((markers, item) => {
const trackingId = item[0][0];
const mark = item[2][1][0] ? '1' : '0';
const isComplete = shouldStoreResponses ?
item[2][1][0] :
item[1][0];
const mark = isComplete ? '1' : '0';
markers[trackingId] = (markers[trackingId] === '-' || markers[trackingId] === '1') ?
mark :
'0';
Expand Down
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "adapt-contrib-spoor",
"version": "3.8.0",
"framework": ">=5.5",
"homepage": "https://github.com/adaptlearning/adapt-contrib-spoor",
"issues": "https://github.com/adaptlearning/adapt_framework/issues/new",
"extension" : "spoor",
"displayName" : "Spoor",
"description": "An extension which allows basic SCORM tracking",
"main": "/js/adapt-contrib-spoor.js",
"keywords": [
"adapt-plugin",
"adapt-extension"
],
"license": "GPL-3.0",
"targetAttribute": "_spoor"
}

0 comments on commit 2fe6910

Please sign in to comment.