More tests and fixes

This commit is contained in:
Jonathan Putney
2019-11-14 16:07:42 -05:00
parent caa5977a4b
commit 929176fb3e
14 changed files with 385 additions and 238 deletions

View File

@@ -30,8 +30,8 @@ export default class Scorm2004API extends BaseAPI {
constructor() {
super(scorm2004_error_codes);
this.cmi = new CMI(this);
this.adl = new ADL(this);
this.cmi = new CMI();
this.adl = new ADL();
// Rename functions to match 2004 Spec and expose to modules
this.Initialize = this.lmsInitialize;
@@ -420,17 +420,4 @@ export default class Scorm2004API extends BaseAPI {
this.cmi = newAPI.cmi;
this.adl = newAPI.adl;
}
/**
* Adds the current session time to the existing total time.
*
* @return {string} ISO8601 Duration
*/
getCurrentTotalTime() {
const totalTime = this.cmi.total_time;
const sessionTime = this.cmi.session_time;
return Util.addTwoDurations(totalTime, sessionTime,
scorm2004_regex.CMITimespan);
}
}