scorm-again 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aicc.js +648 -485
- package/dist/aicc.js.map +1 -1
- package/dist/aicc.min.js +1 -1
- package/dist/aicc.min.js.map +1 -1
- package/dist/esm/aicc.js +664 -488
- package/dist/esm/aicc.js.map +1 -1
- package/dist/esm/aicc.min.js +1 -1
- package/dist/esm/aicc.min.js.map +1 -1
- package/dist/esm/scorm-again.js +1111 -729
- package/dist/esm/scorm-again.js.map +1 -1
- package/dist/esm/scorm-again.min.js +1 -1
- package/dist/esm/scorm-again.min.js.map +1 -1
- package/dist/esm/scorm12.js +506 -393
- package/dist/esm/scorm12.js.map +1 -1
- package/dist/esm/scorm12.min.js +1 -1
- package/dist/esm/scorm12.min.js.map +1 -1
- package/dist/esm/scorm2004.js +672 -451
- package/dist/esm/scorm2004.js.map +1 -1
- package/dist/esm/scorm2004.min.js +1 -1
- package/dist/esm/scorm2004.min.js.map +1 -1
- package/dist/scorm-again.js +1087 -717
- package/dist/scorm-again.js.map +1 -1
- package/dist/scorm-again.min.js +1 -1
- package/dist/scorm-again.min.js.map +1 -1
- package/dist/scorm12.js +493 -392
- package/dist/scorm12.js.map +1 -1
- package/dist/scorm12.min.js +1 -1
- package/dist/scorm12.min.js.map +1 -1
- package/dist/scorm2004.js +658 -450
- package/dist/scorm2004.js.map +1 -1
- package/dist/scorm2004.min.js +1 -1
- package/dist/scorm2004.min.js.map +1 -1
- package/package.json +14 -14
- package/src/AICC.ts +3 -0
- package/src/BaseAPI.ts +33 -30
- package/src/Scorm12API.ts +14 -14
- package/src/Scorm2004API.ts +99 -33
- package/src/cmi/aicc/attempts.ts +22 -12
- package/src/cmi/aicc/cmi.ts +2 -2
- package/src/cmi/aicc/core.ts +44 -26
- package/src/cmi/aicc/evaluation.ts +31 -12
- package/src/cmi/aicc/paths.ts +29 -15
- package/src/cmi/aicc/student_data.ts +14 -5
- package/src/cmi/aicc/student_demographics.ts +31 -24
- package/src/cmi/aicc/student_preferences.ts +11 -11
- package/src/cmi/aicc/tries.ts +24 -14
- package/src/cmi/aicc/validation.ts +3 -4
- package/src/cmi/common/array.ts +17 -5
- package/src/cmi/common/base_cmi.ts +3 -1
- package/src/cmi/common/score.ts +16 -13
- package/src/cmi/scorm12/cmi.ts +25 -10
- package/src/cmi/scorm12/interactions.ts +62 -28
- package/src/cmi/scorm12/nav.ts +13 -5
- package/src/cmi/scorm12/objectives.ts +28 -18
- package/src/cmi/scorm12/student_data.ts +15 -8
- package/src/cmi/scorm12/student_preference.ts +20 -13
- package/src/cmi/scorm12/validation.ts +7 -7
- package/src/cmi/scorm2004/adl.ts +141 -25
- package/src/cmi/scorm2004/cmi.ts +50 -55
- package/src/cmi/scorm2004/comments.ts +21 -20
- package/src/cmi/scorm2004/interactions.ts +73 -32
- package/src/cmi/scorm2004/learner_preference.ts +20 -13
- package/src/cmi/scorm2004/objectives.ts +41 -16
- package/src/cmi/scorm2004/score.ts +22 -11
- package/src/cmi/scorm2004/validation.ts +4 -4
- package/src/constants/api_constants.ts +8 -19
- package/src/constants/default_settings.ts +6 -5
- package/src/constants/error_codes.ts +5 -12
- package/src/constants/regex.ts +4 -10
- package/src/constants/response_constants.ts +1 -2
- package/src/exceptions/aicc_exceptions.ts +29 -0
- package/src/exceptions/scorm12_exceptions.ts +29 -0
- package/src/exceptions/scorm2004_exceptions.ts +29 -0
- package/src/exceptions.ts +0 -81
- package/src/types/api_types.ts +3 -2
- package/test/AICC.spec.ts +114 -43
- package/test/Scorm12API.spec.ts +37 -39
- package/test/Scorm2004API.spec.ts +165 -80
- package/test/cmi/aicc_cmi.spec.ts +6 -9
- package/test/cmi/scorm12_cmi.spec.ts +8 -8
- package/test/cmi/scorm2004_cmi.spec.ts +8 -9
- package/test/exceptions.spec.ts +11 -9
- package/test/types/api_types.spec.ts +3 -3
- package/test/utilities.spec.ts +1 -4
- package/webpack.config.js +4 -0
package/dist/esm/aicc.js
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
/***/ 429:
|
|
4
4
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5
5
|
|
|
6
|
+
// ESM COMPAT FLAG
|
|
7
|
+
__webpack_require__.r(__webpack_exports__);
|
|
6
8
|
|
|
7
9
|
// EXPORTS
|
|
8
10
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
|
-
|
|
11
|
+
"default": function() { return /* binding */ src_BaseAPI; }
|
|
10
12
|
});
|
|
11
13
|
|
|
12
14
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs
|
|
@@ -15,8 +17,6 @@ var tslib_es6 = __webpack_require__(635);
|
|
|
15
17
|
var array = __webpack_require__(589);
|
|
16
18
|
// EXTERNAL MODULE: ./src/exceptions.ts
|
|
17
19
|
var exceptions = __webpack_require__(784);
|
|
18
|
-
// EXTERNAL MODULE: ./src/constants/error_codes.ts
|
|
19
|
-
var error_codes = __webpack_require__(797);
|
|
20
20
|
// EXTERNAL MODULE: ./src/constants/api_constants.ts
|
|
21
21
|
var api_constants = __webpack_require__(340);
|
|
22
22
|
// EXTERNAL MODULE: ./src/utilities.ts
|
|
@@ -36,7 +36,7 @@ var DefaultSettings = {
|
|
|
36
36
|
dataCommitFormat: "json",
|
|
37
37
|
commitRequestDataType: "application/json;charset=UTF-8",
|
|
38
38
|
autoProgress: false,
|
|
39
|
-
logLevel: enums
|
|
39
|
+
logLevel: enums.LogLevelEnum.ERROR,
|
|
40
40
|
selfReportSessionTime: false,
|
|
41
41
|
alwaysSendTotalTime: false,
|
|
42
42
|
renderCommonCommitFields: false,
|
|
@@ -45,9 +45,9 @@ var DefaultSettings = {
|
|
|
45
45
|
xhrWithCredentials: false,
|
|
46
46
|
fetchMode: "cors",
|
|
47
47
|
responseHandler: function (response) {
|
|
48
|
-
return (0,tslib_es6
|
|
48
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
49
49
|
var responseText, httpResult;
|
|
50
|
-
return (0,tslib_es6
|
|
50
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
51
51
|
switch (_a.label) {
|
|
52
52
|
case 0:
|
|
53
53
|
if (!(typeof response !== "undefined")) return [3, 2];
|
|
@@ -62,13 +62,13 @@ var DefaultSettings = {
|
|
|
62
62
|
!{}.hasOwnProperty.call(httpResult, "result")) {
|
|
63
63
|
if (response.status === 200) {
|
|
64
64
|
return [2, {
|
|
65
|
-
result: api_constants
|
|
65
|
+
result: api_constants.global_constants.SCORM_TRUE,
|
|
66
66
|
errorCode: 0,
|
|
67
67
|
}];
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
70
|
return [2, {
|
|
71
|
-
result: api_constants
|
|
71
|
+
result: api_constants.global_constants.SCORM_FALSE,
|
|
72
72
|
errorCode: 101,
|
|
73
73
|
}];
|
|
74
74
|
}
|
|
@@ -78,14 +78,14 @@ var DefaultSettings = {
|
|
|
78
78
|
result: httpResult.result,
|
|
79
79
|
errorCode: httpResult.errorCode
|
|
80
80
|
? httpResult.errorCode
|
|
81
|
-
: httpResult.result === api_constants
|
|
81
|
+
: httpResult.result === api_constants.global_constants.SCORM_TRUE
|
|
82
82
|
? 0
|
|
83
83
|
: 101,
|
|
84
84
|
}];
|
|
85
85
|
}
|
|
86
86
|
_a.label = 2;
|
|
87
87
|
case 2: return [2, {
|
|
88
|
-
result: api_constants
|
|
88
|
+
result: api_constants.global_constants.SCORM_FALSE,
|
|
89
89
|
errorCode: 101,
|
|
90
90
|
}];
|
|
91
91
|
}
|
|
@@ -100,25 +100,25 @@ var DefaultSettings = {
|
|
|
100
100
|
case "4":
|
|
101
101
|
case 4:
|
|
102
102
|
case "ERROR":
|
|
103
|
-
case enums
|
|
103
|
+
case enums.LogLevelEnum.ERROR:
|
|
104
104
|
console.error(logMessage);
|
|
105
105
|
break;
|
|
106
106
|
case "3":
|
|
107
107
|
case 3:
|
|
108
108
|
case "WARN":
|
|
109
|
-
case enums
|
|
109
|
+
case enums.LogLevelEnum.WARN:
|
|
110
110
|
console.warn(logMessage);
|
|
111
111
|
break;
|
|
112
112
|
case "2":
|
|
113
113
|
case 2:
|
|
114
114
|
case "INFO":
|
|
115
|
-
case enums
|
|
115
|
+
case enums.LogLevelEnum.INFO:
|
|
116
116
|
console.info(logMessage);
|
|
117
117
|
break;
|
|
118
118
|
case "1":
|
|
119
119
|
case 1:
|
|
120
120
|
case "DEBUG":
|
|
121
|
-
case enums
|
|
121
|
+
case enums.LogLevelEnum.DEBUG:
|
|
122
122
|
if (console.debug) {
|
|
123
123
|
console.debug(logMessage);
|
|
124
124
|
}
|
|
@@ -130,6 +130,7 @@ var DefaultSettings = {
|
|
|
130
130
|
},
|
|
131
131
|
scoItemIds: [],
|
|
132
132
|
scoItemIdValidator: false,
|
|
133
|
+
globalObjectiveIds: [],
|
|
133
134
|
};
|
|
134
135
|
|
|
135
136
|
;// ./src/helpers/scheduled_commit.ts
|
|
@@ -150,7 +151,7 @@ var ScheduledCommit = (function () {
|
|
|
150
151
|
ScheduledCommit.prototype.wrapper = function () {
|
|
151
152
|
var _this = this;
|
|
152
153
|
if (!this._cancelled) {
|
|
153
|
-
(function () { return (0,tslib_es6
|
|
154
|
+
(function () { return (0,tslib_es6.__awaiter)(_this, void 0, void 0, function () { return (0,tslib_es6.__generator)(this, function (_a) {
|
|
154
155
|
switch (_a.label) {
|
|
155
156
|
case 0: return [4, this._API.commit(this._callback)];
|
|
156
157
|
case 1: return [2, _a.sent()];
|
|
@@ -171,7 +172,6 @@ var ScheduledCommit = (function () {
|
|
|
171
172
|
|
|
172
173
|
|
|
173
174
|
|
|
174
|
-
|
|
175
175
|
var BaseAPI = (function () {
|
|
176
176
|
function BaseAPI(error_codes, settings) {
|
|
177
177
|
var _newTarget = this.constructor;
|
|
@@ -179,7 +179,7 @@ var BaseAPI = (function () {
|
|
|
179
179
|
if (_newTarget === BaseAPI) {
|
|
180
180
|
throw new TypeError("Cannot construct BaseAPI instances directly");
|
|
181
181
|
}
|
|
182
|
-
this.currentState = api_constants
|
|
182
|
+
this.currentState = api_constants.global_constants.STATE_NOT_INITIALIZED;
|
|
183
183
|
this.lastErrorCode = "0";
|
|
184
184
|
this.listenerArray = [];
|
|
185
185
|
this._error_codes = error_codes;
|
|
@@ -189,17 +189,20 @@ var BaseAPI = (function () {
|
|
|
189
189
|
this.apiLogLevel = this.settings.logLevel;
|
|
190
190
|
this.selfReportSessionTime = this.settings.selfReportSessionTime;
|
|
191
191
|
if (this.apiLogLevel === undefined) {
|
|
192
|
-
this.apiLogLevel = enums
|
|
192
|
+
this.apiLogLevel = enums.LogLevelEnum.NONE;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
BaseAPI.prototype.commonReset = function (settings) {
|
|
196
|
-
this.
|
|
197
|
-
this.
|
|
196
|
+
this.apiLog("reset", "Called", enums.LogLevelEnum.INFO);
|
|
197
|
+
this.settings = (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, this.settings), settings);
|
|
198
|
+
this.clearScheduledCommit();
|
|
199
|
+
this.currentState = api_constants.global_constants.STATE_NOT_INITIALIZED;
|
|
198
200
|
this.lastErrorCode = "0";
|
|
199
201
|
this.listenerArray = [];
|
|
202
|
+
this.startingData = undefined;
|
|
200
203
|
};
|
|
201
204
|
BaseAPI.prototype.initialize = function (callbackName, initializeMessage, terminationMessage) {
|
|
202
|
-
var returnValue = api_constants
|
|
205
|
+
var returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
203
206
|
if (this.isInitialized()) {
|
|
204
207
|
this.throwSCORMError(this._error_codes.INITIALIZED, initializeMessage);
|
|
205
208
|
}
|
|
@@ -210,17 +213,17 @@ var BaseAPI = (function () {
|
|
|
210
213
|
if (this.selfReportSessionTime) {
|
|
211
214
|
this.cmi.setStartTime();
|
|
212
215
|
}
|
|
213
|
-
this.currentState = api_constants
|
|
216
|
+
this.currentState = api_constants.global_constants.STATE_INITIALIZED;
|
|
214
217
|
this.lastErrorCode = "0";
|
|
215
|
-
returnValue = api_constants
|
|
218
|
+
returnValue = api_constants.global_constants.SCORM_TRUE;
|
|
216
219
|
this.processListeners(callbackName);
|
|
217
220
|
}
|
|
218
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
221
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
219
222
|
this.clearSCORMError(returnValue);
|
|
220
223
|
return returnValue;
|
|
221
224
|
};
|
|
222
225
|
BaseAPI.prototype.apiLog = function (functionName, logMessage, messageLevel, CMIElement) {
|
|
223
|
-
logMessage = (0,utilities
|
|
226
|
+
logMessage = (0,utilities.formatMessage)(functionName, logMessage, CMIElement);
|
|
224
227
|
if (messageLevel >= this.apiLogLevel) {
|
|
225
228
|
this.settings.onLogMessage(messageLevel, logMessage);
|
|
226
229
|
}
|
|
@@ -237,20 +240,20 @@ var BaseAPI = (function () {
|
|
|
237
240
|
return this._settings;
|
|
238
241
|
},
|
|
239
242
|
set: function (settings) {
|
|
240
|
-
this._settings = (0,tslib_es6
|
|
243
|
+
this._settings = (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, this._settings), settings);
|
|
241
244
|
},
|
|
242
245
|
enumerable: false,
|
|
243
246
|
configurable: true
|
|
244
247
|
});
|
|
245
248
|
BaseAPI.prototype.terminate = function (callbackName, checkTerminated) {
|
|
246
|
-
return (0,tslib_es6
|
|
249
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
247
250
|
var returnValue, result;
|
|
248
|
-
return (0,tslib_es6
|
|
251
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
249
252
|
switch (_a.label) {
|
|
250
253
|
case 0:
|
|
251
|
-
returnValue = api_constants
|
|
254
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
252
255
|
if (!this.checkState(checkTerminated, this._error_codes.TERMINATION_BEFORE_INIT, this._error_codes.MULTIPLE_TERMINATION)) return [3, 2];
|
|
253
|
-
this.currentState = api_constants
|
|
256
|
+
this.currentState = api_constants.global_constants.STATE_TERMINATED;
|
|
254
257
|
return [4, this.storeData(true)];
|
|
255
258
|
case 1:
|
|
256
259
|
result = _a.sent();
|
|
@@ -260,14 +263,14 @@ var BaseAPI = (function () {
|
|
|
260
263
|
returnValue =
|
|
261
264
|
typeof result !== "undefined" && result.result
|
|
262
265
|
? result.result
|
|
263
|
-
: api_constants
|
|
266
|
+
: api_constants.global_constants.SCORM_FALSE;
|
|
264
267
|
if (checkTerminated)
|
|
265
268
|
this.lastErrorCode = "0";
|
|
266
|
-
returnValue = api_constants
|
|
269
|
+
returnValue = api_constants.global_constants.SCORM_TRUE;
|
|
267
270
|
this.processListeners(callbackName);
|
|
268
271
|
_a.label = 2;
|
|
269
272
|
case 2:
|
|
270
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
273
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
271
274
|
this.clearSCORMError(returnValue);
|
|
272
275
|
return [2, returnValue];
|
|
273
276
|
}
|
|
@@ -287,7 +290,7 @@ var BaseAPI = (function () {
|
|
|
287
290
|
}
|
|
288
291
|
this.processListeners(callbackName, CMIElement);
|
|
289
292
|
}
|
|
290
|
-
this.apiLog(callbackName, ": returned: " + returnValue, enums
|
|
293
|
+
this.apiLog(callbackName, ": returned: " + returnValue, enums.LogLevelEnum.INFO, CMIElement);
|
|
291
294
|
if (returnValue === undefined) {
|
|
292
295
|
return "";
|
|
293
296
|
}
|
|
@@ -298,7 +301,7 @@ var BaseAPI = (function () {
|
|
|
298
301
|
if (value !== undefined) {
|
|
299
302
|
value = String(value);
|
|
300
303
|
}
|
|
301
|
-
var returnValue = api_constants
|
|
304
|
+
var returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
302
305
|
if (this.checkState(checkTerminated, this._error_codes.STORE_BEFORE_INIT, this._error_codes.STORE_AFTER_TERM)) {
|
|
303
306
|
if (checkTerminated)
|
|
304
307
|
this.lastErrorCode = "0";
|
|
@@ -311,26 +314,26 @@ var BaseAPI = (function () {
|
|
|
311
314
|
this.processListeners(callbackName, CMIElement, value);
|
|
312
315
|
}
|
|
313
316
|
if (returnValue === undefined) {
|
|
314
|
-
returnValue = api_constants
|
|
317
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
315
318
|
}
|
|
316
319
|
if (String(this.lastErrorCode) === "0") {
|
|
317
320
|
if (this.settings.autocommit) {
|
|
318
321
|
this.scheduleCommit(this.settings.autocommitSeconds * 1000, commitCallback);
|
|
319
322
|
}
|
|
320
323
|
}
|
|
321
|
-
this.apiLog(callbackName, ": " + value + ": result: " + returnValue, enums
|
|
324
|
+
this.apiLog(callbackName, ": " + value + ": result: " + returnValue, enums.LogLevelEnum.INFO, CMIElement);
|
|
322
325
|
this.clearSCORMError(returnValue);
|
|
323
326
|
return returnValue;
|
|
324
327
|
};
|
|
325
328
|
BaseAPI.prototype.commit = function (callbackName_1) {
|
|
326
|
-
return (0,tslib_es6
|
|
329
|
+
return (0,tslib_es6.__awaiter)(this, arguments, void 0, function (callbackName, checkTerminated) {
|
|
327
330
|
var returnValue, result;
|
|
328
331
|
if (checkTerminated === void 0) { checkTerminated = false; }
|
|
329
|
-
return (0,tslib_es6
|
|
332
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
330
333
|
switch (_a.label) {
|
|
331
334
|
case 0:
|
|
332
335
|
this.clearScheduledCommit();
|
|
333
|
-
returnValue = api_constants
|
|
336
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
334
337
|
if (!this.checkState(checkTerminated, this._error_codes.COMMIT_BEFORE_INIT, this._error_codes.COMMIT_AFTER_TERM)) return [3, 2];
|
|
335
338
|
return [4, this.storeData(false)];
|
|
336
339
|
case 1:
|
|
@@ -341,14 +344,14 @@ var BaseAPI = (function () {
|
|
|
341
344
|
returnValue =
|
|
342
345
|
typeof result !== "undefined" && result.result
|
|
343
346
|
? result.result
|
|
344
|
-
: api_constants
|
|
345
|
-
this.apiLog(callbackName, " Result: " + returnValue, enums
|
|
347
|
+
: api_constants.global_constants.SCORM_FALSE;
|
|
348
|
+
this.apiLog(callbackName, " Result: " + returnValue, enums.LogLevelEnum.DEBUG, "HttpRequest");
|
|
346
349
|
if (checkTerminated)
|
|
347
350
|
this.lastErrorCode = "0";
|
|
348
351
|
this.processListeners(callbackName);
|
|
349
352
|
_a.label = 2;
|
|
350
353
|
case 2:
|
|
351
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
354
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
352
355
|
this.clearSCORMError(returnValue);
|
|
353
356
|
return [2, returnValue];
|
|
354
357
|
}
|
|
@@ -358,7 +361,7 @@ var BaseAPI = (function () {
|
|
|
358
361
|
BaseAPI.prototype.getLastError = function (callbackName) {
|
|
359
362
|
var returnValue = String(this.lastErrorCode);
|
|
360
363
|
this.processListeners(callbackName);
|
|
361
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
364
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
362
365
|
return returnValue;
|
|
363
366
|
};
|
|
364
367
|
BaseAPI.prototype.getErrorString = function (callbackName, CMIErrorCode) {
|
|
@@ -367,7 +370,7 @@ var BaseAPI = (function () {
|
|
|
367
370
|
returnValue = this.getLmsErrorMessageDetails(CMIErrorCode);
|
|
368
371
|
this.processListeners(callbackName);
|
|
369
372
|
}
|
|
370
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
373
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
371
374
|
return returnValue;
|
|
372
375
|
};
|
|
373
376
|
BaseAPI.prototype.getDiagnostic = function (callbackName, CMIErrorCode) {
|
|
@@ -376,7 +379,7 @@ var BaseAPI = (function () {
|
|
|
376
379
|
returnValue = this.getLmsErrorMessageDetails(CMIErrorCode, true);
|
|
377
380
|
this.processListeners(callbackName);
|
|
378
381
|
}
|
|
379
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
382
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
380
383
|
return returnValue;
|
|
381
384
|
};
|
|
382
385
|
BaseAPI.prototype.checkState = function (checkTerminated, beforeInitError, afterTermError) {
|
|
@@ -402,11 +405,11 @@ var BaseAPI = (function () {
|
|
|
402
405
|
};
|
|
403
406
|
BaseAPI.prototype._commonSetCMIValue = function (methodName, scorm2004, CMIElement, value) {
|
|
404
407
|
if (!CMIElement || CMIElement === "") {
|
|
405
|
-
return api_constants
|
|
408
|
+
return api_constants.global_constants.SCORM_FALSE;
|
|
406
409
|
}
|
|
407
410
|
var structure = CMIElement.split(".");
|
|
408
411
|
var refObject = this;
|
|
409
|
-
var returnValue = api_constants
|
|
412
|
+
var returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
410
413
|
var foundFirstIndex = false;
|
|
411
414
|
var invalidErrorMessage = "The data model element passed to ".concat(methodName, " (").concat(CMIElement, ") is not a valid SCORM data model element.");
|
|
412
415
|
var invalidErrorCode = scorm2004
|
|
@@ -420,20 +423,20 @@ var BaseAPI = (function () {
|
|
|
420
423
|
this.throwSCORMError(this._error_codes.READ_ONLY_ELEMENT);
|
|
421
424
|
}
|
|
422
425
|
else {
|
|
423
|
-
refObject = (0,tslib_es6
|
|
426
|
+
refObject = (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, refObject), { attribute: value });
|
|
424
427
|
}
|
|
425
428
|
}
|
|
426
429
|
else if (!this._checkObjectHasProperty(refObject, attribute)) {
|
|
427
430
|
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
|
428
431
|
}
|
|
429
432
|
else {
|
|
430
|
-
if ((0,utilities
|
|
433
|
+
if ((0,utilities.stringMatches)(CMIElement, "\\.correct_responses\\.\\d+") &&
|
|
431
434
|
this.isInitialized()) {
|
|
432
435
|
this.validateCorrectResponse(CMIElement, value);
|
|
433
436
|
}
|
|
434
437
|
if (!scorm2004 || this.lastErrorCode === "0") {
|
|
435
438
|
refObject[attribute] = value;
|
|
436
|
-
returnValue = api_constants
|
|
439
|
+
returnValue = api_constants.global_constants.SCORM_TRUE;
|
|
437
440
|
}
|
|
438
441
|
}
|
|
439
442
|
}
|
|
@@ -443,7 +446,7 @@ var BaseAPI = (function () {
|
|
|
443
446
|
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
|
444
447
|
break;
|
|
445
448
|
}
|
|
446
|
-
if (refObject instanceof array
|
|
449
|
+
if (refObject instanceof array.CMIArray) {
|
|
447
450
|
var index = parseInt(structure[idx + 1], 10);
|
|
448
451
|
if (!isNaN(index)) {
|
|
449
452
|
var item = refObject.childArray[index];
|
|
@@ -469,8 +472,8 @@ var BaseAPI = (function () {
|
|
|
469
472
|
}
|
|
470
473
|
}
|
|
471
474
|
}
|
|
472
|
-
if (returnValue === api_constants
|
|
473
|
-
this.apiLog(methodName, "There was an error setting the value for: ".concat(CMIElement, ", value of: ").concat(value), enums
|
|
475
|
+
if (returnValue === api_constants.global_constants.SCORM_FALSE) {
|
|
476
|
+
this.apiLog(methodName, "There was an error setting the value for: ".concat(CMIElement, ", value of: ").concat(value), enums.LogLevelEnum.WARN);
|
|
474
477
|
}
|
|
475
478
|
return returnValue;
|
|
476
479
|
};
|
|
@@ -512,7 +515,7 @@ var BaseAPI = (function () {
|
|
|
512
515
|
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
|
513
516
|
break;
|
|
514
517
|
}
|
|
515
|
-
if (refObject instanceof array
|
|
518
|
+
if (refObject instanceof array.CMIArray) {
|
|
516
519
|
var index = parseInt(structure[idx + 1], 10);
|
|
517
520
|
if (!isNaN(index)) {
|
|
518
521
|
var item = refObject.childArray[index];
|
|
@@ -530,10 +533,10 @@ var BaseAPI = (function () {
|
|
|
530
533
|
if (refObject === null || refObject === undefined) {
|
|
531
534
|
if (!scorm2004) {
|
|
532
535
|
if (attribute === "_children") {
|
|
533
|
-
this.throwSCORMError(
|
|
536
|
+
this.throwSCORMError(this._error_codes.CHILDREN_ERROR);
|
|
534
537
|
}
|
|
535
538
|
else if (attribute === "_count") {
|
|
536
|
-
this.throwSCORMError(
|
|
539
|
+
this.throwSCORMError(this._error_codes.COUNT_ERROR);
|
|
537
540
|
}
|
|
538
541
|
}
|
|
539
542
|
}
|
|
@@ -542,13 +545,13 @@ var BaseAPI = (function () {
|
|
|
542
545
|
}
|
|
543
546
|
};
|
|
544
547
|
BaseAPI.prototype.isInitialized = function () {
|
|
545
|
-
return this.currentState === api_constants
|
|
548
|
+
return this.currentState === api_constants.global_constants.STATE_INITIALIZED;
|
|
546
549
|
};
|
|
547
550
|
BaseAPI.prototype.isNotInitialized = function () {
|
|
548
|
-
return this.currentState === api_constants
|
|
551
|
+
return this.currentState === api_constants.global_constants.STATE_NOT_INITIALIZED;
|
|
549
552
|
};
|
|
550
553
|
BaseAPI.prototype.isTerminated = function () {
|
|
551
|
-
return this.currentState === api_constants
|
|
554
|
+
return this.currentState === api_constants.global_constants.STATE_TERMINATED;
|
|
552
555
|
};
|
|
553
556
|
BaseAPI.prototype.on = function (listenerName, callback) {
|
|
554
557
|
if (!callback)
|
|
@@ -568,7 +571,7 @@ var BaseAPI = (function () {
|
|
|
568
571
|
CMIElement: CMIElement,
|
|
569
572
|
callback: callback,
|
|
570
573
|
});
|
|
571
|
-
this.apiLog("on", "Added event listener: ".concat(this.listenerArray.length), enums
|
|
574
|
+
this.apiLog("on", "Added event listener: ".concat(this.listenerArray.length), enums.LogLevelEnum.INFO, functionName);
|
|
572
575
|
}
|
|
573
576
|
};
|
|
574
577
|
BaseAPI.prototype.off = function (listenerName, callback) {
|
|
@@ -591,7 +594,7 @@ var BaseAPI = (function () {
|
|
|
591
594
|
});
|
|
592
595
|
if (removeIndex !== -1) {
|
|
593
596
|
this_1.listenerArray.splice(removeIndex, 1);
|
|
594
|
-
this_1.apiLog("off", "Removed event listener: ".concat(this_1.listenerArray.length), enums
|
|
597
|
+
this_1.apiLog("off", "Removed event listener: ".concat(this_1.listenerArray.length), enums.LogLevelEnum.INFO, functionName);
|
|
595
598
|
}
|
|
596
599
|
};
|
|
597
600
|
var this_1 = this;
|
|
@@ -624,7 +627,7 @@ var BaseAPI = (function () {
|
|
|
624
627
|
}
|
|
625
628
|
};
|
|
626
629
|
BaseAPI.prototype.processListeners = function (functionName, CMIElement, value) {
|
|
627
|
-
this.apiLog(functionName, value, enums
|
|
630
|
+
this.apiLog(functionName, value, enums.LogLevelEnum.INFO, CMIElement);
|
|
628
631
|
for (var i = 0; i < this.listenerArray.length; i++) {
|
|
629
632
|
var listener = this.listenerArray[i];
|
|
630
633
|
var functionsMatch = listener.functionName === functionName;
|
|
@@ -640,7 +643,7 @@ var BaseAPI = (function () {
|
|
|
640
643
|
CMIElementsMatch = listener.CMIElement === CMIElement;
|
|
641
644
|
}
|
|
642
645
|
if (functionsMatch && (!listenerHasCMIElement || CMIElementsMatch)) {
|
|
643
|
-
this.apiLog("processListeners", "Processing listener: ".concat(listener.functionName), enums
|
|
646
|
+
this.apiLog("processListeners", "Processing listener: ".concat(listener.functionName), enums.LogLevelEnum.INFO, CMIElement);
|
|
644
647
|
listener.callback(CMIElement, value);
|
|
645
648
|
}
|
|
646
649
|
}
|
|
@@ -649,11 +652,11 @@ var BaseAPI = (function () {
|
|
|
649
652
|
if (!message) {
|
|
650
653
|
message = this.getLmsErrorMessageDetails(errorNumber);
|
|
651
654
|
}
|
|
652
|
-
this.apiLog("throwSCORMError", errorNumber + ": " + message, enums
|
|
655
|
+
this.apiLog("throwSCORMError", errorNumber + ": " + message, enums.LogLevelEnum.ERROR);
|
|
653
656
|
this.lastErrorCode = String(errorNumber);
|
|
654
657
|
};
|
|
655
658
|
BaseAPI.prototype.clearSCORMError = function (success) {
|
|
656
|
-
if (success !== undefined && success !== api_constants
|
|
659
|
+
if (success !== undefined && success !== api_constants.global_constants.SCORM_FALSE) {
|
|
657
660
|
this.lastErrorCode = "0";
|
|
658
661
|
}
|
|
659
662
|
};
|
|
@@ -719,7 +722,7 @@ var BaseAPI = (function () {
|
|
|
719
722
|
result.forEach(function (element) {
|
|
720
723
|
obj = {};
|
|
721
724
|
obj[element[0]] = element[1];
|
|
722
|
-
_this.loadFromJSON((0,utilities
|
|
725
|
+
_this.loadFromJSON((0,utilities.unflatten)(obj), CMIElement);
|
|
723
726
|
});
|
|
724
727
|
};
|
|
725
728
|
BaseAPI.prototype.loadFromJSON = function (json, CMIElement) {
|
|
@@ -759,21 +762,21 @@ var BaseAPI = (function () {
|
|
|
759
762
|
return JSON.parse(this.renderCMIToJSONString());
|
|
760
763
|
};
|
|
761
764
|
BaseAPI.prototype.processHttpRequest = function (url_1, params_1) {
|
|
762
|
-
return (0,tslib_es6
|
|
765
|
+
return (0,tslib_es6.__awaiter)(this, arguments, void 0, function (url, params, immediate) {
|
|
763
766
|
var api, genericError, process;
|
|
764
767
|
var _this = this;
|
|
765
768
|
if (immediate === void 0) { immediate = false; }
|
|
766
|
-
return (0,tslib_es6
|
|
769
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
767
770
|
switch (_a.label) {
|
|
768
771
|
case 0:
|
|
769
772
|
api = this;
|
|
770
773
|
genericError = {
|
|
771
|
-
result: api_constants
|
|
774
|
+
result: api_constants.global_constants.SCORM_FALSE,
|
|
772
775
|
errorCode: this.error_codes.GENERAL,
|
|
773
776
|
};
|
|
774
777
|
if (immediate) {
|
|
775
|
-
this.performFetch(url, params).then(function (response) { return (0,tslib_es6
|
|
776
|
-
return (0,tslib_es6
|
|
778
|
+
this.performFetch(url, params).then(function (response) { return (0,tslib_es6.__awaiter)(_this, void 0, void 0, function () {
|
|
779
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
777
780
|
switch (_a.label) {
|
|
778
781
|
case 0: return [4, this.transformResponse(response)];
|
|
779
782
|
case 1:
|
|
@@ -783,13 +786,13 @@ var BaseAPI = (function () {
|
|
|
783
786
|
});
|
|
784
787
|
}); });
|
|
785
788
|
return [2, {
|
|
786
|
-
result: api_constants
|
|
789
|
+
result: api_constants.global_constants.SCORM_TRUE,
|
|
787
790
|
errorCode: 0,
|
|
788
791
|
}];
|
|
789
792
|
}
|
|
790
|
-
process = function (url, params, settings) { return (0,tslib_es6
|
|
793
|
+
process = function (url, params, settings) { return (0,tslib_es6.__awaiter)(_this, void 0, void 0, function () {
|
|
791
794
|
var response, e_1;
|
|
792
|
-
return (0,tslib_es6
|
|
795
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
793
796
|
switch (_a.label) {
|
|
794
797
|
case 0:
|
|
795
798
|
_a.trys.push([0, 2, , 3]);
|
|
@@ -800,7 +803,7 @@ var BaseAPI = (function () {
|
|
|
800
803
|
return [2, this.transformResponse(response)];
|
|
801
804
|
case 2:
|
|
802
805
|
e_1 = _a.sent();
|
|
803
|
-
this.apiLog("processHttpRequest", e_1, enums
|
|
806
|
+
this.apiLog("processHttpRequest", e_1, enums.LogLevelEnum.ERROR);
|
|
804
807
|
api.processListeners("CommitError");
|
|
805
808
|
return [2, genericError];
|
|
806
809
|
case 3: return [2];
|
|
@@ -816,14 +819,14 @@ var BaseAPI = (function () {
|
|
|
816
819
|
BaseAPI.prototype.scheduleCommit = function (when, callback) {
|
|
817
820
|
if (!this._timeout) {
|
|
818
821
|
this._timeout = new ScheduledCommit(this, when, callback);
|
|
819
|
-
this.apiLog("scheduleCommit", "scheduled", enums
|
|
822
|
+
this.apiLog("scheduleCommit", "scheduled", enums.LogLevelEnum.DEBUG, "");
|
|
820
823
|
}
|
|
821
824
|
};
|
|
822
825
|
BaseAPI.prototype.clearScheduledCommit = function () {
|
|
823
826
|
if (this._timeout) {
|
|
824
827
|
this._timeout.cancel();
|
|
825
828
|
this._timeout = undefined;
|
|
826
|
-
this.apiLog("clearScheduledCommit", "cleared", enums
|
|
829
|
+
this.apiLog("clearScheduledCommit", "cleared", enums.LogLevelEnum.DEBUG, "");
|
|
827
830
|
}
|
|
828
831
|
};
|
|
829
832
|
BaseAPI.prototype._checkObjectHasProperty = function (refObject, attribute) {
|
|
@@ -832,9 +835,9 @@ var BaseAPI = (function () {
|
|
|
832
835
|
attribute in refObject);
|
|
833
836
|
};
|
|
834
837
|
BaseAPI.prototype.handleValueAccessException = function (e, returnValue) {
|
|
835
|
-
if (e instanceof exceptions
|
|
838
|
+
if (e instanceof exceptions.ValidationError) {
|
|
836
839
|
this.lastErrorCode = String(e.errorCode);
|
|
837
|
-
returnValue = api_constants
|
|
840
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
838
841
|
}
|
|
839
842
|
else {
|
|
840
843
|
if (e instanceof Error && e.message) {
|
|
@@ -852,20 +855,20 @@ var BaseAPI = (function () {
|
|
|
852
855
|
var commitObject = this.settings.renderCommonCommitFields
|
|
853
856
|
? this.renderCommitObject(shouldTerminateCommit)
|
|
854
857
|
: this.renderCommitCMI(shouldTerminateCommit);
|
|
855
|
-
if ([enums
|
|
858
|
+
if ([enums.LogLevelEnum.DEBUG, "1", 1, "DEBUG"].includes(this.apiLogLevel)) {
|
|
856
859
|
console.debug("Commit (terminated: " + (terminateCommit ? "yes" : "no") + "): ");
|
|
857
860
|
console.debug(commitObject);
|
|
858
861
|
}
|
|
859
862
|
return commitObject;
|
|
860
863
|
};
|
|
861
864
|
BaseAPI.prototype.performFetch = function (url, params) {
|
|
862
|
-
return (0,tslib_es6
|
|
863
|
-
return (0,tslib_es6
|
|
865
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
866
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
864
867
|
return [2, fetch(url, {
|
|
865
868
|
method: "POST",
|
|
866
869
|
mode: this.settings.fetchMode,
|
|
867
870
|
body: params instanceof Array ? params.join("&") : JSON.stringify(params),
|
|
868
|
-
headers: (0,tslib_es6
|
|
871
|
+
headers: (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, this.settings.xhrHeaders), { "Content-Type": this.settings.commitRequestDataType }),
|
|
869
872
|
credentials: this.settings.xhrWithCredentials ? "include" : undefined,
|
|
870
873
|
keepalive: true,
|
|
871
874
|
})];
|
|
@@ -873,9 +876,9 @@ var BaseAPI = (function () {
|
|
|
873
876
|
});
|
|
874
877
|
};
|
|
875
878
|
BaseAPI.prototype.transformResponse = function (response) {
|
|
876
|
-
return (0,tslib_es6
|
|
879
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
877
880
|
var result, _a;
|
|
878
|
-
return (0,tslib_es6
|
|
881
|
+
return (0,tslib_es6.__generator)(this, function (_c) {
|
|
879
882
|
switch (_c.label) {
|
|
880
883
|
case 0:
|
|
881
884
|
if (!(typeof this.settings.responseHandler === "function")) return [3, 2];
|
|
@@ -891,8 +894,7 @@ var BaseAPI = (function () {
|
|
|
891
894
|
result = _a;
|
|
892
895
|
if (response.status >= 200 &&
|
|
893
896
|
response.status <= 299 &&
|
|
894
|
-
(result.result === true ||
|
|
895
|
-
result.result === api_constants/* default */.A.global.SCORM_TRUE)) {
|
|
897
|
+
(result.result === true || result.result === api_constants.global_constants.SCORM_TRUE)) {
|
|
896
898
|
this.processListeners("CommitSuccess");
|
|
897
899
|
}
|
|
898
900
|
else {
|
|
@@ -913,8 +915,9 @@ var BaseAPI = (function () {
|
|
|
913
915
|
/***/ 941:
|
|
914
916
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
915
917
|
|
|
918
|
+
__webpack_require__.r(__webpack_exports__);
|
|
916
919
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
917
|
-
/* harmony export */
|
|
920
|
+
/* harmony export */ Scorm12Impl: function() { return /* binding */ Scorm12Impl; }
|
|
918
921
|
/* harmony export */ });
|
|
919
922
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(635);
|
|
920
923
|
/* harmony import */ var _cmi_scorm12_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(989);
|
|
@@ -924,9 +927,9 @@ var BaseAPI = (function () {
|
|
|
924
927
|
/* harmony import */ var _cmi_scorm12_objectives__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(176);
|
|
925
928
|
/* harmony import */ var _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(833);
|
|
926
929
|
/* harmony import */ var _cmi_scorm12_nav__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(331);
|
|
927
|
-
/* harmony import */ var
|
|
928
|
-
/* harmony import */ var
|
|
929
|
-
/* harmony import */ var
|
|
930
|
+
/* harmony import */ var _constants_enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(56);
|
|
931
|
+
/* harmony import */ var _BaseAPI__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(429);
|
|
932
|
+
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(417);
|
|
930
933
|
|
|
931
934
|
|
|
932
935
|
|
|
@@ -940,7 +943,7 @@ var BaseAPI = (function () {
|
|
|
940
943
|
|
|
941
944
|
|
|
942
945
|
var Scorm12Impl = (function (_super) {
|
|
943
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
946
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(Scorm12Impl, _super);
|
|
944
947
|
function Scorm12Impl(settings) {
|
|
945
948
|
var _this = this;
|
|
946
949
|
if (settings) {
|
|
@@ -948,10 +951,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
948
951
|
settings.mastery_override = false;
|
|
949
952
|
}
|
|
950
953
|
}
|
|
951
|
-
_this = _super.call(this, _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__
|
|
954
|
+
_this = _super.call(this, _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors, settings) || this;
|
|
952
955
|
_this.statusSetByModule = false;
|
|
953
|
-
_this.cmi = new _cmi_scorm12_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
954
|
-
_this.nav = new _cmi_scorm12_nav__WEBPACK_IMPORTED_MODULE_6__
|
|
956
|
+
_this.cmi = new _cmi_scorm12_cmi__WEBPACK_IMPORTED_MODULE_0__.CMI();
|
|
957
|
+
_this.nav = new _cmi_scorm12_nav__WEBPACK_IMPORTED_MODULE_6__.NAV();
|
|
955
958
|
_this.LMSInitialize = _this.lmsInitialize;
|
|
956
959
|
_this.LMSFinish = _this.lmsFinish;
|
|
957
960
|
_this.LMSGetValue = _this.lmsGetValue;
|
|
@@ -963,9 +966,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
963
966
|
return _this;
|
|
964
967
|
}
|
|
965
968
|
Scorm12Impl.prototype.reset = function (settings) {
|
|
969
|
+
var _a, _b;
|
|
966
970
|
this.commonReset(settings);
|
|
967
|
-
this.cmi
|
|
968
|
-
this.nav
|
|
971
|
+
(_a = this.cmi) === null || _a === void 0 ? void 0 : _a.reset();
|
|
972
|
+
(_b = this.nav) === null || _b === void 0 ? void 0 : _b.reset();
|
|
969
973
|
};
|
|
970
974
|
Scorm12Impl.prototype.lmsInitialize = function () {
|
|
971
975
|
this.cmi.initialize();
|
|
@@ -979,8 +983,8 @@ var Scorm12Impl = (function (_super) {
|
|
|
979
983
|
};
|
|
980
984
|
Scorm12Impl.prototype.lmsFinish = function () {
|
|
981
985
|
var _this = this;
|
|
982
|
-
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
983
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
986
|
+
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(_this, void 0, void 0, function () {
|
|
987
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_a) {
|
|
984
988
|
switch (_a.label) {
|
|
985
989
|
case 0: return [4, this.internalFinish()];
|
|
986
990
|
case 1:
|
|
@@ -989,17 +993,17 @@ var Scorm12Impl = (function (_super) {
|
|
|
989
993
|
}
|
|
990
994
|
});
|
|
991
995
|
}); })();
|
|
992
|
-
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
996
|
+
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE;
|
|
993
997
|
};
|
|
994
998
|
Scorm12Impl.prototype.internalFinish = function () {
|
|
995
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
999
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(this, void 0, void 0, function () {
|
|
996
1000
|
var result;
|
|
997
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1001
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_a) {
|
|
998
1002
|
switch (_a.label) {
|
|
999
1003
|
case 0: return [4, this.terminate("LMSFinish", true)];
|
|
1000
1004
|
case 1:
|
|
1001
1005
|
result = _a.sent();
|
|
1002
|
-
if (result === _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1006
|
+
if (result === _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE) {
|
|
1003
1007
|
if (this.nav.event !== "") {
|
|
1004
1008
|
if (this.nav.event === "continue") {
|
|
1005
1009
|
this.processListeners("SequenceNext");
|
|
@@ -1032,8 +1036,8 @@ var Scorm12Impl = (function (_super) {
|
|
|
1032
1036
|
this.scheduleCommit(500, "LMSCommit");
|
|
1033
1037
|
}
|
|
1034
1038
|
else {
|
|
1035
|
-
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1036
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1039
|
+
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(_this, void 0, void 0, function () {
|
|
1040
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_a) {
|
|
1037
1041
|
switch (_a.label) {
|
|
1038
1042
|
case 0: return [4, this.commit("LMSCommit", false)];
|
|
1039
1043
|
case 1:
|
|
@@ -1043,7 +1047,7 @@ var Scorm12Impl = (function (_super) {
|
|
|
1043
1047
|
});
|
|
1044
1048
|
}); })();
|
|
1045
1049
|
}
|
|
1046
|
-
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1050
|
+
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE;
|
|
1047
1051
|
};
|
|
1048
1052
|
Scorm12Impl.prototype.lmsGetLastError = function () {
|
|
1049
1053
|
return this.getLastError("LMSGetLastError");
|
|
@@ -1061,20 +1065,20 @@ var Scorm12Impl = (function (_super) {
|
|
|
1061
1065
|
return this._commonGetCMIValue("getCMIValue", false, CMIElement);
|
|
1062
1066
|
};
|
|
1063
1067
|
Scorm12Impl.prototype.getChildElement = function (CMIElement, _value, foundFirstIndex) {
|
|
1064
|
-
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1065
|
-
return new _cmi_scorm12_objectives__WEBPACK_IMPORTED_MODULE_4__
|
|
1068
|
+
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.objectives\\.\\d+")) {
|
|
1069
|
+
return new _cmi_scorm12_objectives__WEBPACK_IMPORTED_MODULE_4__.CMIObjectivesObject();
|
|
1066
1070
|
}
|
|
1067
1071
|
else if (foundFirstIndex &&
|
|
1068
|
-
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1069
|
-
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__
|
|
1072
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.interactions\\.\\d+\\.correct_responses\\.\\d+")) {
|
|
1073
|
+
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__.CMIInteractionsCorrectResponsesObject();
|
|
1070
1074
|
}
|
|
1071
1075
|
else if (foundFirstIndex &&
|
|
1072
|
-
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1073
|
-
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__
|
|
1076
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.interactions\\.\\d+\\.objectives\\.\\d+")) {
|
|
1077
|
+
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__.CMIInteractionsObjectivesObject();
|
|
1074
1078
|
}
|
|
1075
1079
|
else if (!foundFirstIndex &&
|
|
1076
|
-
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1077
|
-
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__
|
|
1080
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.interactions\\.\\d+")) {
|
|
1081
|
+
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__.CMIInteractionsObject();
|
|
1078
1082
|
}
|
|
1079
1083
|
return null;
|
|
1080
1084
|
};
|
|
@@ -1084,11 +1088,11 @@ var Scorm12Impl = (function (_super) {
|
|
|
1084
1088
|
var basicMessage = "No Error";
|
|
1085
1089
|
var detailMessage = "No Error";
|
|
1086
1090
|
errorNumber = String(errorNumber);
|
|
1087
|
-
if (_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1091
|
+
if (_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.error_descriptions[errorNumber]) {
|
|
1088
1092
|
basicMessage =
|
|
1089
|
-
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1093
|
+
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.error_descriptions[errorNumber].basicMessage;
|
|
1090
1094
|
detailMessage =
|
|
1091
|
-
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1095
|
+
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.error_descriptions[errorNumber].detailMessage;
|
|
1092
1096
|
}
|
|
1093
1097
|
return detail ? detailMessage : basicMessage;
|
|
1094
1098
|
};
|
|
@@ -1101,10 +1105,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
1101
1105
|
cmiExport.cmi.core.total_time = this.cmi.getCurrentTotalTime();
|
|
1102
1106
|
}
|
|
1103
1107
|
var result = [];
|
|
1104
|
-
var flattened = _utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1108
|
+
var flattened = _utilities__WEBPACK_IMPORTED_MODULE_1__.flatten(cmiExport);
|
|
1105
1109
|
switch (this.settings.dataCommitFormat) {
|
|
1106
1110
|
case "flattened":
|
|
1107
|
-
return _utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1111
|
+
return _utilities__WEBPACK_IMPORTED_MODULE_1__.flatten(cmiExport);
|
|
1108
1112
|
case "params":
|
|
1109
1113
|
for (var item in flattened) {
|
|
1110
1114
|
if ({}.hasOwnProperty.call(flattened, item)) {
|
|
@@ -1120,20 +1124,20 @@ var Scorm12Impl = (function (_super) {
|
|
|
1120
1124
|
Scorm12Impl.prototype.renderCommitObject = function (terminateCommit) {
|
|
1121
1125
|
var cmiExport = this.renderCommitCMI(terminateCommit);
|
|
1122
1126
|
var totalTimeHHMMSS = this.cmi.getCurrentTotalTime();
|
|
1123
|
-
var totalTimeSeconds = _utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1127
|
+
var totalTimeSeconds = _utilities__WEBPACK_IMPORTED_MODULE_1__.getTimeAsSeconds(totalTimeHHMMSS, _constants_regex__WEBPACK_IMPORTED_MODULE_9__.scorm12_regex.CMITimespan);
|
|
1124
1128
|
var lessonStatus = this.cmi.core.lesson_status;
|
|
1125
|
-
var completionStatus =
|
|
1126
|
-
var successStatus =
|
|
1129
|
+
var completionStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.CompletionStatus.unknown;
|
|
1130
|
+
var successStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.SuccessStatus.unknown;
|
|
1127
1131
|
if (lessonStatus) {
|
|
1128
1132
|
completionStatus =
|
|
1129
1133
|
lessonStatus === "completed" || lessonStatus === "passed"
|
|
1130
|
-
?
|
|
1131
|
-
:
|
|
1134
|
+
? _constants_enums__WEBPACK_IMPORTED_MODULE_7__.CompletionStatus.completed
|
|
1135
|
+
: _constants_enums__WEBPACK_IMPORTED_MODULE_7__.CompletionStatus.incomplete;
|
|
1132
1136
|
if (lessonStatus === "passed") {
|
|
1133
|
-
successStatus =
|
|
1137
|
+
successStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.SuccessStatus.passed;
|
|
1134
1138
|
}
|
|
1135
1139
|
else if (lessonStatus === "failed") {
|
|
1136
|
-
successStatus =
|
|
1140
|
+
successStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.SuccessStatus.failed;
|
|
1137
1141
|
}
|
|
1138
1142
|
}
|
|
1139
1143
|
var score = this.cmi.core.score;
|
|
@@ -1162,10 +1166,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
1162
1166
|
return commitObject;
|
|
1163
1167
|
};
|
|
1164
1168
|
Scorm12Impl.prototype.storeData = function (terminateCommit) {
|
|
1165
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1169
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(this, void 0, void 0, function () {
|
|
1166
1170
|
var originalStatus, commitObject;
|
|
1167
1171
|
var _a, _b, _c;
|
|
1168
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1172
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_d) {
|
|
1169
1173
|
switch (_d.label) {
|
|
1170
1174
|
case 0:
|
|
1171
1175
|
if (terminateCommit) {
|
|
@@ -1200,7 +1204,7 @@ var Scorm12Impl = (function (_super) {
|
|
|
1200
1204
|
return [4, this.processHttpRequest(this.settings.lmsCommitUrl, commitObject, terminateCommit)];
|
|
1201
1205
|
case 1: return [2, _d.sent()];
|
|
1202
1206
|
case 2: return [2, {
|
|
1203
|
-
result: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1207
|
+
result: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE,
|
|
1204
1208
|
errorCode: 0,
|
|
1205
1209
|
}];
|
|
1206
1210
|
}
|
|
@@ -1208,7 +1212,7 @@ var Scorm12Impl = (function (_super) {
|
|
|
1208
1212
|
});
|
|
1209
1213
|
};
|
|
1210
1214
|
return Scorm12Impl;
|
|
1211
|
-
}(
|
|
1215
|
+
}(_BaseAPI__WEBPACK_IMPORTED_MODULE_8__["default"]));
|
|
1212
1216
|
|
|
1213
1217
|
|
|
1214
1218
|
|
|
@@ -1217,29 +1221,40 @@ var Scorm12Impl = (function (_super) {
|
|
|
1217
1221
|
/***/ 589:
|
|
1218
1222
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1219
1223
|
|
|
1224
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1220
1225
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1221
|
-
/* harmony export */
|
|
1226
|
+
/* harmony export */ CMIArray: function() { return /* binding */ CMIArray; }
|
|
1222
1227
|
/* harmony export */ });
|
|
1223
|
-
/* unused harmony export scorm12_error_codes */
|
|
1224
1228
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(635);
|
|
1225
1229
|
/* harmony import */ var _base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
1226
|
-
/* harmony import */ var
|
|
1227
|
-
/* harmony import */ var
|
|
1230
|
+
/* harmony import */ var _exceptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(784);
|
|
1231
|
+
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(797);
|
|
1228
1232
|
|
|
1229
1233
|
|
|
1230
1234
|
|
|
1231
1235
|
|
|
1232
|
-
var scorm12_error_codes = _constants_error_codes__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.scorm12;
|
|
1233
1236
|
var CMIArray = (function (_super) {
|
|
1234
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_3__
|
|
1237
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(CMIArray, _super);
|
|
1235
1238
|
function CMIArray(params) {
|
|
1236
1239
|
var _this = _super.call(this) || this;
|
|
1237
1240
|
_this.__children = params.children;
|
|
1238
|
-
_this._errorCode = params.errorCode ||
|
|
1239
|
-
_this._errorClass = params.errorClass ||
|
|
1241
|
+
_this._errorCode = params.errorCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.GENERAL;
|
|
1242
|
+
_this._errorClass = params.errorClass || _exceptions__WEBPACK_IMPORTED_MODULE_1__.BaseScormValidationError;
|
|
1240
1243
|
_this.childArray = [];
|
|
1241
1244
|
return _this;
|
|
1242
1245
|
}
|
|
1246
|
+
CMIArray.prototype.reset = function (wipe) {
|
|
1247
|
+
if (wipe === void 0) { wipe = false; }
|
|
1248
|
+
this._initialized = false;
|
|
1249
|
+
if (wipe) {
|
|
1250
|
+
this.childArray = [];
|
|
1251
|
+
}
|
|
1252
|
+
else {
|
|
1253
|
+
for (var i = 0; i < this.childArray.length; i++) {
|
|
1254
|
+
this.childArray[i].reset();
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1243
1258
|
Object.defineProperty(CMIArray.prototype, "_children", {
|
|
1244
1259
|
get: function () {
|
|
1245
1260
|
return this.__children;
|
|
@@ -1270,7 +1285,7 @@ var CMIArray = (function (_super) {
|
|
|
1270
1285
|
return result;
|
|
1271
1286
|
};
|
|
1272
1287
|
return CMIArray;
|
|
1273
|
-
}(_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
1288
|
+
}(_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
1274
1289
|
|
|
1275
1290
|
|
|
1276
1291
|
|
|
@@ -1279,9 +1294,10 @@ var CMIArray = (function (_super) {
|
|
|
1279
1294
|
/***/ 319:
|
|
1280
1295
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1281
1296
|
|
|
1297
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1282
1298
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1283
|
-
/* harmony export */
|
|
1284
|
-
/* harmony export */
|
|
1299
|
+
/* harmony export */ BaseCMI: function() { return /* binding */ BaseCMI; },
|
|
1300
|
+
/* harmony export */ BaseRootCMI: function() { return /* binding */ BaseRootCMI; }
|
|
1285
1301
|
/* harmony export */ });
|
|
1286
1302
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
1287
1303
|
|
|
@@ -1314,7 +1330,7 @@ var BaseCMI = (function () {
|
|
|
1314
1330
|
}());
|
|
1315
1331
|
|
|
1316
1332
|
var BaseRootCMI = (function (_super) {
|
|
1317
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_0__
|
|
1333
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(BaseRootCMI, _super);
|
|
1318
1334
|
function BaseRootCMI() {
|
|
1319
1335
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1320
1336
|
}
|
|
@@ -1328,10 +1344,10 @@ var BaseRootCMI = (function (_super) {
|
|
|
1328
1344
|
/***/ 434:
|
|
1329
1345
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1330
1346
|
|
|
1347
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1331
1348
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1332
|
-
/* harmony export */
|
|
1349
|
+
/* harmony export */ CMIScore: function() { return /* binding */ CMIScore; }
|
|
1333
1350
|
/* harmony export */ });
|
|
1334
|
-
/* unused harmony export scorm12_error_codes */
|
|
1335
1351
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(635);
|
|
1336
1352
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(340);
|
|
1337
1353
|
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(417);
|
|
@@ -1344,30 +1360,30 @@ var BaseRootCMI = (function (_super) {
|
|
|
1344
1360
|
|
|
1345
1361
|
|
|
1346
1362
|
|
|
1347
|
-
var scorm12_constants = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.scorm12;
|
|
1348
|
-
var scorm12_regex = _constants_regex__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.scorm12;
|
|
1349
|
-
var scorm12_error_codes = _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A.scorm12;
|
|
1350
1363
|
var CMIScore = (function (_super) {
|
|
1351
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_4__
|
|
1364
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(CMIScore, _super);
|
|
1352
1365
|
function CMIScore(params) {
|
|
1353
1366
|
var _this = _super.call(this) || this;
|
|
1354
1367
|
_this._raw = "";
|
|
1355
1368
|
_this._min = "";
|
|
1356
|
-
_this.__children = params.score_children || scorm12_constants.score_children;
|
|
1369
|
+
_this.__children = params.score_children || _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__.scorm12_constants.score_children;
|
|
1357
1370
|
_this.__score_range = !params.score_range
|
|
1358
1371
|
? false
|
|
1359
|
-
: scorm12_regex.score_range;
|
|
1372
|
+
: _constants_regex__WEBPACK_IMPORTED_MODULE_1__.scorm12_regex.score_range;
|
|
1360
1373
|
_this._max = params.max || params.max === "" ? params.max : "100";
|
|
1361
1374
|
_this.__invalid_error_code =
|
|
1362
|
-
params.invalidErrorCode ||
|
|
1375
|
+
params.invalidErrorCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.INVALID_SET_VALUE;
|
|
1363
1376
|
_this.__invalid_type_code =
|
|
1364
|
-
params.invalidTypeCode ||
|
|
1377
|
+
params.invalidTypeCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.TYPE_MISMATCH;
|
|
1365
1378
|
_this.__invalid_range_code =
|
|
1366
|
-
params.invalidRangeCode ||
|
|
1367
|
-
_this.__decimal_regex = params.decimalRegex || scorm12_regex.CMIDecimal;
|
|
1379
|
+
params.invalidRangeCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.VALUE_OUT_OF_RANGE;
|
|
1380
|
+
_this.__decimal_regex = params.decimalRegex || _constants_regex__WEBPACK_IMPORTED_MODULE_1__.scorm12_regex.CMIDecimal;
|
|
1368
1381
|
_this.__error_class = params.errorClass;
|
|
1369
1382
|
return _this;
|
|
1370
1383
|
}
|
|
1384
|
+
CMIScore.prototype.reset = function () {
|
|
1385
|
+
this._initialized = false;
|
|
1386
|
+
};
|
|
1371
1387
|
Object.defineProperty(CMIScore.prototype, "_children", {
|
|
1372
1388
|
get: function () {
|
|
1373
1389
|
return this.__children;
|
|
@@ -1383,9 +1399,9 @@ var CMIScore = (function (_super) {
|
|
|
1383
1399
|
return this._raw;
|
|
1384
1400
|
},
|
|
1385
1401
|
set: function (raw) {
|
|
1386
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1402
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidFormat)(raw, this.__decimal_regex, this.__invalid_type_code, this.__error_class) &&
|
|
1387
1403
|
(!this.__score_range ||
|
|
1388
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1404
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidRange)(raw, this.__score_range, this.__invalid_range_code, this.__error_class))) {
|
|
1389
1405
|
this._raw = raw;
|
|
1390
1406
|
}
|
|
1391
1407
|
},
|
|
@@ -1397,9 +1413,9 @@ var CMIScore = (function (_super) {
|
|
|
1397
1413
|
return this._min;
|
|
1398
1414
|
},
|
|
1399
1415
|
set: function (min) {
|
|
1400
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1416
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidFormat)(min, this.__decimal_regex, this.__invalid_type_code, this.__error_class) &&
|
|
1401
1417
|
(!this.__score_range ||
|
|
1402
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1418
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidRange)(min, this.__score_range, this.__invalid_range_code, this.__error_class))) {
|
|
1403
1419
|
this._min = min;
|
|
1404
1420
|
}
|
|
1405
1421
|
},
|
|
@@ -1411,9 +1427,9 @@ var CMIScore = (function (_super) {
|
|
|
1411
1427
|
return this._max;
|
|
1412
1428
|
},
|
|
1413
1429
|
set: function (max) {
|
|
1414
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1430
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidFormat)(max, this.__decimal_regex, this.__invalid_type_code, this.__error_class) &&
|
|
1415
1431
|
(!this.__score_range ||
|
|
1416
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1432
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidRange)(max, this.__score_range, this.__invalid_range_code, this.__error_class))) {
|
|
1417
1433
|
this._max = max;
|
|
1418
1434
|
}
|
|
1419
1435
|
},
|
|
@@ -1431,7 +1447,7 @@ var CMIScore = (function (_super) {
|
|
|
1431
1447
|
return result;
|
|
1432
1448
|
};
|
|
1433
1449
|
return CMIScore;
|
|
1434
|
-
}(_base_cmi__WEBPACK_IMPORTED_MODULE_2__
|
|
1450
|
+
}(_base_cmi__WEBPACK_IMPORTED_MODULE_2__.BaseCMI));
|
|
1435
1451
|
|
|
1436
1452
|
|
|
1437
1453
|
|
|
@@ -1440,9 +1456,10 @@ var CMIScore = (function (_super) {
|
|
|
1440
1456
|
/***/ 449:
|
|
1441
1457
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1442
1458
|
|
|
1459
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1443
1460
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1444
|
-
/* harmony export */
|
|
1445
|
-
/* harmony export */
|
|
1461
|
+
/* harmony export */ checkValidFormat: function() { return /* binding */ checkValidFormat; },
|
|
1462
|
+
/* harmony export */ checkValidRange: function() { return /* binding */ checkValidRange; }
|
|
1446
1463
|
/* harmony export */ });
|
|
1447
1464
|
function checkValidFormat(value, regexPattern, errorCode, errorClass, allowEmptyString) {
|
|
1448
1465
|
if (typeof value !== "string") {
|
|
@@ -1480,10 +1497,12 @@ function checkValidRange(value, rangePattern, errorCode, errorClass) {
|
|
|
1480
1497
|
/***/ 989:
|
|
1481
1498
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1482
1499
|
|
|
1500
|
+
// ESM COMPAT FLAG
|
|
1501
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1483
1502
|
|
|
1484
1503
|
// EXPORTS
|
|
1485
1504
|
__webpack_require__.d(__webpack_exports__, {
|
|
1486
|
-
|
|
1505
|
+
CMI: function() { return /* binding */ CMI; }
|
|
1487
1506
|
});
|
|
1488
1507
|
|
|
1489
1508
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs
|
|
@@ -1494,8 +1513,8 @@ var api_constants = __webpack_require__(340);
|
|
|
1494
1513
|
var error_codes = __webpack_require__(797);
|
|
1495
1514
|
// EXTERNAL MODULE: ./src/constants/regex.ts
|
|
1496
1515
|
var regex = __webpack_require__(417);
|
|
1497
|
-
// EXTERNAL MODULE: ./src/exceptions.ts
|
|
1498
|
-
var
|
|
1516
|
+
// EXTERNAL MODULE: ./src/exceptions/scorm12_exceptions.ts
|
|
1517
|
+
var scorm12_exceptions = __webpack_require__(179);
|
|
1499
1518
|
// EXTERNAL MODULE: ./src/cmi/common/base_cmi.ts
|
|
1500
1519
|
var base_cmi = __webpack_require__(319);
|
|
1501
1520
|
// EXTERNAL MODULE: ./src/cmi/scorm12/validation.ts
|
|
@@ -1515,10 +1534,10 @@ var utilities = __webpack_require__(864);
|
|
|
1515
1534
|
|
|
1516
1535
|
|
|
1517
1536
|
var CMICore = (function (_super) {
|
|
1518
|
-
(0,tslib_es6
|
|
1537
|
+
(0,tslib_es6.__extends)(CMICore, _super);
|
|
1519
1538
|
function CMICore() {
|
|
1520
1539
|
var _this = _super.call(this) || this;
|
|
1521
|
-
_this.__children = api_constants
|
|
1540
|
+
_this.__children = api_constants.scorm12_constants.core_children;
|
|
1522
1541
|
_this._student_id = "";
|
|
1523
1542
|
_this._student_name = "";
|
|
1524
1543
|
_this._lesson_location = "";
|
|
@@ -1530,13 +1549,13 @@ var CMICore = (function (_super) {
|
|
|
1530
1549
|
_this._exit = "";
|
|
1531
1550
|
_this._session_time = "00:00:00";
|
|
1532
1551
|
_this._suspend_data = "";
|
|
1533
|
-
_this.score = new score
|
|
1534
|
-
score_children: api_constants
|
|
1535
|
-
score_range: regex
|
|
1536
|
-
invalidErrorCode: error_codes
|
|
1537
|
-
invalidTypeCode: error_codes
|
|
1538
|
-
invalidRangeCode: error_codes
|
|
1539
|
-
errorClass:
|
|
1552
|
+
_this.score = new score.CMIScore({
|
|
1553
|
+
score_children: api_constants.scorm12_constants.score_children,
|
|
1554
|
+
score_range: regex.scorm12_regex.score_range,
|
|
1555
|
+
invalidErrorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
1556
|
+
invalidTypeCode: error_codes.scorm12_errors.TYPE_MISMATCH,
|
|
1557
|
+
invalidRangeCode: error_codes.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
1558
|
+
errorClass: scorm12_exceptions.Scorm12ValidationError,
|
|
1540
1559
|
});
|
|
1541
1560
|
return _this;
|
|
1542
1561
|
}
|
|
@@ -1545,12 +1564,20 @@ var CMICore = (function (_super) {
|
|
|
1545
1564
|
_super.prototype.initialize.call(this);
|
|
1546
1565
|
(_a = this.score) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
1547
1566
|
};
|
|
1567
|
+
CMICore.prototype.reset = function () {
|
|
1568
|
+
var _a;
|
|
1569
|
+
this._initialized = false;
|
|
1570
|
+
this._exit = "";
|
|
1571
|
+
this._entry = "";
|
|
1572
|
+
this._session_time = "00:00:00";
|
|
1573
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
1574
|
+
};
|
|
1548
1575
|
Object.defineProperty(CMICore.prototype, "_children", {
|
|
1549
1576
|
get: function () {
|
|
1550
1577
|
return this.__children;
|
|
1551
1578
|
},
|
|
1552
1579
|
set: function (_children) {
|
|
1553
|
-
throw new
|
|
1580
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.INVALID_SET_VALUE);
|
|
1554
1581
|
},
|
|
1555
1582
|
enumerable: false,
|
|
1556
1583
|
configurable: true
|
|
@@ -1561,7 +1588,7 @@ var CMICore = (function (_super) {
|
|
|
1561
1588
|
},
|
|
1562
1589
|
set: function (student_id) {
|
|
1563
1590
|
if (this.initialized) {
|
|
1564
|
-
throw new
|
|
1591
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1565
1592
|
}
|
|
1566
1593
|
else {
|
|
1567
1594
|
this._student_id = student_id;
|
|
@@ -1576,7 +1603,7 @@ var CMICore = (function (_super) {
|
|
|
1576
1603
|
},
|
|
1577
1604
|
set: function (student_name) {
|
|
1578
1605
|
if (this.initialized) {
|
|
1579
|
-
throw new
|
|
1606
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1580
1607
|
}
|
|
1581
1608
|
else {
|
|
1582
1609
|
this._student_name = student_name;
|
|
@@ -1590,7 +1617,7 @@ var CMICore = (function (_super) {
|
|
|
1590
1617
|
return this._lesson_location;
|
|
1591
1618
|
},
|
|
1592
1619
|
set: function (lesson_location) {
|
|
1593
|
-
if ((0,validation
|
|
1620
|
+
if ((0,validation.check12ValidFormat)(lesson_location, regex.scorm12_regex.CMIString256, true)) {
|
|
1594
1621
|
this._lesson_location = lesson_location;
|
|
1595
1622
|
}
|
|
1596
1623
|
},
|
|
@@ -1603,7 +1630,7 @@ var CMICore = (function (_super) {
|
|
|
1603
1630
|
},
|
|
1604
1631
|
set: function (credit) {
|
|
1605
1632
|
if (this.initialized) {
|
|
1606
|
-
throw new
|
|
1633
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1607
1634
|
}
|
|
1608
1635
|
else {
|
|
1609
1636
|
this._credit = credit;
|
|
@@ -1618,12 +1645,12 @@ var CMICore = (function (_super) {
|
|
|
1618
1645
|
},
|
|
1619
1646
|
set: function (lesson_status) {
|
|
1620
1647
|
if (this.initialized) {
|
|
1621
|
-
if ((0,validation
|
|
1648
|
+
if ((0,validation.check12ValidFormat)(lesson_status, regex.scorm12_regex.CMIStatus)) {
|
|
1622
1649
|
this._lesson_status = lesson_status;
|
|
1623
1650
|
}
|
|
1624
1651
|
}
|
|
1625
1652
|
else {
|
|
1626
|
-
if ((0,validation
|
|
1653
|
+
if ((0,validation.check12ValidFormat)(lesson_status, regex.scorm12_regex.CMIStatus2)) {
|
|
1627
1654
|
this._lesson_status = lesson_status;
|
|
1628
1655
|
}
|
|
1629
1656
|
}
|
|
@@ -1637,7 +1664,7 @@ var CMICore = (function (_super) {
|
|
|
1637
1664
|
},
|
|
1638
1665
|
set: function (entry) {
|
|
1639
1666
|
if (this.initialized) {
|
|
1640
|
-
throw new
|
|
1667
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1641
1668
|
}
|
|
1642
1669
|
else {
|
|
1643
1670
|
this._entry = entry;
|
|
@@ -1652,7 +1679,7 @@ var CMICore = (function (_super) {
|
|
|
1652
1679
|
},
|
|
1653
1680
|
set: function (total_time) {
|
|
1654
1681
|
if (this.initialized) {
|
|
1655
|
-
throw new
|
|
1682
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1656
1683
|
}
|
|
1657
1684
|
else {
|
|
1658
1685
|
this._total_time = total_time;
|
|
@@ -1667,7 +1694,7 @@ var CMICore = (function (_super) {
|
|
|
1667
1694
|
},
|
|
1668
1695
|
set: function (lesson_mode) {
|
|
1669
1696
|
if (this.initialized) {
|
|
1670
|
-
throw new
|
|
1697
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1671
1698
|
}
|
|
1672
1699
|
else {
|
|
1673
1700
|
this._lesson_mode = lesson_mode;
|
|
@@ -1679,12 +1706,12 @@ var CMICore = (function (_super) {
|
|
|
1679
1706
|
Object.defineProperty(CMICore.prototype, "exit", {
|
|
1680
1707
|
get: function () {
|
|
1681
1708
|
if (!this.jsonString) {
|
|
1682
|
-
throw new
|
|
1709
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1683
1710
|
}
|
|
1684
1711
|
return this._exit;
|
|
1685
1712
|
},
|
|
1686
1713
|
set: function (exit) {
|
|
1687
|
-
if ((0,validation
|
|
1714
|
+
if ((0,validation.check12ValidFormat)(exit, regex.scorm12_regex.CMIExit, true)) {
|
|
1688
1715
|
this._exit = exit;
|
|
1689
1716
|
}
|
|
1690
1717
|
},
|
|
@@ -1694,12 +1721,12 @@ var CMICore = (function (_super) {
|
|
|
1694
1721
|
Object.defineProperty(CMICore.prototype, "session_time", {
|
|
1695
1722
|
get: function () {
|
|
1696
1723
|
if (!this.jsonString) {
|
|
1697
|
-
throw new
|
|
1724
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1698
1725
|
}
|
|
1699
1726
|
return this._session_time;
|
|
1700
1727
|
},
|
|
1701
1728
|
set: function (session_time) {
|
|
1702
|
-
if ((0,validation
|
|
1729
|
+
if ((0,validation.check12ValidFormat)(session_time, regex.scorm12_regex.CMITimespan)) {
|
|
1703
1730
|
this._session_time = session_time;
|
|
1704
1731
|
}
|
|
1705
1732
|
},
|
|
@@ -1711,7 +1738,7 @@ var CMICore = (function (_super) {
|
|
|
1711
1738
|
return this._suspend_data;
|
|
1712
1739
|
},
|
|
1713
1740
|
set: function (suspend_data) {
|
|
1714
|
-
if ((0,validation
|
|
1741
|
+
if ((0,validation.check12ValidFormat)(suspend_data, regex.scorm12_regex.CMIString4096, true)) {
|
|
1715
1742
|
this._suspend_data = suspend_data;
|
|
1716
1743
|
}
|
|
1717
1744
|
},
|
|
@@ -1723,9 +1750,9 @@ var CMICore = (function (_super) {
|
|
|
1723
1750
|
var startTime = start_time;
|
|
1724
1751
|
if (typeof startTime !== "undefined" && startTime !== null) {
|
|
1725
1752
|
var seconds = new Date().getTime() - startTime;
|
|
1726
|
-
sessionTime = utilities
|
|
1753
|
+
sessionTime = utilities.getSecondsAsHHMMSS(seconds / 1000);
|
|
1727
1754
|
}
|
|
1728
|
-
return utilities
|
|
1755
|
+
return utilities.addHHMMSSTimeStrings(this._total_time, sessionTime, new RegExp(regex.scorm12_regex.CMITimespan));
|
|
1729
1756
|
};
|
|
1730
1757
|
CMICore.prototype.toJSON = function () {
|
|
1731
1758
|
this.jsonString = true;
|
|
@@ -1745,7 +1772,7 @@ var CMICore = (function (_super) {
|
|
|
1745
1772
|
return result;
|
|
1746
1773
|
};
|
|
1747
1774
|
return CMICore;
|
|
1748
|
-
}(base_cmi
|
|
1775
|
+
}(base_cmi.BaseCMI));
|
|
1749
1776
|
|
|
1750
1777
|
|
|
1751
1778
|
// EXTERNAL MODULE: ./src/cmi/scorm12/objectives.ts
|
|
@@ -1770,7 +1797,7 @@ var interactions = __webpack_require__(833);
|
|
|
1770
1797
|
|
|
1771
1798
|
|
|
1772
1799
|
var CMI = (function (_super) {
|
|
1773
|
-
(0,tslib_es6
|
|
1800
|
+
(0,tslib_es6.__extends)(CMI, _super);
|
|
1774
1801
|
function CMI(cmi_children, student_data, initialized) {
|
|
1775
1802
|
var _this = _super.call(this) || this;
|
|
1776
1803
|
_this.__children = "";
|
|
@@ -1782,14 +1809,25 @@ var CMI = (function (_super) {
|
|
|
1782
1809
|
_this.initialize();
|
|
1783
1810
|
_this.__children = cmi_children
|
|
1784
1811
|
? cmi_children
|
|
1785
|
-
: api_constants
|
|
1812
|
+
: api_constants.scorm12_constants.cmi_children;
|
|
1786
1813
|
_this.core = new CMICore();
|
|
1787
|
-
_this.objectives = new objectives
|
|
1788
|
-
_this.student_data = student_data ? student_data : new scorm12_student_data
|
|
1789
|
-
_this.student_preference = new student_preference
|
|
1790
|
-
_this.interactions = new interactions
|
|
1814
|
+
_this.objectives = new objectives.CMIObjectives();
|
|
1815
|
+
_this.student_data = student_data ? student_data : new scorm12_student_data.CMIStudentData();
|
|
1816
|
+
_this.student_preference = new student_preference.CMIStudentPreference();
|
|
1817
|
+
_this.interactions = new interactions.CMIInteractions();
|
|
1791
1818
|
return _this;
|
|
1792
1819
|
}
|
|
1820
|
+
CMI.prototype.reset = function () {
|
|
1821
|
+
var _a, _b, _c;
|
|
1822
|
+
this._initialized = false;
|
|
1823
|
+
this._launch_data = "";
|
|
1824
|
+
this._comments = "";
|
|
1825
|
+
(_a = this.core) === null || _a === void 0 ? void 0 : _a.reset();
|
|
1826
|
+
this.objectives = new objectives.CMIObjectives();
|
|
1827
|
+
this.interactions = new interactions.CMIInteractions();
|
|
1828
|
+
(_b = this.student_data) === null || _b === void 0 ? void 0 : _b.reset();
|
|
1829
|
+
(_c = this.student_preference) === null || _c === void 0 ? void 0 : _c.reset();
|
|
1830
|
+
};
|
|
1793
1831
|
CMI.prototype.initialize = function () {
|
|
1794
1832
|
var _a, _b, _c, _d, _e;
|
|
1795
1833
|
_super.prototype.initialize.call(this);
|
|
@@ -1820,7 +1858,7 @@ var CMI = (function (_super) {
|
|
|
1820
1858
|
return this.__version;
|
|
1821
1859
|
},
|
|
1822
1860
|
set: function (_version) {
|
|
1823
|
-
throw new
|
|
1861
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.INVALID_SET_VALUE);
|
|
1824
1862
|
},
|
|
1825
1863
|
enumerable: false,
|
|
1826
1864
|
configurable: true
|
|
@@ -1830,7 +1868,7 @@ var CMI = (function (_super) {
|
|
|
1830
1868
|
return this.__children;
|
|
1831
1869
|
},
|
|
1832
1870
|
set: function (_children) {
|
|
1833
|
-
throw new
|
|
1871
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.INVALID_SET_VALUE);
|
|
1834
1872
|
},
|
|
1835
1873
|
enumerable: false,
|
|
1836
1874
|
configurable: true
|
|
@@ -1854,7 +1892,7 @@ var CMI = (function (_super) {
|
|
|
1854
1892
|
},
|
|
1855
1893
|
set: function (launch_data) {
|
|
1856
1894
|
if (this.initialized) {
|
|
1857
|
-
throw new
|
|
1895
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1858
1896
|
}
|
|
1859
1897
|
else {
|
|
1860
1898
|
this._launch_data = launch_data;
|
|
@@ -1868,7 +1906,7 @@ var CMI = (function (_super) {
|
|
|
1868
1906
|
return this._comments;
|
|
1869
1907
|
},
|
|
1870
1908
|
set: function (comments) {
|
|
1871
|
-
if ((0,validation
|
|
1909
|
+
if ((0,validation.check12ValidFormat)(comments, regex.scorm12_regex.CMIString4096, true)) {
|
|
1872
1910
|
this._comments = comments;
|
|
1873
1911
|
}
|
|
1874
1912
|
},
|
|
@@ -1881,7 +1919,7 @@ var CMI = (function (_super) {
|
|
|
1881
1919
|
},
|
|
1882
1920
|
set: function (comments_from_lms) {
|
|
1883
1921
|
if (this.initialized) {
|
|
1884
|
-
throw new
|
|
1922
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1885
1923
|
}
|
|
1886
1924
|
else {
|
|
1887
1925
|
this._comments_from_lms = comments_from_lms;
|
|
@@ -1894,7 +1932,7 @@ var CMI = (function (_super) {
|
|
|
1894
1932
|
return this.core.getCurrentTotalTime(this.start_time);
|
|
1895
1933
|
};
|
|
1896
1934
|
return CMI;
|
|
1897
|
-
}(base_cmi
|
|
1935
|
+
}(base_cmi.BaseRootCMI));
|
|
1898
1936
|
|
|
1899
1937
|
|
|
1900
1938
|
|
|
@@ -1903,17 +1941,18 @@ var CMI = (function (_super) {
|
|
|
1903
1941
|
/***/ 833:
|
|
1904
1942
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1905
1943
|
|
|
1944
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1906
1945
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1907
|
-
/* harmony export */
|
|
1908
|
-
/* harmony export */
|
|
1909
|
-
/* harmony export */
|
|
1910
|
-
/* harmony export */
|
|
1946
|
+
/* harmony export */ CMIInteractions: function() { return /* binding */ CMIInteractions; },
|
|
1947
|
+
/* harmony export */ CMIInteractionsCorrectResponsesObject: function() { return /* binding */ CMIInteractionsCorrectResponsesObject; },
|
|
1948
|
+
/* harmony export */ CMIInteractionsObject: function() { return /* binding */ CMIInteractionsObject; },
|
|
1949
|
+
/* harmony export */ CMIInteractionsObjectivesObject: function() { return /* binding */ CMIInteractionsObjectivesObject; }
|
|
1911
1950
|
/* harmony export */ });
|
|
1912
1951
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(635);
|
|
1913
1952
|
/* harmony import */ var _common_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(589);
|
|
1914
1953
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
1915
1954
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(797);
|
|
1916
|
-
/* harmony import */ var
|
|
1955
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(179);
|
|
1917
1956
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(319);
|
|
1918
1957
|
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(915);
|
|
1919
1958
|
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(417);
|
|
@@ -1926,19 +1965,19 @@ var CMI = (function (_super) {
|
|
|
1926
1965
|
|
|
1927
1966
|
|
|
1928
1967
|
var CMIInteractions = (function (_super) {
|
|
1929
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
1968
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractions, _super);
|
|
1930
1969
|
function CMIInteractions() {
|
|
1931
1970
|
return _super.call(this, {
|
|
1932
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
1933
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__
|
|
1934
|
-
errorClass:
|
|
1971
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.interactions_children,
|
|
1972
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.INVALID_SET_VALUE,
|
|
1973
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError,
|
|
1935
1974
|
}) || this;
|
|
1936
1975
|
}
|
|
1937
1976
|
return CMIInteractions;
|
|
1938
|
-
}(_common_array__WEBPACK_IMPORTED_MODULE_0__
|
|
1977
|
+
}(_common_array__WEBPACK_IMPORTED_MODULE_0__.CMIArray));
|
|
1939
1978
|
|
|
1940
1979
|
var CMIInteractionsObject = (function (_super) {
|
|
1941
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
1980
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractionsObject, _super);
|
|
1942
1981
|
function CMIInteractionsObject() {
|
|
1943
1982
|
var _this = _super.call(this) || this;
|
|
1944
1983
|
_this._id = "";
|
|
@@ -1948,15 +1987,15 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1948
1987
|
_this._student_response = "";
|
|
1949
1988
|
_this._result = "";
|
|
1950
1989
|
_this._latency = "";
|
|
1951
|
-
_this.objectives = new _common_array__WEBPACK_IMPORTED_MODULE_0__
|
|
1952
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__
|
|
1953
|
-
errorClass:
|
|
1954
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
1990
|
+
_this.objectives = new _common_array__WEBPACK_IMPORTED_MODULE_0__.CMIArray({
|
|
1991
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.INVALID_SET_VALUE,
|
|
1992
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError,
|
|
1993
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.objectives_children,
|
|
1955
1994
|
});
|
|
1956
|
-
_this.correct_responses = new _common_array__WEBPACK_IMPORTED_MODULE_0__
|
|
1957
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__
|
|
1958
|
-
errorClass:
|
|
1959
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
1995
|
+
_this.correct_responses = new _common_array__WEBPACK_IMPORTED_MODULE_0__.CMIArray({
|
|
1996
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.INVALID_SET_VALUE,
|
|
1997
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError,
|
|
1998
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.correct_responses_children,
|
|
1960
1999
|
});
|
|
1961
2000
|
return _this;
|
|
1962
2001
|
}
|
|
@@ -1966,15 +2005,28 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1966
2005
|
(_a = this.objectives) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
1967
2006
|
(_b = this.correct_responses) === null || _b === void 0 ? void 0 : _b.initialize();
|
|
1968
2007
|
};
|
|
2008
|
+
CMIInteractionsObject.prototype.reset = function () {
|
|
2009
|
+
var _a, _b;
|
|
2010
|
+
this._initialized = false;
|
|
2011
|
+
this._id = "";
|
|
2012
|
+
this._time = "";
|
|
2013
|
+
this._type = "";
|
|
2014
|
+
this._weighting = "";
|
|
2015
|
+
this._student_response = "";
|
|
2016
|
+
this._result = "";
|
|
2017
|
+
this._latency = "";
|
|
2018
|
+
(_a = this.objectives) === null || _a === void 0 ? void 0 : _a.reset();
|
|
2019
|
+
(_b = this.correct_responses) === null || _b === void 0 ? void 0 : _b.reset();
|
|
2020
|
+
};
|
|
1969
2021
|
Object.defineProperty(CMIInteractionsObject.prototype, "id", {
|
|
1970
2022
|
get: function () {
|
|
1971
2023
|
if (!this.jsonString) {
|
|
1972
|
-
throw new
|
|
2024
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1973
2025
|
}
|
|
1974
2026
|
return this._id;
|
|
1975
2027
|
},
|
|
1976
2028
|
set: function (id) {
|
|
1977
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2029
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(id, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIIdentifier)) {
|
|
1978
2030
|
this._id = id;
|
|
1979
2031
|
}
|
|
1980
2032
|
},
|
|
@@ -1984,12 +2036,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1984
2036
|
Object.defineProperty(CMIInteractionsObject.prototype, "time", {
|
|
1985
2037
|
get: function () {
|
|
1986
2038
|
if (!this.jsonString) {
|
|
1987
|
-
throw new
|
|
2039
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1988
2040
|
}
|
|
1989
2041
|
return this._time;
|
|
1990
2042
|
},
|
|
1991
2043
|
set: function (time) {
|
|
1992
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2044
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(time, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMITime)) {
|
|
1993
2045
|
this._time = time;
|
|
1994
2046
|
}
|
|
1995
2047
|
},
|
|
@@ -1999,12 +2051,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1999
2051
|
Object.defineProperty(CMIInteractionsObject.prototype, "type", {
|
|
2000
2052
|
get: function () {
|
|
2001
2053
|
if (!this.jsonString) {
|
|
2002
|
-
throw new
|
|
2054
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2003
2055
|
}
|
|
2004
2056
|
return this._type;
|
|
2005
2057
|
},
|
|
2006
2058
|
set: function (type) {
|
|
2007
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2059
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(type, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIType)) {
|
|
2008
2060
|
this._type = type;
|
|
2009
2061
|
}
|
|
2010
2062
|
},
|
|
@@ -2014,13 +2066,13 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2014
2066
|
Object.defineProperty(CMIInteractionsObject.prototype, "weighting", {
|
|
2015
2067
|
get: function () {
|
|
2016
2068
|
if (!this.jsonString) {
|
|
2017
|
-
throw new
|
|
2069
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2018
2070
|
}
|
|
2019
2071
|
return this._weighting;
|
|
2020
2072
|
},
|
|
2021
2073
|
set: function (weighting) {
|
|
2022
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2023
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2074
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(weighting, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIDecimal) &&
|
|
2075
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidRange)(weighting, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.weighting_range)) {
|
|
2024
2076
|
this._weighting = weighting;
|
|
2025
2077
|
}
|
|
2026
2078
|
},
|
|
@@ -2030,12 +2082,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2030
2082
|
Object.defineProperty(CMIInteractionsObject.prototype, "student_response", {
|
|
2031
2083
|
get: function () {
|
|
2032
2084
|
if (!this.jsonString) {
|
|
2033
|
-
throw new
|
|
2085
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2034
2086
|
}
|
|
2035
2087
|
return this._student_response;
|
|
2036
2088
|
},
|
|
2037
2089
|
set: function (student_response) {
|
|
2038
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2090
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(student_response, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIFeedback, true)) {
|
|
2039
2091
|
this._student_response = student_response;
|
|
2040
2092
|
}
|
|
2041
2093
|
},
|
|
@@ -2045,12 +2097,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2045
2097
|
Object.defineProperty(CMIInteractionsObject.prototype, "result", {
|
|
2046
2098
|
get: function () {
|
|
2047
2099
|
if (!this.jsonString) {
|
|
2048
|
-
throw new
|
|
2100
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2049
2101
|
}
|
|
2050
2102
|
return this._result;
|
|
2051
2103
|
},
|
|
2052
2104
|
set: function (result) {
|
|
2053
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2105
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(result, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIResult)) {
|
|
2054
2106
|
this._result = result;
|
|
2055
2107
|
}
|
|
2056
2108
|
},
|
|
@@ -2060,12 +2112,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2060
2112
|
Object.defineProperty(CMIInteractionsObject.prototype, "latency", {
|
|
2061
2113
|
get: function () {
|
|
2062
2114
|
if (!this.jsonString) {
|
|
2063
|
-
throw new
|
|
2115
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2064
2116
|
}
|
|
2065
2117
|
return this._latency;
|
|
2066
2118
|
},
|
|
2067
2119
|
set: function (latency) {
|
|
2068
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2120
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(latency, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMITimespan)) {
|
|
2069
2121
|
this._latency = latency;
|
|
2070
2122
|
}
|
|
2071
2123
|
},
|
|
@@ -2089,21 +2141,25 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2089
2141
|
return result;
|
|
2090
2142
|
};
|
|
2091
2143
|
return CMIInteractionsObject;
|
|
2092
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__
|
|
2144
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__.BaseCMI));
|
|
2093
2145
|
|
|
2094
2146
|
var CMIInteractionsObjectivesObject = (function (_super) {
|
|
2095
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
2147
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractionsObjectivesObject, _super);
|
|
2096
2148
|
function CMIInteractionsObjectivesObject() {
|
|
2097
2149
|
var _this = _super.call(this) || this;
|
|
2098
2150
|
_this._id = "";
|
|
2099
2151
|
return _this;
|
|
2100
2152
|
}
|
|
2153
|
+
CMIInteractionsObjectivesObject.prototype.reset = function () {
|
|
2154
|
+
this._initialized = false;
|
|
2155
|
+
this._id = "";
|
|
2156
|
+
};
|
|
2101
2157
|
Object.defineProperty(CMIInteractionsObjectivesObject.prototype, "id", {
|
|
2102
2158
|
get: function () {
|
|
2103
2159
|
return this._id;
|
|
2104
2160
|
},
|
|
2105
2161
|
set: function (id) {
|
|
2106
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2162
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(id, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIIdentifier)) {
|
|
2107
2163
|
this._id = id;
|
|
2108
2164
|
}
|
|
2109
2165
|
},
|
|
@@ -2119,24 +2175,28 @@ var CMIInteractionsObjectivesObject = (function (_super) {
|
|
|
2119
2175
|
return result;
|
|
2120
2176
|
};
|
|
2121
2177
|
return CMIInteractionsObjectivesObject;
|
|
2122
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__
|
|
2178
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__.BaseCMI));
|
|
2123
2179
|
|
|
2124
2180
|
var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
2125
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
2181
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractionsCorrectResponsesObject, _super);
|
|
2126
2182
|
function CMIInteractionsCorrectResponsesObject() {
|
|
2127
2183
|
var _this = _super.call(this) || this;
|
|
2128
2184
|
_this._pattern = "";
|
|
2129
2185
|
return _this;
|
|
2130
2186
|
}
|
|
2187
|
+
CMIInteractionsCorrectResponsesObject.prototype.reset = function () {
|
|
2188
|
+
this._initialized = false;
|
|
2189
|
+
this._pattern = "";
|
|
2190
|
+
};
|
|
2131
2191
|
Object.defineProperty(CMIInteractionsCorrectResponsesObject.prototype, "pattern", {
|
|
2132
2192
|
get: function () {
|
|
2133
2193
|
if (!this.jsonString) {
|
|
2134
|
-
throw new
|
|
2194
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2135
2195
|
}
|
|
2136
2196
|
return this._pattern;
|
|
2137
2197
|
},
|
|
2138
2198
|
set: function (pattern) {
|
|
2139
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2199
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(pattern, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIFeedback, true)) {
|
|
2140
2200
|
this._pattern = pattern;
|
|
2141
2201
|
}
|
|
2142
2202
|
},
|
|
@@ -2152,7 +2212,7 @@ var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
|
2152
2212
|
return result;
|
|
2153
2213
|
};
|
|
2154
2214
|
return CMIInteractionsCorrectResponsesObject;
|
|
2155
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__
|
|
2215
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__.BaseCMI));
|
|
2156
2216
|
|
|
2157
2217
|
|
|
2158
2218
|
|
|
@@ -2161,8 +2221,9 @@ var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
|
2161
2221
|
/***/ 331:
|
|
2162
2222
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2163
2223
|
|
|
2224
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2164
2225
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2165
|
-
/* harmony export */
|
|
2226
|
+
/* harmony export */ NAV: function() { return /* binding */ NAV; }
|
|
2166
2227
|
/* harmony export */ });
|
|
2167
2228
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(635);
|
|
2168
2229
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
@@ -2173,18 +2234,22 @@ var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
|
2173
2234
|
|
|
2174
2235
|
|
|
2175
2236
|
var NAV = (function (_super) {
|
|
2176
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_3__
|
|
2237
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(NAV, _super);
|
|
2177
2238
|
function NAV() {
|
|
2178
2239
|
var _this = _super.call(this) || this;
|
|
2179
2240
|
_this._event = "";
|
|
2180
2241
|
return _this;
|
|
2181
2242
|
}
|
|
2243
|
+
NAV.prototype.reset = function () {
|
|
2244
|
+
this._event = "";
|
|
2245
|
+
this._initialized = false;
|
|
2246
|
+
};
|
|
2182
2247
|
Object.defineProperty(NAV.prototype, "event", {
|
|
2183
2248
|
get: function () {
|
|
2184
2249
|
return this._event;
|
|
2185
2250
|
},
|
|
2186
2251
|
set: function (event) {
|
|
2187
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_1__
|
|
2252
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_1__.check12ValidFormat)(event, _constants_regex__WEBPACK_IMPORTED_MODULE_2__.scorm12_regex.NAVEvent)) {
|
|
2188
2253
|
this._event = event;
|
|
2189
2254
|
}
|
|
2190
2255
|
},
|
|
@@ -2200,7 +2265,7 @@ var NAV = (function (_super) {
|
|
|
2200
2265
|
return result;
|
|
2201
2266
|
};
|
|
2202
2267
|
return NAV;
|
|
2203
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2268
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2204
2269
|
|
|
2205
2270
|
|
|
2206
2271
|
|
|
@@ -2209,9 +2274,10 @@ var NAV = (function (_super) {
|
|
|
2209
2274
|
/***/ 176:
|
|
2210
2275
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2211
2276
|
|
|
2277
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2212
2278
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2213
|
-
/* harmony export */
|
|
2214
|
-
/* harmony export */
|
|
2279
|
+
/* harmony export */ CMIObjectives: function() { return /* binding */ CMIObjectives; },
|
|
2280
|
+
/* harmony export */ CMIObjectivesObject: function() { return /* binding */ CMIObjectivesObject; }
|
|
2215
2281
|
/* harmony export */ });
|
|
2216
2282
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(635);
|
|
2217
2283
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
@@ -2219,7 +2285,7 @@ var NAV = (function (_super) {
|
|
|
2219
2285
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(340);
|
|
2220
2286
|
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(417);
|
|
2221
2287
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(797);
|
|
2222
|
-
/* harmony import */ var
|
|
2288
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(179);
|
|
2223
2289
|
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(915);
|
|
2224
2290
|
/* harmony import */ var _common_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(589);
|
|
2225
2291
|
|
|
@@ -2232,39 +2298,46 @@ var NAV = (function (_super) {
|
|
|
2232
2298
|
|
|
2233
2299
|
|
|
2234
2300
|
var CMIObjectives = (function (_super) {
|
|
2235
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_8__
|
|
2301
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(CMIObjectives, _super);
|
|
2236
2302
|
function CMIObjectives() {
|
|
2237
2303
|
return _super.call(this, {
|
|
2238
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
2239
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2240
|
-
errorClass:
|
|
2304
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.objectives_children,
|
|
2305
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.INVALID_SET_VALUE,
|
|
2306
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_5__.Scorm12ValidationError,
|
|
2241
2307
|
}) || this;
|
|
2242
2308
|
}
|
|
2243
2309
|
return CMIObjectives;
|
|
2244
|
-
}(_common_array__WEBPACK_IMPORTED_MODULE_7__
|
|
2310
|
+
}(_common_array__WEBPACK_IMPORTED_MODULE_7__.CMIArray));
|
|
2245
2311
|
|
|
2246
2312
|
var CMIObjectivesObject = (function (_super) {
|
|
2247
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_8__
|
|
2313
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(CMIObjectivesObject, _super);
|
|
2248
2314
|
function CMIObjectivesObject() {
|
|
2249
2315
|
var _this = _super.call(this) || this;
|
|
2250
2316
|
_this._id = "";
|
|
2251
2317
|
_this._status = "";
|
|
2252
|
-
_this.score = new _common_score__WEBPACK_IMPORTED_MODULE_1__
|
|
2253
|
-
score_children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
2254
|
-
score_range: _constants_regex__WEBPACK_IMPORTED_MODULE_3__
|
|
2255
|
-
invalidErrorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2256
|
-
invalidTypeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2257
|
-
invalidRangeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2258
|
-
errorClass:
|
|
2318
|
+
_this.score = new _common_score__WEBPACK_IMPORTED_MODULE_1__.CMIScore({
|
|
2319
|
+
score_children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.score_children,
|
|
2320
|
+
score_range: _constants_regex__WEBPACK_IMPORTED_MODULE_3__.scorm12_regex.score_range,
|
|
2321
|
+
invalidErrorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.INVALID_SET_VALUE,
|
|
2322
|
+
invalidTypeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.TYPE_MISMATCH,
|
|
2323
|
+
invalidRangeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
2324
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_5__.Scorm12ValidationError,
|
|
2259
2325
|
});
|
|
2260
2326
|
return _this;
|
|
2261
2327
|
}
|
|
2328
|
+
CMIObjectivesObject.prototype.reset = function () {
|
|
2329
|
+
var _a;
|
|
2330
|
+
this._initialized = false;
|
|
2331
|
+
this._id = "";
|
|
2332
|
+
this._status = "";
|
|
2333
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
2334
|
+
};
|
|
2262
2335
|
Object.defineProperty(CMIObjectivesObject.prototype, "id", {
|
|
2263
2336
|
get: function () {
|
|
2264
2337
|
return this._id;
|
|
2265
2338
|
},
|
|
2266
2339
|
set: function (id) {
|
|
2267
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__
|
|
2340
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__.check12ValidFormat)(id, _constants_regex__WEBPACK_IMPORTED_MODULE_3__.scorm12_regex.CMIIdentifier)) {
|
|
2268
2341
|
this._id = id;
|
|
2269
2342
|
}
|
|
2270
2343
|
},
|
|
@@ -2276,7 +2349,7 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2276
2349
|
return this._status;
|
|
2277
2350
|
},
|
|
2278
2351
|
set: function (status) {
|
|
2279
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__
|
|
2352
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__.check12ValidFormat)(status, _constants_regex__WEBPACK_IMPORTED_MODULE_3__.scorm12_regex.CMIStatus2)) {
|
|
2280
2353
|
this._status = status;
|
|
2281
2354
|
}
|
|
2282
2355
|
},
|
|
@@ -2294,7 +2367,7 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2294
2367
|
return result;
|
|
2295
2368
|
};
|
|
2296
2369
|
return CMIObjectivesObject;
|
|
2297
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2370
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2298
2371
|
|
|
2299
2372
|
|
|
2300
2373
|
|
|
@@ -2303,13 +2376,14 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2303
2376
|
/***/ 532:
|
|
2304
2377
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2305
2378
|
|
|
2379
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2306
2380
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2307
|
-
/* harmony export */
|
|
2381
|
+
/* harmony export */ CMIStudentData: function() { return /* binding */ CMIStudentData; }
|
|
2308
2382
|
/* harmony export */ });
|
|
2309
2383
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(635);
|
|
2310
2384
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
2311
2385
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
2312
|
-
/* harmony import */ var
|
|
2386
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(179);
|
|
2313
2387
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(797);
|
|
2314
2388
|
|
|
2315
2389
|
|
|
@@ -2317,7 +2391,7 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2317
2391
|
|
|
2318
2392
|
|
|
2319
2393
|
var CMIStudentData = (function (_super) {
|
|
2320
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_4__
|
|
2394
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(CMIStudentData, _super);
|
|
2321
2395
|
function CMIStudentData(student_data_children) {
|
|
2322
2396
|
var _this = _super.call(this) || this;
|
|
2323
2397
|
_this._mastery_score = "";
|
|
@@ -2325,15 +2399,18 @@ var CMIStudentData = (function (_super) {
|
|
|
2325
2399
|
_this._time_limit_action = "";
|
|
2326
2400
|
_this.__children = student_data_children
|
|
2327
2401
|
? student_data_children
|
|
2328
|
-
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
2402
|
+
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.student_data_children;
|
|
2329
2403
|
return _this;
|
|
2330
2404
|
}
|
|
2405
|
+
CMIStudentData.prototype.reset = function () {
|
|
2406
|
+
this._initialized = false;
|
|
2407
|
+
};
|
|
2331
2408
|
Object.defineProperty(CMIStudentData.prototype, "_children", {
|
|
2332
2409
|
get: function () {
|
|
2333
2410
|
return this.__children;
|
|
2334
2411
|
},
|
|
2335
2412
|
set: function (_children) {
|
|
2336
|
-
throw new
|
|
2413
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.INVALID_SET_VALUE);
|
|
2337
2414
|
},
|
|
2338
2415
|
enumerable: false,
|
|
2339
2416
|
configurable: true
|
|
@@ -2344,7 +2421,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2344
2421
|
},
|
|
2345
2422
|
set: function (mastery_score) {
|
|
2346
2423
|
if (this.initialized) {
|
|
2347
|
-
throw new
|
|
2424
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.READ_ONLY_ELEMENT);
|
|
2348
2425
|
}
|
|
2349
2426
|
else {
|
|
2350
2427
|
this._mastery_score = mastery_score;
|
|
@@ -2359,7 +2436,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2359
2436
|
},
|
|
2360
2437
|
set: function (max_time_allowed) {
|
|
2361
2438
|
if (this.initialized) {
|
|
2362
|
-
throw new
|
|
2439
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.READ_ONLY_ELEMENT);
|
|
2363
2440
|
}
|
|
2364
2441
|
else {
|
|
2365
2442
|
this._max_time_allowed = max_time_allowed;
|
|
@@ -2374,7 +2451,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2374
2451
|
},
|
|
2375
2452
|
set: function (time_limit_action) {
|
|
2376
2453
|
if (this.initialized) {
|
|
2377
|
-
throw new
|
|
2454
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.READ_ONLY_ELEMENT);
|
|
2378
2455
|
}
|
|
2379
2456
|
else {
|
|
2380
2457
|
this._time_limit_action = time_limit_action;
|
|
@@ -2394,7 +2471,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2394
2471
|
return result;
|
|
2395
2472
|
};
|
|
2396
2473
|
return CMIStudentData;
|
|
2397
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2474
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2398
2475
|
|
|
2399
2476
|
|
|
2400
2477
|
|
|
@@ -2403,16 +2480,17 @@ var CMIStudentData = (function (_super) {
|
|
|
2403
2480
|
/***/ 181:
|
|
2404
2481
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2405
2482
|
|
|
2483
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2406
2484
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2407
|
-
/* harmony export */
|
|
2485
|
+
/* harmony export */ CMIStudentPreference: function() { return /* binding */ CMIStudentPreference; }
|
|
2408
2486
|
/* harmony export */ });
|
|
2409
2487
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(635);
|
|
2410
2488
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
2411
2489
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
2412
|
-
/* harmony import */ var
|
|
2413
|
-
/* harmony import */ var
|
|
2414
|
-
/* harmony import */ var
|
|
2415
|
-
/* harmony import */ var
|
|
2490
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(179);
|
|
2491
|
+
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(915);
|
|
2492
|
+
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(417);
|
|
2493
|
+
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(797);
|
|
2416
2494
|
|
|
2417
2495
|
|
|
2418
2496
|
|
|
@@ -2421,7 +2499,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2421
2499
|
|
|
2422
2500
|
|
|
2423
2501
|
var CMIStudentPreference = (function (_super) {
|
|
2424
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_6__
|
|
2502
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(CMIStudentPreference, _super);
|
|
2425
2503
|
function CMIStudentPreference(student_preference_children) {
|
|
2426
2504
|
var _this = _super.call(this) || this;
|
|
2427
2505
|
_this._audio = "";
|
|
@@ -2430,15 +2508,18 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2430
2508
|
_this._text = "";
|
|
2431
2509
|
_this.__children = student_preference_children
|
|
2432
2510
|
? student_preference_children
|
|
2433
|
-
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
2511
|
+
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.student_preference_children;
|
|
2434
2512
|
return _this;
|
|
2435
2513
|
}
|
|
2514
|
+
CMIStudentPreference.prototype.reset = function () {
|
|
2515
|
+
this._initialized = false;
|
|
2516
|
+
};
|
|
2436
2517
|
Object.defineProperty(CMIStudentPreference.prototype, "_children", {
|
|
2437
2518
|
get: function () {
|
|
2438
2519
|
return this.__children;
|
|
2439
2520
|
},
|
|
2440
2521
|
set: function (_children) {
|
|
2441
|
-
throw new
|
|
2522
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_5__.scorm12_errors.INVALID_SET_VALUE);
|
|
2442
2523
|
},
|
|
2443
2524
|
enumerable: false,
|
|
2444
2525
|
configurable: true
|
|
@@ -2448,8 +2529,8 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2448
2529
|
return this._audio;
|
|
2449
2530
|
},
|
|
2450
2531
|
set: function (audio) {
|
|
2451
|
-
if ((0,
|
|
2452
|
-
(0,
|
|
2532
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(audio, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMISInteger) &&
|
|
2533
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidRange)(audio, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.audio_range)) {
|
|
2453
2534
|
this._audio = audio;
|
|
2454
2535
|
}
|
|
2455
2536
|
},
|
|
@@ -2461,7 +2542,7 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2461
2542
|
return this._language;
|
|
2462
2543
|
},
|
|
2463
2544
|
set: function (language) {
|
|
2464
|
-
if ((0,
|
|
2545
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(language, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMIString256)) {
|
|
2465
2546
|
this._language = language;
|
|
2466
2547
|
}
|
|
2467
2548
|
},
|
|
@@ -2473,8 +2554,8 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2473
2554
|
return this._speed;
|
|
2474
2555
|
},
|
|
2475
2556
|
set: function (speed) {
|
|
2476
|
-
if ((0,
|
|
2477
|
-
(0,
|
|
2557
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(speed, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMISInteger) &&
|
|
2558
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidRange)(speed, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.speed_range)) {
|
|
2478
2559
|
this._speed = speed;
|
|
2479
2560
|
}
|
|
2480
2561
|
},
|
|
@@ -2486,8 +2567,8 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2486
2567
|
return this._text;
|
|
2487
2568
|
},
|
|
2488
2569
|
set: function (text) {
|
|
2489
|
-
if ((0,
|
|
2490
|
-
(0,
|
|
2570
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(text, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMISInteger) &&
|
|
2571
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidRange)(text, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.text_range)) {
|
|
2491
2572
|
this._text = text;
|
|
2492
2573
|
}
|
|
2493
2574
|
},
|
|
@@ -2506,7 +2587,7 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2506
2587
|
return result;
|
|
2507
2588
|
};
|
|
2508
2589
|
return CMIStudentPreference;
|
|
2509
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2590
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2510
2591
|
|
|
2511
2592
|
|
|
2512
2593
|
|
|
@@ -2515,24 +2596,25 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2515
2596
|
/***/ 915:
|
|
2516
2597
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2517
2598
|
|
|
2599
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2518
2600
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2519
|
-
/* harmony export */
|
|
2520
|
-
/* harmony export */
|
|
2601
|
+
/* harmony export */ check12ValidFormat: function() { return /* binding */ check12ValidFormat; },
|
|
2602
|
+
/* harmony export */ check12ValidRange: function() { return /* binding */ check12ValidRange; }
|
|
2521
2603
|
/* harmony export */ });
|
|
2522
2604
|
/* harmony import */ var _common_validation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(449);
|
|
2523
2605
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
|
|
2524
|
-
/* harmony import */ var
|
|
2606
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
|
|
2525
2607
|
|
|
2526
2608
|
|
|
2527
2609
|
|
|
2528
2610
|
function check12ValidFormat(value, regexPattern, allowEmptyString) {
|
|
2529
|
-
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__
|
|
2611
|
+
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__.checkValidFormat)(value, regexPattern, _constants_error_codes__WEBPACK_IMPORTED_MODULE_0__.scorm12_errors.TYPE_MISMATCH, _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__.Scorm12ValidationError, allowEmptyString);
|
|
2530
2612
|
}
|
|
2531
2613
|
function check12ValidRange(value, rangePattern, allowEmptyString) {
|
|
2532
2614
|
if (!allowEmptyString && value === "") {
|
|
2533
|
-
throw new
|
|
2615
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_0__.scorm12_errors.VALUE_OUT_OF_RANGE);
|
|
2534
2616
|
}
|
|
2535
|
-
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__
|
|
2617
|
+
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__.checkValidRange)(value, rangePattern, _constants_error_codes__WEBPACK_IMPORTED_MODULE_0__.scorm12_errors.VALUE_OUT_OF_RANGE, _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__.Scorm12ValidationError);
|
|
2536
2618
|
}
|
|
2537
2619
|
|
|
2538
2620
|
|
|
@@ -2541,16 +2623,23 @@ function check12ValidRange(value, rangePattern, allowEmptyString) {
|
|
|
2541
2623
|
/***/ 340:
|
|
2542
2624
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2543
2625
|
|
|
2626
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2627
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2628
|
+
/* harmony export */ aicc_constants: function() { return /* binding */ aicc_constants; },
|
|
2629
|
+
/* harmony export */ global_constants: function() { return /* binding */ global_constants; },
|
|
2630
|
+
/* harmony export */ scorm12_constants: function() { return /* binding */ scorm12_constants; },
|
|
2631
|
+
/* harmony export */ scorm2004_constants: function() { return /* binding */ scorm2004_constants; }
|
|
2632
|
+
/* harmony export */ });
|
|
2544
2633
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2545
2634
|
|
|
2546
|
-
var
|
|
2635
|
+
var global_constants = {
|
|
2547
2636
|
SCORM_TRUE: "true",
|
|
2548
2637
|
SCORM_FALSE: "false",
|
|
2549
2638
|
STATE_NOT_INITIALIZED: 0,
|
|
2550
2639
|
STATE_INITIALIZED: 1,
|
|
2551
2640
|
STATE_TERMINATED: 2,
|
|
2552
2641
|
};
|
|
2553
|
-
var
|
|
2642
|
+
var scorm12_constants = {
|
|
2554
2643
|
cmi_children: "core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions",
|
|
2555
2644
|
core_children: "student_id,student_name,lesson_location,credit,lesson_status,entry,score,total_time,lesson_mode,exit,session_time",
|
|
2556
2645
|
score_children: "raw,min,max",
|
|
@@ -2611,7 +2700,7 @@ var scorm12 = {
|
|
|
2611
2700
|
},
|
|
2612
2701
|
},
|
|
2613
2702
|
};
|
|
2614
|
-
var
|
|
2703
|
+
var aicc_constants = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, scorm12_constants), {
|
|
2615
2704
|
cmi_children: "core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions,evaluation",
|
|
2616
2705
|
student_preference_children: "audio,language,lesson_type,speed,text,text_color,text_location,text_size,video,windows",
|
|
2617
2706
|
student_data_children: "attempt_number,tries,mastery_score,max_time_allowed,time_limit_action",
|
|
@@ -2620,7 +2709,7 @@ var aicc = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .Cl)((0,tslib__W
|
|
|
2620
2709
|
attempt_records_children: "score,lesson_status",
|
|
2621
2710
|
paths_children: "location_id,date,time,status,why_left,time_in_element",
|
|
2622
2711
|
});
|
|
2623
|
-
var
|
|
2712
|
+
var scorm2004_constants = {
|
|
2624
2713
|
cmi_children: "_version,comments_from_learner,comments_from_lms,completion_status,credit,entry,exit,interactions,launch_data,learner_id,learner_name,learner_preference,location,max_time_allowed,mode,objectives,progress_measure,scaled_passing_score,score,session_time,success_status,suspend_data,time_limit_action,total_time",
|
|
2625
2714
|
comments_children: "comment,timestamp,location",
|
|
2626
2715
|
score_children: "max,raw,scaled,min",
|
|
@@ -2629,6 +2718,7 @@ var scorm2004 = {
|
|
|
2629
2718
|
student_data_children: "mastery_score,max_time_allowed,time_limit_action",
|
|
2630
2719
|
student_preference_children: "audio_level,audio_captioning,delivery_speed,language",
|
|
2631
2720
|
interactions_children: "id,type,objectives,timestamp,correct_responses,weighting,learner_response,result,latency,description",
|
|
2721
|
+
adl_data_children: "id,store",
|
|
2632
2722
|
error_descriptions: {
|
|
2633
2723
|
"0": {
|
|
2634
2724
|
basicMessage: "No Error",
|
|
@@ -2736,13 +2826,6 @@ var scorm2004 = {
|
|
|
2736
2826
|
},
|
|
2737
2827
|
},
|
|
2738
2828
|
};
|
|
2739
|
-
var APIConstants = {
|
|
2740
|
-
global: global,
|
|
2741
|
-
scorm12: scorm12,
|
|
2742
|
-
aicc: aicc,
|
|
2743
|
-
scorm2004: scorm2004,
|
|
2744
|
-
};
|
|
2745
|
-
/* harmony default export */ __webpack_exports__.A = (APIConstants);
|
|
2746
2829
|
|
|
2747
2830
|
|
|
2748
2831
|
/***/ }),
|
|
@@ -2750,12 +2833,13 @@ var APIConstants = {
|
|
|
2750
2833
|
/***/ 56:
|
|
2751
2834
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2752
2835
|
|
|
2836
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2753
2837
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2754
|
-
/* harmony export */
|
|
2755
|
-
/* harmony export */
|
|
2756
|
-
/* harmony export */
|
|
2838
|
+
/* harmony export */ CompletionStatus: function() { return /* binding */ CompletionStatus; },
|
|
2839
|
+
/* harmony export */ LogLevelEnum: function() { return /* binding */ LogLevelEnum; },
|
|
2840
|
+
/* harmony export */ NAVBoolean: function() { return /* binding */ NAVBoolean; },
|
|
2841
|
+
/* harmony export */ SuccessStatus: function() { return /* binding */ SuccessStatus; }
|
|
2757
2842
|
/* harmony export */ });
|
|
2758
|
-
/* unused harmony export NAVBoolean */
|
|
2759
2843
|
var NAVBoolean;
|
|
2760
2844
|
(function (NAVBoolean) {
|
|
2761
2845
|
NAVBoolean["unknown"] = "unknown";
|
|
@@ -2790,9 +2874,15 @@ var LogLevelEnum;
|
|
|
2790
2874
|
/***/ 797:
|
|
2791
2875
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2792
2876
|
|
|
2877
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2878
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2879
|
+
/* harmony export */ global_errors: function() { return /* binding */ global_errors; },
|
|
2880
|
+
/* harmony export */ scorm12_errors: function() { return /* binding */ scorm12_errors; },
|
|
2881
|
+
/* harmony export */ scorm2004_errors: function() { return /* binding */ scorm2004_errors; }
|
|
2882
|
+
/* harmony export */ });
|
|
2793
2883
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2794
2884
|
|
|
2795
|
-
var
|
|
2885
|
+
var global_errors = {
|
|
2796
2886
|
GENERAL: 101,
|
|
2797
2887
|
INITIALIZATION_FAILED: 101,
|
|
2798
2888
|
INITIALIZED: 101,
|
|
@@ -2822,13 +2912,8 @@ var global = {
|
|
|
2822
2912
|
VALUE_OUT_OF_RANGE: 101,
|
|
2823
2913
|
DEPENDENCY_NOT_ESTABLISHED: 101,
|
|
2824
2914
|
};
|
|
2825
|
-
var
|
|
2826
|
-
var
|
|
2827
|
-
var ErrorCodes = {
|
|
2828
|
-
scorm12: scorm12,
|
|
2829
|
-
scorm2004: scorm2004,
|
|
2830
|
-
};
|
|
2831
|
-
/* harmony default export */ __webpack_exports__.A = (ErrorCodes);
|
|
2915
|
+
var scorm12_errors = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, global_errors), { RETRIEVE_BEFORE_INIT: 301, STORE_BEFORE_INIT: 301, COMMIT_BEFORE_INIT: 301, ARGUMENT_ERROR: 201, CHILDREN_ERROR: 202, COUNT_ERROR: 203, UNDEFINED_DATA_MODEL: 401, UNIMPLEMENTED_ELEMENT: 401, VALUE_NOT_INITIALIZED: 301, INVALID_SET_VALUE: 402, READ_ONLY_ELEMENT: 403, WRITE_ONLY_ELEMENT: 404, TYPE_MISMATCH: 405, VALUE_OUT_OF_RANGE: 407, DEPENDENCY_NOT_ESTABLISHED: 408 });
|
|
2916
|
+
var scorm2004_errors = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, global_errors), { INITIALIZATION_FAILED: 102, INITIALIZED: 103, TERMINATED: 104, TERMINATION_FAILURE: 111, TERMINATION_BEFORE_INIT: 112, MULTIPLE_TERMINATIONS: 113, RETRIEVE_BEFORE_INIT: 122, RETRIEVE_AFTER_TERM: 123, STORE_BEFORE_INIT: 132, STORE_AFTER_TERM: 133, COMMIT_BEFORE_INIT: 142, COMMIT_AFTER_TERM: 143, ARGUMENT_ERROR: 201, GENERAL_GET_FAILURE: 301, GENERAL_SET_FAILURE: 351, GENERAL_COMMIT_FAILURE: 391, UNDEFINED_DATA_MODEL: 401, UNIMPLEMENTED_ELEMENT: 402, VALUE_NOT_INITIALIZED: 403, READ_ONLY_ELEMENT: 404, WRITE_ONLY_ELEMENT: 405, TYPE_MISMATCH: 406, VALUE_OUT_OF_RANGE: 407, DEPENDENCY_NOT_ESTABLISHED: 408 });
|
|
2832
2917
|
|
|
2833
2918
|
|
|
2834
2919
|
/***/ }),
|
|
@@ -2836,9 +2921,15 @@ var ErrorCodes = {
|
|
|
2836
2921
|
/***/ 417:
|
|
2837
2922
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2838
2923
|
|
|
2924
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2925
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2926
|
+
/* harmony export */ aicc_regex: function() { return /* binding */ aicc_regex; },
|
|
2927
|
+
/* harmony export */ scorm12_regex: function() { return /* binding */ scorm12_regex; },
|
|
2928
|
+
/* harmony export */ scorm2004_regex: function() { return /* binding */ scorm2004_regex; }
|
|
2929
|
+
/* harmony export */ });
|
|
2839
2930
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2840
2931
|
|
|
2841
|
-
var
|
|
2932
|
+
var scorm12_regex = {
|
|
2842
2933
|
CMIString256: "^.{0,255}$",
|
|
2843
2934
|
CMIString4096: "^.{0,4096}$",
|
|
2844
2935
|
CMITime: "^(?:[01]\\d|2[0123]):(?:[012345]\\d):(?:[012345]\\d)$",
|
|
@@ -2861,10 +2952,10 @@ var scorm12 = {
|
|
|
2861
2952
|
weighting_range: "-100#100",
|
|
2862
2953
|
text_range: "-1#1",
|
|
2863
2954
|
};
|
|
2864
|
-
var
|
|
2955
|
+
var aicc_regex = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, scorm12_regex), {
|
|
2865
2956
|
CMIIdentifier: "^\\w{1,255}$",
|
|
2866
2957
|
});
|
|
2867
|
-
var
|
|
2958
|
+
var scorm2004_regex = {
|
|
2868
2959
|
CMIString200: "^[\\u0000-\\uFFFF]{0,200}$",
|
|
2869
2960
|
CMIString250: "^[\\u0000-\\uFFFF]{0,250}$",
|
|
2870
2961
|
CMIString1000: "^[\\u0000-\\uFFFF]{0,1000}$",
|
|
@@ -2900,12 +2991,6 @@ var scorm2004 = {
|
|
|
2900
2991
|
text_range: "-1#1",
|
|
2901
2992
|
progress_range: "0#1",
|
|
2902
2993
|
};
|
|
2903
|
-
var Regex = {
|
|
2904
|
-
aicc: aicc,
|
|
2905
|
-
scorm12: scorm12,
|
|
2906
|
-
scorm2004: scorm2004,
|
|
2907
|
-
};
|
|
2908
|
-
/* harmony default export */ __webpack_exports__.A = (Regex);
|
|
2909
2994
|
|
|
2910
2995
|
|
|
2911
2996
|
/***/ }),
|
|
@@ -2913,22 +2998,15 @@ var Regex = {
|
|
|
2913
2998
|
/***/ 784:
|
|
2914
2999
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2915
3000
|
|
|
3001
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2916
3002
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2917
|
-
/* harmony export */
|
|
2918
|
-
/* harmony export */
|
|
2919
|
-
/* harmony export */ tQ: function() { return /* binding */ Scorm12ValidationError; },
|
|
2920
|
-
/* harmony export */ yI: function() { return /* binding */ ValidationError; }
|
|
3003
|
+
/* harmony export */ BaseScormValidationError: function() { return /* binding */ BaseScormValidationError; },
|
|
3004
|
+
/* harmony export */ ValidationError: function() { return /* binding */ ValidationError; }
|
|
2921
3005
|
/* harmony export */ });
|
|
2922
|
-
/*
|
|
2923
|
-
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(635);
|
|
2924
|
-
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(340);
|
|
2925
|
-
|
|
3006
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2926
3007
|
|
|
2927
|
-
var scorm12_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.scorm12.error_descriptions;
|
|
2928
|
-
var aicc_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.aicc.error_descriptions;
|
|
2929
|
-
var scorm2004_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.scorm2004.error_descriptions;
|
|
2930
3008
|
var BaseScormValidationError = (function (_super) {
|
|
2931
|
-
(0,
|
|
3009
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(BaseScormValidationError, _super);
|
|
2932
3010
|
function BaseScormValidationError(errorCode) {
|
|
2933
3011
|
var _this = _super.call(this, errorCode.toString()) || this;
|
|
2934
3012
|
_this._errorCode = errorCode;
|
|
@@ -2946,7 +3024,7 @@ var BaseScormValidationError = (function (_super) {
|
|
|
2946
3024
|
}(Error));
|
|
2947
3025
|
|
|
2948
3026
|
var ValidationError = (function (_super) {
|
|
2949
|
-
(0,
|
|
3027
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(ValidationError, _super);
|
|
2950
3028
|
function ValidationError(errorCode, errorMessage, detailedMessage) {
|
|
2951
3029
|
var _this = _super.call(this, errorCode) || this;
|
|
2952
3030
|
_this._detailedMessage = "";
|
|
@@ -2974,8 +3052,26 @@ var ValidationError = (function (_super) {
|
|
|
2974
3052
|
return ValidationError;
|
|
2975
3053
|
}(BaseScormValidationError));
|
|
2976
3054
|
|
|
3055
|
+
|
|
3056
|
+
|
|
3057
|
+
/***/ }),
|
|
3058
|
+
|
|
3059
|
+
/***/ 179:
|
|
3060
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3061
|
+
|
|
3062
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3063
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3064
|
+
/* harmony export */ Scorm12ValidationError: function() { return /* binding */ Scorm12ValidationError; }
|
|
3065
|
+
/* harmony export */ });
|
|
3066
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(635);
|
|
3067
|
+
/* harmony import */ var _exceptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(784);
|
|
3068
|
+
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
3069
|
+
|
|
3070
|
+
|
|
3071
|
+
|
|
3072
|
+
var scorm12_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.error_descriptions;
|
|
2977
3073
|
var Scorm12ValidationError = (function (_super) {
|
|
2978
|
-
(0,
|
|
3074
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Scorm12ValidationError, _super);
|
|
2979
3075
|
function Scorm12ValidationError(errorCode) {
|
|
2980
3076
|
var _this = this;
|
|
2981
3077
|
if ({}.hasOwnProperty.call(scorm12_errors, String(errorCode))) {
|
|
@@ -2987,37 +3083,7 @@ var Scorm12ValidationError = (function (_super) {
|
|
|
2987
3083
|
return _this;
|
|
2988
3084
|
}
|
|
2989
3085
|
return Scorm12ValidationError;
|
|
2990
|
-
}(ValidationError));
|
|
2991
|
-
|
|
2992
|
-
var AICCValidationError = (function (_super) {
|
|
2993
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__extends */ .C6)(AICCValidationError, _super);
|
|
2994
|
-
function AICCValidationError(errorCode) {
|
|
2995
|
-
var _this = this;
|
|
2996
|
-
if ({}.hasOwnProperty.call(aicc_errors, String(errorCode))) {
|
|
2997
|
-
_this = _super.call(this, errorCode, aicc_errors[String(errorCode)].basicMessage, aicc_errors[String(errorCode)].detailMessage) || this;
|
|
2998
|
-
}
|
|
2999
|
-
else {
|
|
3000
|
-
_this = _super.call(this, 101, aicc_errors["101"].basicMessage, aicc_errors["101"].detailMessage) || this;
|
|
3001
|
-
}
|
|
3002
|
-
return _this;
|
|
3003
|
-
}
|
|
3004
|
-
return AICCValidationError;
|
|
3005
|
-
}(ValidationError));
|
|
3006
|
-
|
|
3007
|
-
var Scorm2004ValidationError = (function (_super) {
|
|
3008
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__extends */ .C6)(Scorm2004ValidationError, _super);
|
|
3009
|
-
function Scorm2004ValidationError(errorCode) {
|
|
3010
|
-
var _this = this;
|
|
3011
|
-
if ({}.hasOwnProperty.call(scorm2004_errors, String(errorCode))) {
|
|
3012
|
-
_this = _super.call(this, errorCode, scorm2004_errors[String(errorCode)].basicMessage, scorm2004_errors[String(errorCode)].detailMessage) || this;
|
|
3013
|
-
}
|
|
3014
|
-
else {
|
|
3015
|
-
_this = _super.call(this, 101, scorm2004_errors["101"].basicMessage, scorm2004_errors["101"].detailMessage) || this;
|
|
3016
|
-
}
|
|
3017
|
-
return _this;
|
|
3018
|
-
}
|
|
3019
|
-
return Scorm2004ValidationError;
|
|
3020
|
-
}(ValidationError));
|
|
3086
|
+
}(_exceptions__WEBPACK_IMPORTED_MODULE_0__.ValidationError));
|
|
3021
3087
|
|
|
3022
3088
|
|
|
3023
3089
|
|
|
@@ -3026,16 +3092,24 @@ var Scorm2004ValidationError = (function (_super) {
|
|
|
3026
3092
|
/***/ 864:
|
|
3027
3093
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3028
3094
|
|
|
3095
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3029
3096
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3030
|
-
/* harmony export */
|
|
3031
|
-
/* harmony export */
|
|
3032
|
-
/* harmony export */
|
|
3033
|
-
/* harmony export */
|
|
3034
|
-
/* harmony export */
|
|
3035
|
-
/* harmony export */
|
|
3036
|
-
/* harmony export */
|
|
3097
|
+
/* harmony export */ SECONDS_PER_DAY: function() { return /* binding */ SECONDS_PER_DAY; },
|
|
3098
|
+
/* harmony export */ SECONDS_PER_HOUR: function() { return /* binding */ SECONDS_PER_HOUR; },
|
|
3099
|
+
/* harmony export */ SECONDS_PER_MINUTE: function() { return /* binding */ SECONDS_PER_MINUTE; },
|
|
3100
|
+
/* harmony export */ SECONDS_PER_SECOND: function() { return /* binding */ SECONDS_PER_SECOND; },
|
|
3101
|
+
/* harmony export */ addHHMMSSTimeStrings: function() { return /* binding */ addHHMMSSTimeStrings; },
|
|
3102
|
+
/* harmony export */ addTwoDurations: function() { return /* binding */ addTwoDurations; },
|
|
3103
|
+
/* harmony export */ countDecimals: function() { return /* binding */ countDecimals; },
|
|
3104
|
+
/* harmony export */ flatten: function() { return /* binding */ flatten; },
|
|
3105
|
+
/* harmony export */ formatMessage: function() { return /* binding */ formatMessage; },
|
|
3106
|
+
/* harmony export */ getDurationAsSeconds: function() { return /* binding */ getDurationAsSeconds; },
|
|
3107
|
+
/* harmony export */ getSecondsAsHHMMSS: function() { return /* binding */ getSecondsAsHHMMSS; },
|
|
3108
|
+
/* harmony export */ getSecondsAsISODuration: function() { return /* binding */ getSecondsAsISODuration; },
|
|
3109
|
+
/* harmony export */ getTimeAsSeconds: function() { return /* binding */ getTimeAsSeconds; },
|
|
3110
|
+
/* harmony export */ stringMatches: function() { return /* binding */ stringMatches; },
|
|
3111
|
+
/* harmony export */ unflatten: function() { return /* binding */ unflatten; }
|
|
3037
3112
|
/* harmony export */ });
|
|
3038
|
-
/* unused harmony exports SECONDS_PER_SECOND, SECONDS_PER_MINUTE, SECONDS_PER_HOUR, SECONDS_PER_DAY, getSecondsAsISODuration, getDurationAsSeconds, addTwoDurations, countDecimals */
|
|
3039
3113
|
var SECONDS_PER_SECOND = 1.0;
|
|
3040
3114
|
var SECONDS_PER_MINUTE = 60;
|
|
3041
3115
|
var SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE;
|
|
@@ -3227,13 +3301,40 @@ function stringMatches(str, tester) {
|
|
|
3227
3301
|
/***/ 635:
|
|
3228
3302
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
3229
3303
|
|
|
3304
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3230
3305
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3231
|
-
/* harmony export */
|
|
3232
|
-
/* harmony export */
|
|
3233
|
-
/* harmony export */
|
|
3234
|
-
/* harmony export */
|
|
3306
|
+
/* harmony export */ __addDisposableResource: function() { return /* binding */ __addDisposableResource; },
|
|
3307
|
+
/* harmony export */ __assign: function() { return /* binding */ __assign; },
|
|
3308
|
+
/* harmony export */ __asyncDelegator: function() { return /* binding */ __asyncDelegator; },
|
|
3309
|
+
/* harmony export */ __asyncGenerator: function() { return /* binding */ __asyncGenerator; },
|
|
3310
|
+
/* harmony export */ __asyncValues: function() { return /* binding */ __asyncValues; },
|
|
3311
|
+
/* harmony export */ __await: function() { return /* binding */ __await; },
|
|
3312
|
+
/* harmony export */ __awaiter: function() { return /* binding */ __awaiter; },
|
|
3313
|
+
/* harmony export */ __classPrivateFieldGet: function() { return /* binding */ __classPrivateFieldGet; },
|
|
3314
|
+
/* harmony export */ __classPrivateFieldIn: function() { return /* binding */ __classPrivateFieldIn; },
|
|
3315
|
+
/* harmony export */ __classPrivateFieldSet: function() { return /* binding */ __classPrivateFieldSet; },
|
|
3316
|
+
/* harmony export */ __createBinding: function() { return /* binding */ __createBinding; },
|
|
3317
|
+
/* harmony export */ __decorate: function() { return /* binding */ __decorate; },
|
|
3318
|
+
/* harmony export */ __disposeResources: function() { return /* binding */ __disposeResources; },
|
|
3319
|
+
/* harmony export */ __esDecorate: function() { return /* binding */ __esDecorate; },
|
|
3320
|
+
/* harmony export */ __exportStar: function() { return /* binding */ __exportStar; },
|
|
3321
|
+
/* harmony export */ __extends: function() { return /* binding */ __extends; },
|
|
3322
|
+
/* harmony export */ __generator: function() { return /* binding */ __generator; },
|
|
3323
|
+
/* harmony export */ __importDefault: function() { return /* binding */ __importDefault; },
|
|
3324
|
+
/* harmony export */ __importStar: function() { return /* binding */ __importStar; },
|
|
3325
|
+
/* harmony export */ __makeTemplateObject: function() { return /* binding */ __makeTemplateObject; },
|
|
3326
|
+
/* harmony export */ __metadata: function() { return /* binding */ __metadata; },
|
|
3327
|
+
/* harmony export */ __param: function() { return /* binding */ __param; },
|
|
3328
|
+
/* harmony export */ __propKey: function() { return /* binding */ __propKey; },
|
|
3329
|
+
/* harmony export */ __read: function() { return /* binding */ __read; },
|
|
3330
|
+
/* harmony export */ __rest: function() { return /* binding */ __rest; },
|
|
3331
|
+
/* harmony export */ __runInitializers: function() { return /* binding */ __runInitializers; },
|
|
3332
|
+
/* harmony export */ __setFunctionName: function() { return /* binding */ __setFunctionName; },
|
|
3333
|
+
/* harmony export */ __spread: function() { return /* binding */ __spread; },
|
|
3334
|
+
/* harmony export */ __spreadArray: function() { return /* binding */ __spreadArray; },
|
|
3335
|
+
/* harmony export */ __spreadArrays: function() { return /* binding */ __spreadArrays; },
|
|
3336
|
+
/* harmony export */ __values: function() { return /* binding */ __values; }
|
|
3235
3337
|
/* harmony export */ });
|
|
3236
|
-
/* unused harmony exports __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources */
|
|
3237
3338
|
/******************************************************************************
|
|
3238
3339
|
Copyright (c) Microsoft Corporation.
|
|
3239
3340
|
|
|
@@ -3583,7 +3684,7 @@ function __disposeResources(env) {
|
|
|
3583
3684
|
return next();
|
|
3584
3685
|
}
|
|
3585
3686
|
|
|
3586
|
-
/*
|
|
3687
|
+
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
3587
3688
|
__extends,
|
|
3588
3689
|
__assign,
|
|
3589
3690
|
__rest,
|
|
@@ -3660,12 +3761,25 @@ function __disposeResources(env) {
|
|
|
3660
3761
|
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
3661
3762
|
/******/ }();
|
|
3662
3763
|
/******/
|
|
3764
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
3765
|
+
/******/ !function() {
|
|
3766
|
+
/******/ // define __esModule on exports
|
|
3767
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
3768
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
3769
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3770
|
+
/******/ }
|
|
3771
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
3772
|
+
/******/ };
|
|
3773
|
+
/******/ }();
|
|
3774
|
+
/******/
|
|
3663
3775
|
/************************************************************************/
|
|
3664
3776
|
var __webpack_exports__ = {};
|
|
3777
|
+
// ESM COMPAT FLAG
|
|
3778
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3665
3779
|
|
|
3666
3780
|
// EXPORTS
|
|
3667
3781
|
__webpack_require__.d(__webpack_exports__, {
|
|
3668
|
-
|
|
3782
|
+
AICCImpl: function() { return /* binding */ AICCImpl; }
|
|
3669
3783
|
});
|
|
3670
3784
|
|
|
3671
3785
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs
|
|
@@ -3680,6 +3794,27 @@ var api_constants = __webpack_require__(340);
|
|
|
3680
3794
|
var array = __webpack_require__(589);
|
|
3681
3795
|
// EXTERNAL MODULE: ./src/exceptions.ts
|
|
3682
3796
|
var exceptions = __webpack_require__(784);
|
|
3797
|
+
;// ./src/exceptions/aicc_exceptions.ts
|
|
3798
|
+
|
|
3799
|
+
|
|
3800
|
+
|
|
3801
|
+
var aicc_errors = api_constants.aicc_constants.error_descriptions;
|
|
3802
|
+
var AICCValidationError = (function (_super) {
|
|
3803
|
+
(0,tslib_es6.__extends)(AICCValidationError, _super);
|
|
3804
|
+
function AICCValidationError(errorCode) {
|
|
3805
|
+
var _this = this;
|
|
3806
|
+
if ({}.hasOwnProperty.call(aicc_errors, String(errorCode))) {
|
|
3807
|
+
_this = _super.call(this, errorCode, aicc_errors[String(errorCode)].basicMessage, aicc_errors[String(errorCode)].detailMessage) || this;
|
|
3808
|
+
}
|
|
3809
|
+
else {
|
|
3810
|
+
_this = _super.call(this, 101, aicc_errors["101"].basicMessage, aicc_errors["101"].detailMessage) || this;
|
|
3811
|
+
}
|
|
3812
|
+
return _this;
|
|
3813
|
+
}
|
|
3814
|
+
return AICCValidationError;
|
|
3815
|
+
}(exceptions.ValidationError));
|
|
3816
|
+
|
|
3817
|
+
|
|
3683
3818
|
// EXTERNAL MODULE: ./src/cmi/common/base_cmi.ts
|
|
3684
3819
|
var base_cmi = __webpack_require__(319);
|
|
3685
3820
|
// EXTERNAL MODULE: ./src/constants/error_codes.ts
|
|
@@ -3690,9 +3825,8 @@ var validation = __webpack_require__(449);
|
|
|
3690
3825
|
|
|
3691
3826
|
|
|
3692
3827
|
|
|
3693
|
-
var aicc_error_codes = error_codes/* default */.A.scorm12;
|
|
3694
3828
|
function checkAICCValidFormat(value, regexPattern, allowEmptyString) {
|
|
3695
|
-
return (0,validation
|
|
3829
|
+
return (0,validation.checkValidFormat)(value, regexPattern, error_codes.scorm12_errors.TYPE_MISMATCH, AICCValidationError, allowEmptyString);
|
|
3696
3830
|
}
|
|
3697
3831
|
|
|
3698
3832
|
// EXTERNAL MODULE: ./src/constants/regex.ts
|
|
@@ -3707,7 +3841,7 @@ var regex = __webpack_require__(417);
|
|
|
3707
3841
|
|
|
3708
3842
|
|
|
3709
3843
|
var CMIEvaluation = (function (_super) {
|
|
3710
|
-
(0,tslib_es6
|
|
3844
|
+
(0,tslib_es6.__extends)(CMIEvaluation, _super);
|
|
3711
3845
|
function CMIEvaluation() {
|
|
3712
3846
|
var _this = _super.call(this) || this;
|
|
3713
3847
|
_this.comments = new CMIEvaluationComments();
|
|
@@ -3718,6 +3852,11 @@ var CMIEvaluation = (function (_super) {
|
|
|
3718
3852
|
_super.prototype.initialize.call(this);
|
|
3719
3853
|
(_a = this.comments) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
3720
3854
|
};
|
|
3855
|
+
CMIEvaluation.prototype.reset = function () {
|
|
3856
|
+
var _a;
|
|
3857
|
+
this._initialized = false;
|
|
3858
|
+
(_a = this.comments) === null || _a === void 0 ? void 0 : _a.reset();
|
|
3859
|
+
};
|
|
3721
3860
|
CMIEvaluation.prototype.toJSON = function () {
|
|
3722
3861
|
this.jsonString = true;
|
|
3723
3862
|
var result = {
|
|
@@ -3727,21 +3866,21 @@ var CMIEvaluation = (function (_super) {
|
|
|
3727
3866
|
return result;
|
|
3728
3867
|
};
|
|
3729
3868
|
return CMIEvaluation;
|
|
3730
|
-
}(base_cmi
|
|
3869
|
+
}(base_cmi.BaseCMI));
|
|
3731
3870
|
|
|
3732
3871
|
var CMIEvaluationComments = (function (_super) {
|
|
3733
|
-
(0,tslib_es6
|
|
3872
|
+
(0,tslib_es6.__extends)(CMIEvaluationComments, _super);
|
|
3734
3873
|
function CMIEvaluationComments() {
|
|
3735
3874
|
return _super.call(this, {
|
|
3736
|
-
children: api_constants
|
|
3737
|
-
errorCode: error_codes
|
|
3738
|
-
errorClass:
|
|
3875
|
+
children: api_constants.aicc_constants.comments_children,
|
|
3876
|
+
errorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
3877
|
+
errorClass: AICCValidationError,
|
|
3739
3878
|
}) || this;
|
|
3740
3879
|
}
|
|
3741
3880
|
return CMIEvaluationComments;
|
|
3742
|
-
}(array
|
|
3881
|
+
}(array.CMIArray));
|
|
3743
3882
|
var CMIEvaluationCommentsObject = (function (_super) {
|
|
3744
|
-
(0,tslib_es6
|
|
3883
|
+
(0,tslib_es6.__extends)(CMIEvaluationCommentsObject, _super);
|
|
3745
3884
|
function CMIEvaluationCommentsObject() {
|
|
3746
3885
|
var _this = _super.call(this) || this;
|
|
3747
3886
|
_this._content = "";
|
|
@@ -3749,12 +3888,18 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3749
3888
|
_this._time = "";
|
|
3750
3889
|
return _this;
|
|
3751
3890
|
}
|
|
3891
|
+
CMIEvaluationCommentsObject.prototype.reset = function () {
|
|
3892
|
+
this._initialized = false;
|
|
3893
|
+
this._content = "";
|
|
3894
|
+
this._location = "";
|
|
3895
|
+
this._time = "";
|
|
3896
|
+
};
|
|
3752
3897
|
Object.defineProperty(CMIEvaluationCommentsObject.prototype, "content", {
|
|
3753
3898
|
get: function () {
|
|
3754
3899
|
return this._content;
|
|
3755
3900
|
},
|
|
3756
3901
|
set: function (content) {
|
|
3757
|
-
if (checkAICCValidFormat(content, regex
|
|
3902
|
+
if (checkAICCValidFormat(content, regex.aicc_regex.CMIString256)) {
|
|
3758
3903
|
this._content = content;
|
|
3759
3904
|
}
|
|
3760
3905
|
},
|
|
@@ -3766,7 +3911,7 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3766
3911
|
return this._location;
|
|
3767
3912
|
},
|
|
3768
3913
|
set: function (location) {
|
|
3769
|
-
if (checkAICCValidFormat(location, regex
|
|
3914
|
+
if (checkAICCValidFormat(location, regex.aicc_regex.CMIString256)) {
|
|
3770
3915
|
this._location = location;
|
|
3771
3916
|
}
|
|
3772
3917
|
},
|
|
@@ -3778,7 +3923,7 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3778
3923
|
return this._time;
|
|
3779
3924
|
},
|
|
3780
3925
|
set: function (time) {
|
|
3781
|
-
if (checkAICCValidFormat(time, regex
|
|
3926
|
+
if (checkAICCValidFormat(time, regex.aicc_regex.CMITime)) {
|
|
3782
3927
|
this._time = time;
|
|
3783
3928
|
}
|
|
3784
3929
|
},
|
|
@@ -3796,7 +3941,7 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3796
3941
|
return result;
|
|
3797
3942
|
};
|
|
3798
3943
|
return CMIEvaluationCommentsObject;
|
|
3799
|
-
}(base_cmi
|
|
3944
|
+
}(base_cmi.BaseCMI));
|
|
3800
3945
|
|
|
3801
3946
|
|
|
3802
3947
|
// EXTERNAL MODULE: ./src/cmi/scorm12/student_preference.ts
|
|
@@ -3811,17 +3956,17 @@ var student_preference = __webpack_require__(181);
|
|
|
3811
3956
|
|
|
3812
3957
|
|
|
3813
3958
|
var AICCStudentPreferences = (function (_super) {
|
|
3814
|
-
(0,tslib_es6
|
|
3959
|
+
(0,tslib_es6.__extends)(AICCStudentPreferences, _super);
|
|
3815
3960
|
function AICCStudentPreferences() {
|
|
3816
|
-
var _this = _super.call(this, api_constants
|
|
3961
|
+
var _this = _super.call(this, api_constants.aicc_constants.student_preference_children) || this;
|
|
3817
3962
|
_this._lesson_type = "";
|
|
3818
3963
|
_this._text_color = "";
|
|
3819
3964
|
_this._text_location = "";
|
|
3820
3965
|
_this._text_size = "";
|
|
3821
3966
|
_this._video = "";
|
|
3822
|
-
_this.windows = new array
|
|
3823
|
-
errorCode: error_codes
|
|
3824
|
-
errorClass:
|
|
3967
|
+
_this.windows = new array.CMIArray({
|
|
3968
|
+
errorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
3969
|
+
errorClass: AICCValidationError,
|
|
3825
3970
|
children: "",
|
|
3826
3971
|
});
|
|
3827
3972
|
return _this;
|
|
@@ -3836,7 +3981,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3836
3981
|
return this._lesson_type;
|
|
3837
3982
|
},
|
|
3838
3983
|
set: function (lesson_type) {
|
|
3839
|
-
if (checkAICCValidFormat(lesson_type, regex
|
|
3984
|
+
if (checkAICCValidFormat(lesson_type, regex.aicc_regex.CMIString256)) {
|
|
3840
3985
|
this._lesson_type = lesson_type;
|
|
3841
3986
|
}
|
|
3842
3987
|
},
|
|
@@ -3848,7 +3993,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3848
3993
|
return this._text_color;
|
|
3849
3994
|
},
|
|
3850
3995
|
set: function (text_color) {
|
|
3851
|
-
if (checkAICCValidFormat(text_color, regex
|
|
3996
|
+
if (checkAICCValidFormat(text_color, regex.aicc_regex.CMIString256)) {
|
|
3852
3997
|
this._text_color = text_color;
|
|
3853
3998
|
}
|
|
3854
3999
|
},
|
|
@@ -3860,7 +4005,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3860
4005
|
return this._text_location;
|
|
3861
4006
|
},
|
|
3862
4007
|
set: function (text_location) {
|
|
3863
|
-
if (checkAICCValidFormat(text_location, regex
|
|
4008
|
+
if (checkAICCValidFormat(text_location, regex.aicc_regex.CMIString256)) {
|
|
3864
4009
|
this._text_location = text_location;
|
|
3865
4010
|
}
|
|
3866
4011
|
},
|
|
@@ -3872,7 +4017,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3872
4017
|
return this._text_size;
|
|
3873
4018
|
},
|
|
3874
4019
|
set: function (text_size) {
|
|
3875
|
-
if (checkAICCValidFormat(text_size, regex
|
|
4020
|
+
if (checkAICCValidFormat(text_size, regex.aicc_regex.CMIString256)) {
|
|
3876
4021
|
this._text_size = text_size;
|
|
3877
4022
|
}
|
|
3878
4023
|
},
|
|
@@ -3884,7 +4029,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3884
4029
|
return this._video;
|
|
3885
4030
|
},
|
|
3886
4031
|
set: function (video) {
|
|
3887
|
-
if (checkAICCValidFormat(video, regex
|
|
4032
|
+
if (checkAICCValidFormat(video, regex.aicc_regex.CMIString256)) {
|
|
3888
4033
|
this._video = video;
|
|
3889
4034
|
}
|
|
3890
4035
|
},
|
|
@@ -3909,7 +4054,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3909
4054
|
return result;
|
|
3910
4055
|
};
|
|
3911
4056
|
return AICCStudentPreferences;
|
|
3912
|
-
}(student_preference
|
|
4057
|
+
}(student_preference.CMIStudentPreference));
|
|
3913
4058
|
|
|
3914
4059
|
|
|
3915
4060
|
;// ./src/cmi/aicc/student_demographics.ts
|
|
@@ -3919,10 +4064,10 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3919
4064
|
|
|
3920
4065
|
|
|
3921
4066
|
var CMIStudentDemographics = (function (_super) {
|
|
3922
|
-
(0,tslib_es6
|
|
4067
|
+
(0,tslib_es6.__extends)(CMIStudentDemographics, _super);
|
|
3923
4068
|
function CMIStudentDemographics() {
|
|
3924
4069
|
var _this = _super.call(this) || this;
|
|
3925
|
-
_this.__children = api_constants
|
|
4070
|
+
_this.__children = api_constants.aicc_constants.student_demographics_children;
|
|
3926
4071
|
_this._city = "";
|
|
3927
4072
|
_this._class = "";
|
|
3928
4073
|
_this._company = "";
|
|
@@ -3938,6 +4083,9 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3938
4083
|
_this._years_experience = "";
|
|
3939
4084
|
return _this;
|
|
3940
4085
|
}
|
|
4086
|
+
CMIStudentDemographics.prototype.reset = function () {
|
|
4087
|
+
this._initialized = false;
|
|
4088
|
+
};
|
|
3941
4089
|
Object.defineProperty(CMIStudentDemographics.prototype, "_children", {
|
|
3942
4090
|
get: function () {
|
|
3943
4091
|
return this.__children;
|
|
@@ -3951,7 +4099,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3951
4099
|
},
|
|
3952
4100
|
set: function (city) {
|
|
3953
4101
|
if (this.initialized) {
|
|
3954
|
-
throw new
|
|
4102
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
3955
4103
|
}
|
|
3956
4104
|
else {
|
|
3957
4105
|
this._city = city;
|
|
@@ -3966,7 +4114,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3966
4114
|
},
|
|
3967
4115
|
set: function (clazz) {
|
|
3968
4116
|
if (this.initialized) {
|
|
3969
|
-
throw new
|
|
4117
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
3970
4118
|
}
|
|
3971
4119
|
else {
|
|
3972
4120
|
this._class = clazz;
|
|
@@ -3981,7 +4129,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3981
4129
|
},
|
|
3982
4130
|
set: function (company) {
|
|
3983
4131
|
if (this.initialized) {
|
|
3984
|
-
throw new
|
|
4132
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
3985
4133
|
}
|
|
3986
4134
|
else {
|
|
3987
4135
|
this._company = company;
|
|
@@ -3996,7 +4144,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3996
4144
|
},
|
|
3997
4145
|
set: function (country) {
|
|
3998
4146
|
if (this.initialized) {
|
|
3999
|
-
throw new
|
|
4147
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4000
4148
|
}
|
|
4001
4149
|
else {
|
|
4002
4150
|
this._country = country;
|
|
@@ -4011,7 +4159,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4011
4159
|
},
|
|
4012
4160
|
set: function (experience) {
|
|
4013
4161
|
if (this.initialized) {
|
|
4014
|
-
throw new
|
|
4162
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4015
4163
|
}
|
|
4016
4164
|
else {
|
|
4017
4165
|
this._experience = experience;
|
|
@@ -4026,7 +4174,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4026
4174
|
},
|
|
4027
4175
|
set: function (familiar_name) {
|
|
4028
4176
|
if (this.initialized) {
|
|
4029
|
-
throw new
|
|
4177
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4030
4178
|
}
|
|
4031
4179
|
else {
|
|
4032
4180
|
this._familiar_name = familiar_name;
|
|
@@ -4041,7 +4189,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4041
4189
|
},
|
|
4042
4190
|
set: function (instructor_name) {
|
|
4043
4191
|
if (this.initialized) {
|
|
4044
|
-
throw new
|
|
4192
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4045
4193
|
}
|
|
4046
4194
|
else {
|
|
4047
4195
|
this._instructor_name = instructor_name;
|
|
@@ -4056,7 +4204,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4056
4204
|
},
|
|
4057
4205
|
set: function (title) {
|
|
4058
4206
|
if (this.initialized) {
|
|
4059
|
-
throw new
|
|
4207
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4060
4208
|
}
|
|
4061
4209
|
else {
|
|
4062
4210
|
this._title = title;
|
|
@@ -4071,7 +4219,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4071
4219
|
},
|
|
4072
4220
|
set: function (native_language) {
|
|
4073
4221
|
if (this.initialized) {
|
|
4074
|
-
throw new
|
|
4222
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4075
4223
|
}
|
|
4076
4224
|
else {
|
|
4077
4225
|
this._native_language = native_language;
|
|
@@ -4086,7 +4234,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4086
4234
|
},
|
|
4087
4235
|
set: function (state) {
|
|
4088
4236
|
if (this.initialized) {
|
|
4089
|
-
throw new
|
|
4237
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4090
4238
|
}
|
|
4091
4239
|
else {
|
|
4092
4240
|
this._state = state;
|
|
@@ -4101,7 +4249,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4101
4249
|
},
|
|
4102
4250
|
set: function (street_address) {
|
|
4103
4251
|
if (this.initialized) {
|
|
4104
|
-
throw new
|
|
4252
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4105
4253
|
}
|
|
4106
4254
|
else {
|
|
4107
4255
|
this._street_address = street_address;
|
|
@@ -4116,7 +4264,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4116
4264
|
},
|
|
4117
4265
|
set: function (telephone) {
|
|
4118
4266
|
if (this.initialized) {
|
|
4119
|
-
throw new
|
|
4267
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4120
4268
|
}
|
|
4121
4269
|
else {
|
|
4122
4270
|
this._telephone = telephone;
|
|
@@ -4131,7 +4279,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4131
4279
|
},
|
|
4132
4280
|
set: function (years_experience) {
|
|
4133
4281
|
if (this.initialized) {
|
|
4134
|
-
throw new
|
|
4282
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4135
4283
|
}
|
|
4136
4284
|
else {
|
|
4137
4285
|
this._years_experience = years_experience;
|
|
@@ -4161,7 +4309,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4161
4309
|
return result;
|
|
4162
4310
|
};
|
|
4163
4311
|
return CMIStudentDemographics;
|
|
4164
|
-
}(base_cmi
|
|
4312
|
+
}(base_cmi.BaseCMI));
|
|
4165
4313
|
|
|
4166
4314
|
|
|
4167
4315
|
// EXTERNAL MODULE: ./src/cmi/common/score.ts
|
|
@@ -4177,28 +4325,28 @@ var score = __webpack_require__(434);
|
|
|
4177
4325
|
|
|
4178
4326
|
|
|
4179
4327
|
var CMITries = (function (_super) {
|
|
4180
|
-
(0,tslib_es6
|
|
4328
|
+
(0,tslib_es6.__extends)(CMITries, _super);
|
|
4181
4329
|
function CMITries() {
|
|
4182
4330
|
return _super.call(this, {
|
|
4183
|
-
children: api_constants
|
|
4331
|
+
children: api_constants.aicc_constants.tries_children,
|
|
4184
4332
|
}) || this;
|
|
4185
4333
|
}
|
|
4186
4334
|
return CMITries;
|
|
4187
|
-
}(array
|
|
4335
|
+
}(array.CMIArray));
|
|
4188
4336
|
|
|
4189
4337
|
var CMITriesObject = (function (_super) {
|
|
4190
|
-
(0,tslib_es6
|
|
4338
|
+
(0,tslib_es6.__extends)(CMITriesObject, _super);
|
|
4191
4339
|
function CMITriesObject() {
|
|
4192
4340
|
var _this = _super.call(this) || this;
|
|
4193
4341
|
_this._status = "";
|
|
4194
4342
|
_this._time = "";
|
|
4195
|
-
_this.score = new score
|
|
4196
|
-
score_children: api_constants
|
|
4197
|
-
score_range: regex
|
|
4198
|
-
invalidErrorCode: error_codes
|
|
4199
|
-
invalidTypeCode: error_codes
|
|
4200
|
-
invalidRangeCode: error_codes
|
|
4201
|
-
errorClass:
|
|
4343
|
+
_this.score = new score.CMIScore({
|
|
4344
|
+
score_children: api_constants.aicc_constants.score_children,
|
|
4345
|
+
score_range: regex.aicc_regex.score_range,
|
|
4346
|
+
invalidErrorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
4347
|
+
invalidTypeCode: error_codes.scorm12_errors.TYPE_MISMATCH,
|
|
4348
|
+
invalidRangeCode: error_codes.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
4349
|
+
errorClass: AICCValidationError,
|
|
4202
4350
|
});
|
|
4203
4351
|
return _this;
|
|
4204
4352
|
}
|
|
@@ -4207,12 +4355,19 @@ var CMITriesObject = (function (_super) {
|
|
|
4207
4355
|
_super.prototype.initialize.call(this);
|
|
4208
4356
|
(_a = this.score) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
4209
4357
|
};
|
|
4358
|
+
CMITriesObject.prototype.reset = function () {
|
|
4359
|
+
var _a;
|
|
4360
|
+
this._initialized = false;
|
|
4361
|
+
this._status = "";
|
|
4362
|
+
this._time = "";
|
|
4363
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
4364
|
+
};
|
|
4210
4365
|
Object.defineProperty(CMITriesObject.prototype, "status", {
|
|
4211
4366
|
get: function () {
|
|
4212
4367
|
return this._status;
|
|
4213
4368
|
},
|
|
4214
4369
|
set: function (status) {
|
|
4215
|
-
if (checkAICCValidFormat(status, regex
|
|
4370
|
+
if (checkAICCValidFormat(status, regex.aicc_regex.CMIStatus2)) {
|
|
4216
4371
|
this._status = status;
|
|
4217
4372
|
}
|
|
4218
4373
|
},
|
|
@@ -4224,7 +4379,7 @@ var CMITriesObject = (function (_super) {
|
|
|
4224
4379
|
return this._time;
|
|
4225
4380
|
},
|
|
4226
4381
|
set: function (time) {
|
|
4227
|
-
if (checkAICCValidFormat(time, regex
|
|
4382
|
+
if (checkAICCValidFormat(time, regex.aicc_regex.CMITime)) {
|
|
4228
4383
|
this._time = time;
|
|
4229
4384
|
}
|
|
4230
4385
|
},
|
|
@@ -4242,7 +4397,7 @@ var CMITriesObject = (function (_super) {
|
|
|
4242
4397
|
return result;
|
|
4243
4398
|
};
|
|
4244
4399
|
return CMITriesObject;
|
|
4245
|
-
}(base_cmi
|
|
4400
|
+
}(base_cmi.BaseCMI));
|
|
4246
4401
|
|
|
4247
4402
|
|
|
4248
4403
|
// EXTERNAL MODULE: ./src/cmi/scorm12/student_data.ts
|
|
@@ -4258,41 +4413,47 @@ var student_data = __webpack_require__(532);
|
|
|
4258
4413
|
|
|
4259
4414
|
|
|
4260
4415
|
var CMIAttemptRecords = (function (_super) {
|
|
4261
|
-
(0,tslib_es6
|
|
4416
|
+
(0,tslib_es6.__extends)(CMIAttemptRecords, _super);
|
|
4262
4417
|
function CMIAttemptRecords() {
|
|
4263
4418
|
return _super.call(this, {
|
|
4264
|
-
children: api_constants
|
|
4419
|
+
children: api_constants.aicc_constants.attempt_records_children,
|
|
4265
4420
|
}) || this;
|
|
4266
4421
|
}
|
|
4267
4422
|
return CMIAttemptRecords;
|
|
4268
|
-
}(array
|
|
4423
|
+
}(array.CMIArray));
|
|
4269
4424
|
|
|
4270
4425
|
var CMIAttemptRecordsObject = (function (_super) {
|
|
4271
|
-
(0,tslib_es6
|
|
4426
|
+
(0,tslib_es6.__extends)(CMIAttemptRecordsObject, _super);
|
|
4272
4427
|
function CMIAttemptRecordsObject() {
|
|
4273
4428
|
var _this = _super.call(this) || this;
|
|
4274
4429
|
_this._lesson_status = "";
|
|
4275
|
-
_this.score = new score
|
|
4276
|
-
score_children: api_constants
|
|
4277
|
-
score_range: regex
|
|
4278
|
-
invalidErrorCode: error_codes
|
|
4279
|
-
invalidTypeCode: error_codes
|
|
4280
|
-
invalidRangeCode: error_codes
|
|
4281
|
-
errorClass:
|
|
4430
|
+
_this.score = new score.CMIScore({
|
|
4431
|
+
score_children: api_constants.aicc_constants.score_children,
|
|
4432
|
+
score_range: regex.aicc_regex.score_range,
|
|
4433
|
+
invalidErrorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
4434
|
+
invalidTypeCode: error_codes.scorm12_errors.TYPE_MISMATCH,
|
|
4435
|
+
invalidRangeCode: error_codes.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
4436
|
+
errorClass: AICCValidationError,
|
|
4282
4437
|
});
|
|
4283
4438
|
return _this;
|
|
4284
4439
|
}
|
|
4285
4440
|
CMIAttemptRecordsObject.prototype.initialize = function () {
|
|
4286
4441
|
var _a;
|
|
4287
4442
|
_super.prototype.initialize.call(this);
|
|
4443
|
+
this._lesson_status = "";
|
|
4288
4444
|
(_a = this.score) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
4289
4445
|
};
|
|
4446
|
+
CMIAttemptRecordsObject.prototype.reset = function () {
|
|
4447
|
+
var _a;
|
|
4448
|
+
this._initialized = false;
|
|
4449
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
4450
|
+
};
|
|
4290
4451
|
Object.defineProperty(CMIAttemptRecordsObject.prototype, "lesson_status", {
|
|
4291
4452
|
get: function () {
|
|
4292
4453
|
return this._lesson_status;
|
|
4293
4454
|
},
|
|
4294
4455
|
set: function (lesson_status) {
|
|
4295
|
-
if (checkAICCValidFormat(lesson_status, regex
|
|
4456
|
+
if (checkAICCValidFormat(lesson_status, regex.aicc_regex.CMIStatus2)) {
|
|
4296
4457
|
this._lesson_status = lesson_status;
|
|
4297
4458
|
}
|
|
4298
4459
|
},
|
|
@@ -4309,7 +4470,7 @@ var CMIAttemptRecordsObject = (function (_super) {
|
|
|
4309
4470
|
return result;
|
|
4310
4471
|
};
|
|
4311
4472
|
return CMIAttemptRecordsObject;
|
|
4312
|
-
}(base_cmi
|
|
4473
|
+
}(base_cmi.BaseCMI));
|
|
4313
4474
|
|
|
4314
4475
|
|
|
4315
4476
|
;// ./src/cmi/aicc/student_data.ts
|
|
@@ -4321,9 +4482,9 @@ var CMIAttemptRecordsObject = (function (_super) {
|
|
|
4321
4482
|
|
|
4322
4483
|
|
|
4323
4484
|
var AICCCMIStudentData = (function (_super) {
|
|
4324
|
-
(0,tslib_es6
|
|
4485
|
+
(0,tslib_es6.__extends)(AICCCMIStudentData, _super);
|
|
4325
4486
|
function AICCCMIStudentData() {
|
|
4326
|
-
var _this = _super.call(this, api_constants
|
|
4487
|
+
var _this = _super.call(this, api_constants.aicc_constants.student_data_children) || this;
|
|
4327
4488
|
_this._tries_during_lesson = "";
|
|
4328
4489
|
_this.tries = new CMITries();
|
|
4329
4490
|
_this.attempt_records = new CMIAttemptRecords();
|
|
@@ -4335,13 +4496,19 @@ var AICCCMIStudentData = (function (_super) {
|
|
|
4335
4496
|
(_a = this.tries) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
4336
4497
|
(_b = this.attempt_records) === null || _b === void 0 ? void 0 : _b.initialize();
|
|
4337
4498
|
};
|
|
4499
|
+
AICCCMIStudentData.prototype.reset = function () {
|
|
4500
|
+
var _a, _b;
|
|
4501
|
+
this._initialized = false;
|
|
4502
|
+
(_a = this.tries) === null || _a === void 0 ? void 0 : _a.reset(true);
|
|
4503
|
+
(_b = this.attempt_records) === null || _b === void 0 ? void 0 : _b.reset(true);
|
|
4504
|
+
};
|
|
4338
4505
|
Object.defineProperty(AICCCMIStudentData.prototype, "tries_during_lesson", {
|
|
4339
4506
|
get: function () {
|
|
4340
4507
|
return this._tries_during_lesson;
|
|
4341
4508
|
},
|
|
4342
4509
|
set: function (tries_during_lesson) {
|
|
4343
4510
|
if (this.initialized) {
|
|
4344
|
-
throw new
|
|
4511
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4345
4512
|
}
|
|
4346
4513
|
else {
|
|
4347
4514
|
this._tries_during_lesson = tries_during_lesson;
|
|
@@ -4363,7 +4530,7 @@ var AICCCMIStudentData = (function (_super) {
|
|
|
4363
4530
|
return result;
|
|
4364
4531
|
};
|
|
4365
4532
|
return AICCCMIStudentData;
|
|
4366
|
-
}(student_data
|
|
4533
|
+
}(student_data.CMIStudentData));
|
|
4367
4534
|
|
|
4368
4535
|
|
|
4369
4536
|
;// ./src/cmi/aicc/paths.ts
|
|
@@ -4374,17 +4541,17 @@ var AICCCMIStudentData = (function (_super) {
|
|
|
4374
4541
|
|
|
4375
4542
|
|
|
4376
4543
|
var CMIPaths = (function (_super) {
|
|
4377
|
-
(0,tslib_es6
|
|
4544
|
+
(0,tslib_es6.__extends)(CMIPaths, _super);
|
|
4378
4545
|
function CMIPaths() {
|
|
4379
4546
|
return _super.call(this, {
|
|
4380
|
-
children: api_constants
|
|
4547
|
+
children: api_constants.aicc_constants.paths_children,
|
|
4381
4548
|
}) || this;
|
|
4382
4549
|
}
|
|
4383
4550
|
return CMIPaths;
|
|
4384
|
-
}(array
|
|
4551
|
+
}(array.CMIArray));
|
|
4385
4552
|
|
|
4386
4553
|
var CMIPathsObject = (function (_super) {
|
|
4387
|
-
(0,tslib_es6
|
|
4554
|
+
(0,tslib_es6.__extends)(CMIPathsObject, _super);
|
|
4388
4555
|
function CMIPathsObject() {
|
|
4389
4556
|
var _this = _super.call(this) || this;
|
|
4390
4557
|
_this._location_id = "";
|
|
@@ -4395,12 +4562,21 @@ var CMIPathsObject = (function (_super) {
|
|
|
4395
4562
|
_this._time_in_element = "";
|
|
4396
4563
|
return _this;
|
|
4397
4564
|
}
|
|
4565
|
+
CMIPathsObject.prototype.reset = function () {
|
|
4566
|
+
this._initialized = false;
|
|
4567
|
+
this._location_id = "";
|
|
4568
|
+
this._date = "";
|
|
4569
|
+
this._time = "";
|
|
4570
|
+
this._status = "";
|
|
4571
|
+
this._why_left = "";
|
|
4572
|
+
this._time_in_element = "";
|
|
4573
|
+
};
|
|
4398
4574
|
Object.defineProperty(CMIPathsObject.prototype, "location_id", {
|
|
4399
4575
|
get: function () {
|
|
4400
4576
|
return this._location_id;
|
|
4401
4577
|
},
|
|
4402
4578
|
set: function (location_id) {
|
|
4403
|
-
if (checkAICCValidFormat(location_id, regex
|
|
4579
|
+
if (checkAICCValidFormat(location_id, regex.aicc_regex.CMIString256)) {
|
|
4404
4580
|
this._location_id = location_id;
|
|
4405
4581
|
}
|
|
4406
4582
|
},
|
|
@@ -4412,7 +4588,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4412
4588
|
return this._date;
|
|
4413
4589
|
},
|
|
4414
4590
|
set: function (date) {
|
|
4415
|
-
if (checkAICCValidFormat(date, regex
|
|
4591
|
+
if (checkAICCValidFormat(date, regex.aicc_regex.CMIString256)) {
|
|
4416
4592
|
this._date = date;
|
|
4417
4593
|
}
|
|
4418
4594
|
},
|
|
@@ -4424,7 +4600,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4424
4600
|
return this._time;
|
|
4425
4601
|
},
|
|
4426
4602
|
set: function (time) {
|
|
4427
|
-
if (checkAICCValidFormat(time, regex
|
|
4603
|
+
if (checkAICCValidFormat(time, regex.aicc_regex.CMITime)) {
|
|
4428
4604
|
this._time = time;
|
|
4429
4605
|
}
|
|
4430
4606
|
},
|
|
@@ -4436,7 +4612,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4436
4612
|
return this._status;
|
|
4437
4613
|
},
|
|
4438
4614
|
set: function (status) {
|
|
4439
|
-
if (checkAICCValidFormat(status, regex
|
|
4615
|
+
if (checkAICCValidFormat(status, regex.aicc_regex.CMIStatus2)) {
|
|
4440
4616
|
this._status = status;
|
|
4441
4617
|
}
|
|
4442
4618
|
},
|
|
@@ -4448,7 +4624,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4448
4624
|
return this._why_left;
|
|
4449
4625
|
},
|
|
4450
4626
|
set: function (why_left) {
|
|
4451
|
-
if (checkAICCValidFormat(why_left, regex
|
|
4627
|
+
if (checkAICCValidFormat(why_left, regex.aicc_regex.CMIString256)) {
|
|
4452
4628
|
this._why_left = why_left;
|
|
4453
4629
|
}
|
|
4454
4630
|
},
|
|
@@ -4460,7 +4636,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4460
4636
|
return this._time_in_element;
|
|
4461
4637
|
},
|
|
4462
4638
|
set: function (time_in_element) {
|
|
4463
|
-
if (checkAICCValidFormat(time_in_element, regex
|
|
4639
|
+
if (checkAICCValidFormat(time_in_element, regex.aicc_regex.CMITime)) {
|
|
4464
4640
|
this._time_in_element = time_in_element;
|
|
4465
4641
|
}
|
|
4466
4642
|
},
|
|
@@ -4481,7 +4657,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4481
4657
|
return result;
|
|
4482
4658
|
};
|
|
4483
4659
|
return CMIPathsObject;
|
|
4484
|
-
}(base_cmi
|
|
4660
|
+
}(base_cmi.BaseCMI));
|
|
4485
4661
|
|
|
4486
4662
|
|
|
4487
4663
|
;// ./src/cmi/aicc/cmi.ts
|
|
@@ -4494,10 +4670,10 @@ var CMIPathsObject = (function (_super) {
|
|
|
4494
4670
|
|
|
4495
4671
|
|
|
4496
4672
|
var CMI = (function (_super) {
|
|
4497
|
-
(0,tslib_es6
|
|
4673
|
+
(0,tslib_es6.__extends)(CMI, _super);
|
|
4498
4674
|
function CMI(initialized) {
|
|
4499
4675
|
if (initialized === void 0) { initialized = false; }
|
|
4500
|
-
var _this = _super.call(this, api_constants
|
|
4676
|
+
var _this = _super.call(this, api_constants.aicc_constants.cmi_children) || this;
|
|
4501
4677
|
if (initialized)
|
|
4502
4678
|
_this.initialize();
|
|
4503
4679
|
_this.student_preference = new AICCStudentPreferences();
|
|
@@ -4536,7 +4712,7 @@ var CMI = (function (_super) {
|
|
|
4536
4712
|
return result;
|
|
4537
4713
|
};
|
|
4538
4714
|
return CMI;
|
|
4539
|
-
}(cmi
|
|
4715
|
+
}(cmi.CMI));
|
|
4540
4716
|
|
|
4541
4717
|
|
|
4542
4718
|
// EXTERNAL MODULE: ./src/cmi/scorm12/nav.ts
|
|
@@ -4554,26 +4730,26 @@ var utilities = __webpack_require__(864);
|
|
|
4554
4730
|
|
|
4555
4731
|
|
|
4556
4732
|
var AICCImpl = (function (_super) {
|
|
4557
|
-
(0,tslib_es6
|
|
4733
|
+
(0,tslib_es6.__extends)(AICCImpl, _super);
|
|
4558
4734
|
function AICCImpl(settings) {
|
|
4559
4735
|
var _this = _super.call(this, settings) || this;
|
|
4560
4736
|
_this.cmi = new CMI();
|
|
4561
|
-
_this.nav = new nav
|
|
4737
|
+
_this.nav = new nav.NAV();
|
|
4562
4738
|
return _this;
|
|
4563
4739
|
}
|
|
4564
4740
|
AICCImpl.prototype.getChildElement = function (CMIElement, value, foundFirstIndex) {
|
|
4565
4741
|
var newChild = _super.prototype.getChildElement.call(this, CMIElement, value, foundFirstIndex);
|
|
4566
4742
|
if (!newChild) {
|
|
4567
|
-
if ((0,utilities
|
|
4743
|
+
if ((0,utilities.stringMatches)(CMIElement, "cmi\\.evaluation\\.comments\\.\\d+")) {
|
|
4568
4744
|
newChild = new CMIEvaluationCommentsObject();
|
|
4569
4745
|
}
|
|
4570
|
-
else if ((0,utilities
|
|
4746
|
+
else if ((0,utilities.stringMatches)(CMIElement, "cmi\\.student_data\\.tries\\.\\d+")) {
|
|
4571
4747
|
newChild = new CMITriesObject();
|
|
4572
4748
|
}
|
|
4573
|
-
else if ((0,utilities
|
|
4749
|
+
else if ((0,utilities.stringMatches)(CMIElement, "cmi\\.student_data\\.attempt_records\\.\\d+")) {
|
|
4574
4750
|
newChild = new CMIAttemptRecordsObject();
|
|
4575
4751
|
}
|
|
4576
|
-
else if ((0,utilities
|
|
4752
|
+
else if ((0,utilities.stringMatches)(CMIElement, "cmi\\.paths\\.\\d+")) {
|
|
4577
4753
|
newChild = new CMIPathsObject();
|
|
4578
4754
|
}
|
|
4579
4755
|
}
|
|
@@ -4584,10 +4760,10 @@ var AICCImpl = (function (_super) {
|
|
|
4584
4760
|
this.nav = newAPI.nav;
|
|
4585
4761
|
};
|
|
4586
4762
|
return AICCImpl;
|
|
4587
|
-
}(Scorm12API
|
|
4763
|
+
}(Scorm12API.Scorm12Impl));
|
|
4588
4764
|
|
|
4589
4765
|
|
|
4590
|
-
var __webpack_exports__AICCImpl = __webpack_exports__.
|
|
4766
|
+
var __webpack_exports__AICCImpl = __webpack_exports__.AICCImpl;
|
|
4591
4767
|
export { __webpack_exports__AICCImpl as AICCImpl };
|
|
4592
4768
|
|
|
4593
4769
|
//# sourceMappingURL=aicc.js.map
|