fix scorm iqpf with double initialize
This commit is contained in:
Vendored
+6
-13
@@ -726,21 +726,14 @@ var BaseAPI = /*#__PURE__*/function () {
|
|||||||
_createClass(BaseAPI, [{
|
_createClass(BaseAPI, [{
|
||||||
key: "initialize",
|
key: "initialize",
|
||||||
value: function initialize(callbackName, initializeMessage, terminationMessage) {
|
value: function initialize(callbackName, initializeMessage, terminationMessage) {
|
||||||
var returnValue = global_constants.SCORM_FALSE;
|
if (this.selfReportSessionTime) {
|
||||||
|
this.cmi.setStartTime();
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.apiLog(callbackName, null, 'returned: ' + returnValue, global_constants.LOG_LEVEL_INFO);
|
||||||
this.clearSCORMError(returnValue);
|
this.clearSCORMError(returnValue);
|
||||||
return returnValue;
|
return returnValue;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+6
-13
@@ -726,21 +726,14 @@ var BaseAPI = /*#__PURE__*/function () {
|
|||||||
_createClass(BaseAPI, [{
|
_createClass(BaseAPI, [{
|
||||||
key: "initialize",
|
key: "initialize",
|
||||||
value: function initialize(callbackName, initializeMessage, terminationMessage) {
|
value: function initialize(callbackName, initializeMessage, terminationMessage) {
|
||||||
var returnValue = global_constants.SCORM_FALSE;
|
if (this.selfReportSessionTime) {
|
||||||
|
this.cmi.setStartTime();
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.apiLog(callbackName, null, 'returned: ' + returnValue, global_constants.LOG_LEVEL_INFO);
|
||||||
this.clearSCORMError(returnValue);
|
this.clearSCORMError(returnValue);
|
||||||
return returnValue;
|
return returnValue;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+6
-13
@@ -601,21 +601,14 @@ var BaseAPI = /*#__PURE__*/function () {
|
|||||||
_createClass(BaseAPI, [{
|
_createClass(BaseAPI, [{
|
||||||
key: "initialize",
|
key: "initialize",
|
||||||
value: function initialize(callbackName, initializeMessage, terminationMessage) {
|
value: function initialize(callbackName, initializeMessage, terminationMessage) {
|
||||||
var returnValue = global_constants.SCORM_FALSE;
|
if (this.selfReportSessionTime) {
|
||||||
|
this.cmi.setStartTime();
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.apiLog(callbackName, null, 'returned: ' + returnValue, global_constants.LOG_LEVEL_INFO);
|
||||||
this.clearSCORMError(returnValue);
|
this.clearSCORMError(returnValue);
|
||||||
return returnValue;
|
return returnValue;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+6
-13
@@ -601,21 +601,14 @@ var BaseAPI = /*#__PURE__*/function () {
|
|||||||
_createClass(BaseAPI, [{
|
_createClass(BaseAPI, [{
|
||||||
key: "initialize",
|
key: "initialize",
|
||||||
value: function initialize(callbackName, initializeMessage, terminationMessage) {
|
value: function initialize(callbackName, initializeMessage, terminationMessage) {
|
||||||
var returnValue = global_constants.SCORM_FALSE;
|
if (this.selfReportSessionTime) {
|
||||||
|
this.cmi.setStartTime();
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.apiLog(callbackName, null, 'returned: ' + returnValue, global_constants.LOG_LEVEL_INFO);
|
||||||
this.clearSCORMError(returnValue);
|
this.clearSCORMError(returnValue);
|
||||||
return returnValue;
|
return returnValue;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
+7
-13
@@ -111,21 +111,15 @@ export default class BaseAPI {
|
|||||||
callbackName: String,
|
callbackName: String,
|
||||||
initializeMessage?: String,
|
initializeMessage?: String,
|
||||||
terminationMessage?: String) {
|
terminationMessage?: String) {
|
||||||
let returnValue = global_constants.SCORM_FALSE;
|
if (this.selfReportSessionTime) {
|
||||||
|
this.cmi.setStartTime();
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.currentState = global_constants.STATE_INITIALIZED;
|
||||||
|
this.lastErrorCode = 0;
|
||||||
|
let returnValue = global_constants.SCORM_TRUE;
|
||||||
|
this.processListeners(callbackName);
|
||||||
|
|
||||||
this.apiLog(callbackName, null, 'returned: ' + returnValue,
|
this.apiLog(callbackName, null, 'returned: ' + returnValue,
|
||||||
global_constants.LOG_LEVEL_INFO);
|
global_constants.LOG_LEVEL_INFO);
|
||||||
this.clearSCORMError(returnValue);
|
this.clearSCORMError(returnValue);
|
||||||
|
|||||||
Reference in New Issue
Block a user