Skip to content

Commit

Permalink
Fix: Check LMS supports cmi.interactions._count (fixes #294) (#295)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Steven <[email protected]>
  • Loading branch information
paulstevendev and paul-mediakitchen authored Nov 15, 2023
1 parent e19e729 commit d73c7e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/adapt-stateful-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export default class StatefulSession extends Backbone.Controller {

onQuestionRecordInteraction(questionView) {
if (!this._shouldRecordInteractions) return;
if (!this.scorm.isSupported('cmi.interactions._count')) return;
// View functions are deprecated: getResponseType, getResponse, isCorrect, getLatency
const questionModel = questionView.model;
const responseType = (questionModel.getResponseType ? questionModel.getResponseType() : questionView.getResponseType());
Expand Down

0 comments on commit d73c7e4

Please sign in to comment.