diff --git a/scripts/h5p-column.js b/scripts/h5p-column.js index 0e889a0..c4ecc77 100644 --- a/scripts/h5p-column.js +++ b/scripts/h5p-column.js @@ -66,14 +66,19 @@ H5P.Column = (function (EventDispatcher) { * * @private * @param {number} taskIndex + * @param {string} library * @return {function} xAPI event handler */ - var trackScoring = function (taskIndex) { + var trackScoring = function (taskIndex, library) { return function (event) { if (event.getScore() === null) { return; // Skip, not relevant } + if (library === 'H5P.SingleChoiceSet' && event.getVerb() === 'answered') { + return; // Ignore answered event + } + if (tasksResultEvent[taskIndex] === undefined) { // Update number of completed tasks numTasksCompleted++; @@ -127,7 +132,7 @@ H5P.Column = (function (EventDispatcher) { if (Column.isTask(instance)) { // Tasks requires completion - instance.on('xAPI', trackScoring(numTasks)); + instance.on('xAPI', trackScoring(numTasks, library)); numTasks++; }