resolve #283
This commit is contained in:
@@ -297,18 +297,15 @@ export default class Scorm12API extends BaseAPI {
|
|||||||
const commitObject = this.renderCommitCMI(terminateCommit ||
|
const commitObject = this.renderCommitCMI(terminateCommit ||
|
||||||
this.settings.alwaysSendTotalTime);
|
this.settings.alwaysSendTotalTime);
|
||||||
|
|
||||||
if (this.settings.lmsCommitUrl) {
|
if (this.apiLogLevel === global_constants.LOG_LEVEL_DEBUG) {
|
||||||
if (this.apiLogLevel === global_constants.LOG_LEVEL_DEBUG) {
|
console.debug('Commit (terminated: ' +
|
||||||
console.debug('Commit (terminated: ' +
|
|
||||||
(terminateCommit ? 'yes' : 'no') + '): ');
|
(terminateCommit ? 'yes' : 'no') + '): ');
|
||||||
console.debug(commitObject);
|
console.debug(commitObject);
|
||||||
}
|
}
|
||||||
|
if (this.settings.lmsCommitUrl) {
|
||||||
return this.processHttpRequest(this.settings.lmsCommitUrl, commitObject,
|
return this.processHttpRequest(this.settings.lmsCommitUrl, commitObject,
|
||||||
terminateCommit);
|
terminateCommit);
|
||||||
} else {
|
} else {
|
||||||
console.log('Commit (terminated: ' +
|
|
||||||
(terminateCommit ? 'yes' : 'no') + '): ');
|
|
||||||
console.log(commitObject);
|
|
||||||
return global_constants.SCORM_TRUE;
|
return global_constants.SCORM_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -548,12 +548,12 @@ export default class Scorm2004API extends BaseAPI {
|
|||||||
const commitObject = this.renderCommitCMI(terminateCommit ||
|
const commitObject = this.renderCommitCMI(terminateCommit ||
|
||||||
this.settings.alwaysSendTotalTime);
|
this.settings.alwaysSendTotalTime);
|
||||||
|
|
||||||
if (this.settings.lmsCommitUrl) {
|
if (this.apiLogLevel === global_constants.LOG_LEVEL_DEBUG) {
|
||||||
if (this.apiLogLevel === global_constants.LOG_LEVEL_DEBUG) {
|
console.debug('Commit (terminated: ' +
|
||||||
console.debug('Commit (terminated: ' +
|
|
||||||
(terminateCommit ? 'yes' : 'no') + '): ');
|
(terminateCommit ? 'yes' : 'no') + '): ');
|
||||||
console.debug(commitObject);
|
console.debug(commitObject);
|
||||||
}
|
}
|
||||||
|
if (this.settings.lmsCommitUrl) {
|
||||||
const result = this.processHttpRequest(this.settings.lmsCommitUrl,
|
const result = this.processHttpRequest(this.settings.lmsCommitUrl,
|
||||||
commitObject, terminateCommit);
|
commitObject, terminateCommit);
|
||||||
|
|
||||||
@@ -566,9 +566,6 @@ export default class Scorm2004API extends BaseAPI {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
console.log('Commit (terminated: ' +
|
|
||||||
(terminateCommit ? 'yes' : 'no') + '): ');
|
|
||||||
console.log(commitObject);
|
|
||||||
return global_constants.SCORM_TRUE;
|
return global_constants.SCORM_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user