Skip to content

Commit

Permalink
Issue 2537 Setting context for the handleError call (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
cahirodoherty-learningpool authored and moloko committed Oct 4, 2019
1 parent 422f61c commit b2af716
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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.3.0",
"version": "3.3.1",
"framework": ">=3.5.0",
"homepage": "https://github.com/adaptlearning/adapt-contrib-spoor",
"issues": "https://github.com/adaptlearning/adapt_framework/issues/new",
Expand Down
4 changes: 3 additions & 1 deletion js/scorm/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,8 @@ define ([

response = response.split(/,|#/);

var self = this;

if (responseType == 'choice') {
response = response.map(checkIdentifier);
} else {
Expand All @@ -713,7 +715,7 @@ define ([
i = parseInt(r);

if (isNaN(i) || i < 10 || i > 35) {
this.handleError('Numeric choice/matching response elements must use a value from 0 to 35 in SCORM 1.2');
self.handleError('Numeric choice/matching response elements must use a value from 0 to 35 in SCORM 1.2');
}

return Number(i).toString(36); // 10 maps to 'a', 11 maps to 'b', ..., 35 maps to 'z'
Expand Down

0 comments on commit b2af716

Please sign in to comment.