Fixing build
This commit is contained in:
@@ -473,6 +473,10 @@ export default class Scorm2004API extends BaseAPI {
|
|||||||
renderCommitCMI(terminateCommit: boolean) {
|
renderCommitCMI(terminateCommit: boolean) {
|
||||||
const cmiExport = this.renderCMIToJSONObject();
|
const cmiExport = this.renderCMIToJSONObject();
|
||||||
|
|
||||||
|
if (terminateCommit) {
|
||||||
|
cmiExport.cmi.total_time = this.cmi.getCurrentTotalTime();
|
||||||
|
}
|
||||||
|
|
||||||
const result = [];
|
const result = [];
|
||||||
const flattened = Utilities.flatten(cmiExport);
|
const flattened = Utilities.flatten(cmiExport);
|
||||||
switch (this.settings.dataCommitFormat) {
|
switch (this.settings.dataCommitFormat) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {describe, it} from 'mocha';
|
|||||||
import Scorm12API from '../src/Scorm12API';
|
import Scorm12API from '../src/Scorm12API';
|
||||||
import * as h from './api_helpers';
|
import * as h from './api_helpers';
|
||||||
import {scorm12_error_codes} from '../src/constants/error_codes';
|
import {scorm12_error_codes} from '../src/constants/error_codes';
|
||||||
import {scorm12_values} from '../src/constants/field_values';
|
import {scorm12_values} from './field_values';
|
||||||
|
|
||||||
const api = (settings = {}) => {
|
const api = (settings = {}) => {
|
||||||
const API = new Scorm12API(settings);
|
const API = new Scorm12API(settings);
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ describe('AICC CMI Tests', () => {
|
|||||||
).
|
).
|
||||||
to.
|
to.
|
||||||
equal(
|
equal(
|
||||||
'{"suspend_data":"","launch_data":"","comments":"","comments_from_lms":"","core":{"student_id":"","student_name":"","lesson_location":"","credit":"","lesson_status":"not attempted","entry":"","total_time":"00:00:00","lesson_mode":"normal","exit":"","session_time":"00:00:00","score":{"raw":"","min":"","max":"100"}},"objectives":{"0":{"id":"","status":"","score":{"raw":"","min":"","max":"100"}}},"student_data":{"mastery_score":"","max_time_allowed":"","time_limit_action":"","tries":{"0":{"status":"","time":"","score":{"raw":"","min":"","max":"100"}}}},"student_preference":{"audio":"","language":"","speed":"","text":""},"interactions":{"0":{"id":"","time":"","type":"","weighting":"","student_response":"","result":"","latency":"","objectives":{},"correct_responses":{}}},"evaluation":{"comments":{"0":{"content":"","location":"","time":""}}}}');
|
'{"suspend_data":"","launch_data":"","comments":"","comments_from_lms":"","core":{"student_id":"","student_name":"","lesson_location":"","credit":"","lesson_status":"not attempted","entry":"","lesson_mode":"normal","exit":"","session_time":"00:00:00","score":{"raw":"","min":"","max":"100"}},"objectives":{"0":{"id":"","status":"","score":{"raw":"","min":"","max":"100"}}},"student_data":{"mastery_score":"","max_time_allowed":"","time_limit_action":"","tries":{"0":{"status":"","time":"","score":{"raw":"","min":"","max":"100"}}}},"student_preference":{"audio":"","language":"","speed":"","text":""},"interactions":{"0":{"id":"","time":"","type":"","weighting":"","student_response":"","result":"","latency":"","objectives":{},"correct_responses":{}}},"evaluation":{"comments":{"0":{"content":"","location":"","time":""}}}}');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user