fix scorm iqpf with double initialize

This commit is contained in:
2024-09-30 15:31:45 -04:00
parent b9d58c33e7
commit 3a8ff2db5a
13 changed files with 44 additions and 78 deletions
+6 -13
View File
@@ -726,21 +726,14 @@ var BaseAPI = /*#__PURE__*/function () {
_createClass(BaseAPI, [{
key: "initialize",
value: function initialize(callbackName, initializeMessage, terminationMessage) {
var returnValue = global_constants.SCORM_FALSE;
if (this.isTerminated()) {
this.throwSCORMError(_classPrivateFieldGet(this, _error_codes).TERMINATED, terminationMessage);
} else {
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
var returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
this.apiLog(callbackName, null, 'returned: ' + returnValue, global_constants.LOG_LEVEL_INFO);
this.clearSCORMError(returnValue);
return returnValue;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -13
View File
@@ -726,21 +726,14 @@ var BaseAPI = /*#__PURE__*/function () {
_createClass(BaseAPI, [{
key: "initialize",
value: function initialize(callbackName, initializeMessage, terminationMessage) {
var returnValue = global_constants.SCORM_FALSE;
if (this.isTerminated()) {
this.throwSCORMError(_classPrivateFieldGet(this, _error_codes).TERMINATED, terminationMessage);
} else {
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
var returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
this.apiLog(callbackName, null, 'returned: ' + returnValue, global_constants.LOG_LEVEL_INFO);
this.clearSCORMError(returnValue);
return returnValue;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -13
View File
@@ -601,21 +601,14 @@ var BaseAPI = /*#__PURE__*/function () {
_createClass(BaseAPI, [{
key: "initialize",
value: function initialize(callbackName, initializeMessage, terminationMessage) {
var returnValue = global_constants.SCORM_FALSE;
if (this.isTerminated()) {
this.throwSCORMError(_classPrivateFieldGet(this, _error_codes).TERMINATED, terminationMessage);
} else {
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
var returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
this.apiLog(callbackName, null, 'returned: ' + returnValue, global_constants.LOG_LEVEL_INFO);
this.clearSCORMError(returnValue);
return returnValue;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -13
View File
@@ -601,21 +601,14 @@ var BaseAPI = /*#__PURE__*/function () {
_createClass(BaseAPI, [{
key: "initialize",
value: function initialize(callbackName, initializeMessage, terminationMessage) {
var returnValue = global_constants.SCORM_FALSE;
if (this.isTerminated()) {
this.throwSCORMError(_classPrivateFieldGet(this, _error_codes).TERMINATED, terminationMessage);
} else {
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
var returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
this.apiLog(callbackName, null, 'returned: ' + returnValue, global_constants.LOG_LEVEL_INFO);
this.clearSCORMError(returnValue);
return returnValue;
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -6
View File
File diff suppressed because one or more lines are too long
+7 -13
View File
@@ -111,21 +111,15 @@ export default class BaseAPI {
callbackName: String,
initializeMessage?: String,
terminationMessage?: String) {
let returnValue = global_constants.SCORM_FALSE;
if (this.isTerminated()) {
this.throwSCORMError(this.#error_codes.TERMINATED, terminationMessage);
} else {
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
if (this.selfReportSessionTime) {
this.cmi.setStartTime();
}
this.currentState = global_constants.STATE_INITIALIZED;
this.lastErrorCode = 0;
let returnValue = global_constants.SCORM_TRUE;
this.processListeners(callbackName);
this.apiLog(callbackName, null, 'returned: ' + returnValue,
global_constants.LOG_LEVEL_INFO);
this.clearSCORMError(returnValue);