fix scorm iqpf with double initialize
This commit is contained in:
19
dist/aicc.js
vendored
19
dist/aicc.js
vendored
@@ -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;
|
||||||
|
|||||||
2
dist/aicc.js.map
vendored
2
dist/aicc.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/aicc.min.js
vendored
2
dist/aicc.min.js
vendored
File diff suppressed because one or more lines are too long
19
dist/scorm-again.js
vendored
19
dist/scorm-again.js
vendored
@@ -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;
|
||||||
|
|||||||
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
19
dist/scorm12.js
vendored
19
dist/scorm12.js
vendored
@@ -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;
|
||||||
|
|||||||
2
dist/scorm12.js.map
vendored
2
dist/scorm12.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/scorm12.min.js
vendored
2
dist/scorm12.min.js
vendored
File diff suppressed because one or more lines are too long
19
dist/scorm2004.js
vendored
19
dist/scorm2004.js
vendored
@@ -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;
|
||||||
|
|||||||
2
dist/scorm2004.js.map
vendored
2
dist/scorm2004.js.map
vendored
File diff suppressed because one or more lines are too long
12
dist/scorm2004.min.js
vendored
12
dist/scorm2004.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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