SCORM 2004 cmi.interactions.n.learner_response was never being set
This commit is contained in:
4
dist/scorm-again.js
vendored
4
dist/scorm-again.js
vendored
File diff suppressed because one or more lines are too long
2
dist/scorm-again.js.map
vendored
2
dist/scorm-again.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/scorm-again.min.js
vendored
2
dist/scorm-again.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -936,6 +936,8 @@ export class CMIInteractionsObject extends BaseCMI {
|
|||||||
} else {
|
} else {
|
||||||
throw new ValidationError(scorm2004_error_codes.GENERAL_SET_FAILURE);
|
throw new ValidationError(scorm2004_error_codes.GENERAL_SET_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.#learner_response = learner_response;
|
||||||
} else {
|
} else {
|
||||||
throw new ValidationError(scorm2004_error_codes.TYPE_MISMATCH);
|
throw new ValidationError(scorm2004_error_codes.TYPE_MISMATCH);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,6 +341,15 @@ describe('SCORM 2004 API Tests', () => {
|
|||||||
expect(
|
expect(
|
||||||
String(scorm2004API.lmsGetLastError())
|
String(scorm2004API.lmsGetLastError())
|
||||||
).to.equal(String(0));
|
).to.equal(String(0));
|
||||||
|
expect(
|
||||||
|
scorm2004API.getCMIValue('cmi.interactions.0.id')
|
||||||
|
).to.equal('Scene1_Slide3_MultiChoice_0_0');
|
||||||
|
expect(
|
||||||
|
scorm2004API.getCMIValue('cmi.interactions.0.type')
|
||||||
|
).to.equal('choice');
|
||||||
|
expect(
|
||||||
|
scorm2004API.getCMIValue('cmi.interactions.0.learner_response')
|
||||||
|
).to.equal('VP_on-call_or_President');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user