scorm-again 2.4.1 → 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/README.md +23 -23
- package/dist/aicc.js +676 -493
- 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 +692 -496
- 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 +1151 -743
- 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 +534 -401
- 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 +712 -465
- 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 +1127 -731
- 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 +521 -400
- 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 +698 -464
- 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 +15 -15
- package/src/AICC.ts +3 -0
- package/src/BaseAPI.ts +60 -95
- package/src/Scorm12API.ts +14 -14
- package/src/Scorm2004API.ts +107 -37
- 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 -29
- package/src/constants/default_settings.ts +26 -12
- package/src/constants/enums.ts +9 -0
- package/src/constants/error_codes.ts +5 -12
- package/src/constants/regex.ts +5 -11
- 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 +1 -86
- package/src/types/api_types.ts +29 -5
- 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 +40 -47
- package/test/utilities.spec.ts +1 -4
- package/webpack.config.js +4 -0
package/dist/aicc.js
CHANGED
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
/***/ 429:
|
|
6
6
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
7
|
|
|
8
|
+
// ESM COMPAT FLAG
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8
10
|
|
|
9
11
|
// EXPORTS
|
|
10
12
|
__webpack_require__.d(__webpack_exports__, {
|
|
11
|
-
|
|
13
|
+
"default": function() { return /* binding */ src_BaseAPI; }
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs
|
|
@@ -17,15 +19,16 @@ var tslib_es6 = __webpack_require__(635);
|
|
|
17
19
|
var array = __webpack_require__(589);
|
|
18
20
|
// EXTERNAL MODULE: ./src/exceptions.ts
|
|
19
21
|
var exceptions = __webpack_require__(784);
|
|
20
|
-
// EXTERNAL MODULE: ./src/constants/error_codes.ts
|
|
21
|
-
var error_codes = __webpack_require__(797);
|
|
22
22
|
// EXTERNAL MODULE: ./src/constants/api_constants.ts
|
|
23
23
|
var api_constants = __webpack_require__(340);
|
|
24
24
|
// EXTERNAL MODULE: ./src/utilities.ts
|
|
25
25
|
var utilities = __webpack_require__(864);
|
|
26
|
+
// EXTERNAL MODULE: ./src/constants/enums.ts
|
|
27
|
+
var enums = __webpack_require__(56);
|
|
26
28
|
;// ./src/constants/default_settings.ts
|
|
27
29
|
|
|
28
30
|
|
|
31
|
+
|
|
29
32
|
var DefaultSettings = {
|
|
30
33
|
autocommit: false,
|
|
31
34
|
autocommitSeconds: 10,
|
|
@@ -35,7 +38,7 @@ var DefaultSettings = {
|
|
|
35
38
|
dataCommitFormat: "json",
|
|
36
39
|
commitRequestDataType: "application/json;charset=UTF-8",
|
|
37
40
|
autoProgress: false,
|
|
38
|
-
logLevel:
|
|
41
|
+
logLevel: enums.LogLevelEnum.ERROR,
|
|
39
42
|
selfReportSessionTime: false,
|
|
40
43
|
alwaysSendTotalTime: false,
|
|
41
44
|
renderCommonCommitFields: false,
|
|
@@ -44,9 +47,9 @@ var DefaultSettings = {
|
|
|
44
47
|
xhrWithCredentials: false,
|
|
45
48
|
fetchMode: "cors",
|
|
46
49
|
responseHandler: function (response) {
|
|
47
|
-
return (0,tslib_es6
|
|
50
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
48
51
|
var responseText, httpResult;
|
|
49
|
-
return (0,tslib_es6
|
|
52
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
50
53
|
switch (_a.label) {
|
|
51
54
|
case 0:
|
|
52
55
|
if (!(typeof response !== "undefined")) return [3, 2];
|
|
@@ -61,13 +64,13 @@ var DefaultSettings = {
|
|
|
61
64
|
!{}.hasOwnProperty.call(httpResult, "result")) {
|
|
62
65
|
if (response.status === 200) {
|
|
63
66
|
return [2, {
|
|
64
|
-
result: api_constants
|
|
67
|
+
result: api_constants.global_constants.SCORM_TRUE,
|
|
65
68
|
errorCode: 0,
|
|
66
69
|
}];
|
|
67
70
|
}
|
|
68
71
|
else {
|
|
69
72
|
return [2, {
|
|
70
|
-
result: api_constants
|
|
73
|
+
result: api_constants.global_constants.SCORM_FALSE,
|
|
71
74
|
errorCode: 101,
|
|
72
75
|
}];
|
|
73
76
|
}
|
|
@@ -77,14 +80,14 @@ var DefaultSettings = {
|
|
|
77
80
|
result: httpResult.result,
|
|
78
81
|
errorCode: httpResult.errorCode
|
|
79
82
|
? httpResult.errorCode
|
|
80
|
-
: httpResult.result === api_constants
|
|
83
|
+
: httpResult.result === api_constants.global_constants.SCORM_TRUE
|
|
81
84
|
? 0
|
|
82
85
|
: 101,
|
|
83
86
|
}];
|
|
84
87
|
}
|
|
85
88
|
_a.label = 2;
|
|
86
89
|
case 2: return [2, {
|
|
87
|
-
result: api_constants
|
|
90
|
+
result: api_constants.global_constants.SCORM_FALSE,
|
|
88
91
|
errorCode: 101,
|
|
89
92
|
}];
|
|
90
93
|
}
|
|
@@ -96,16 +99,28 @@ var DefaultSettings = {
|
|
|
96
99
|
},
|
|
97
100
|
onLogMessage: function (messageLevel, logMessage) {
|
|
98
101
|
switch (messageLevel) {
|
|
99
|
-
case
|
|
102
|
+
case "4":
|
|
103
|
+
case 4:
|
|
104
|
+
case "ERROR":
|
|
105
|
+
case enums.LogLevelEnum.ERROR:
|
|
100
106
|
console.error(logMessage);
|
|
101
107
|
break;
|
|
102
|
-
case
|
|
108
|
+
case "3":
|
|
109
|
+
case 3:
|
|
110
|
+
case "WARN":
|
|
111
|
+
case enums.LogLevelEnum.WARN:
|
|
103
112
|
console.warn(logMessage);
|
|
104
113
|
break;
|
|
105
|
-
case
|
|
114
|
+
case "2":
|
|
115
|
+
case 2:
|
|
116
|
+
case "INFO":
|
|
117
|
+
case enums.LogLevelEnum.INFO:
|
|
106
118
|
console.info(logMessage);
|
|
107
119
|
break;
|
|
108
|
-
case
|
|
120
|
+
case "1":
|
|
121
|
+
case 1:
|
|
122
|
+
case "DEBUG":
|
|
123
|
+
case enums.LogLevelEnum.DEBUG:
|
|
109
124
|
if (console.debug) {
|
|
110
125
|
console.debug(logMessage);
|
|
111
126
|
}
|
|
@@ -117,6 +132,7 @@ var DefaultSettings = {
|
|
|
117
132
|
},
|
|
118
133
|
scoItemIds: [],
|
|
119
134
|
scoItemIdValidator: false,
|
|
135
|
+
globalObjectiveIds: [],
|
|
120
136
|
};
|
|
121
137
|
|
|
122
138
|
;// ./src/helpers/scheduled_commit.ts
|
|
@@ -137,7 +153,7 @@ var ScheduledCommit = (function () {
|
|
|
137
153
|
ScheduledCommit.prototype.wrapper = function () {
|
|
138
154
|
var _this = this;
|
|
139
155
|
if (!this._cancelled) {
|
|
140
|
-
(function () { return (0,tslib_es6
|
|
156
|
+
(function () { return (0,tslib_es6.__awaiter)(_this, void 0, void 0, function () { return (0,tslib_es6.__generator)(this, function (_a) {
|
|
141
157
|
switch (_a.label) {
|
|
142
158
|
case 0: return [4, this._API.commit(this._callback)];
|
|
143
159
|
case 1: return [2, _a.sent()];
|
|
@@ -165,7 +181,7 @@ var BaseAPI = (function () {
|
|
|
165
181
|
if (_newTarget === BaseAPI) {
|
|
166
182
|
throw new TypeError("Cannot construct BaseAPI instances directly");
|
|
167
183
|
}
|
|
168
|
-
this.currentState = api_constants
|
|
184
|
+
this.currentState = api_constants.global_constants.STATE_NOT_INITIALIZED;
|
|
169
185
|
this.lastErrorCode = "0";
|
|
170
186
|
this.listenerArray = [];
|
|
171
187
|
this._error_codes = error_codes;
|
|
@@ -174,15 +190,21 @@ var BaseAPI = (function () {
|
|
|
174
190
|
}
|
|
175
191
|
this.apiLogLevel = this.settings.logLevel;
|
|
176
192
|
this.selfReportSessionTime = this.settings.selfReportSessionTime;
|
|
193
|
+
if (this.apiLogLevel === undefined) {
|
|
194
|
+
this.apiLogLevel = enums.LogLevelEnum.NONE;
|
|
195
|
+
}
|
|
177
196
|
}
|
|
178
197
|
BaseAPI.prototype.commonReset = function (settings) {
|
|
179
|
-
this.
|
|
180
|
-
this.
|
|
198
|
+
this.apiLog("reset", "Called", enums.LogLevelEnum.INFO);
|
|
199
|
+
this.settings = (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, this.settings), settings);
|
|
200
|
+
this.clearScheduledCommit();
|
|
201
|
+
this.currentState = api_constants.global_constants.STATE_NOT_INITIALIZED;
|
|
181
202
|
this.lastErrorCode = "0";
|
|
182
203
|
this.listenerArray = [];
|
|
204
|
+
this.startingData = undefined;
|
|
183
205
|
};
|
|
184
206
|
BaseAPI.prototype.initialize = function (callbackName, initializeMessage, terminationMessage) {
|
|
185
|
-
var returnValue = api_constants
|
|
207
|
+
var returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
186
208
|
if (this.isInitialized()) {
|
|
187
209
|
this.throwSCORMError(this._error_codes.INITIALIZED, initializeMessage);
|
|
188
210
|
}
|
|
@@ -193,17 +215,17 @@ var BaseAPI = (function () {
|
|
|
193
215
|
if (this.selfReportSessionTime) {
|
|
194
216
|
this.cmi.setStartTime();
|
|
195
217
|
}
|
|
196
|
-
this.currentState = api_constants
|
|
218
|
+
this.currentState = api_constants.global_constants.STATE_INITIALIZED;
|
|
197
219
|
this.lastErrorCode = "0";
|
|
198
|
-
returnValue = api_constants
|
|
220
|
+
returnValue = api_constants.global_constants.SCORM_TRUE;
|
|
199
221
|
this.processListeners(callbackName);
|
|
200
222
|
}
|
|
201
|
-
this.apiLog(callbackName, "returned: " + returnValue,
|
|
223
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
202
224
|
this.clearSCORMError(returnValue);
|
|
203
225
|
return returnValue;
|
|
204
226
|
};
|
|
205
227
|
BaseAPI.prototype.apiLog = function (functionName, logMessage, messageLevel, CMIElement) {
|
|
206
|
-
logMessage = (0,utilities
|
|
228
|
+
logMessage = (0,utilities.formatMessage)(functionName, logMessage, CMIElement);
|
|
207
229
|
if (messageLevel >= this.apiLogLevel) {
|
|
208
230
|
this.settings.onLogMessage(messageLevel, logMessage);
|
|
209
231
|
}
|
|
@@ -220,20 +242,20 @@ var BaseAPI = (function () {
|
|
|
220
242
|
return this._settings;
|
|
221
243
|
},
|
|
222
244
|
set: function (settings) {
|
|
223
|
-
this._settings = (0,tslib_es6
|
|
245
|
+
this._settings = (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, this._settings), settings);
|
|
224
246
|
},
|
|
225
247
|
enumerable: false,
|
|
226
248
|
configurable: true
|
|
227
249
|
});
|
|
228
250
|
BaseAPI.prototype.terminate = function (callbackName, checkTerminated) {
|
|
229
|
-
return (0,tslib_es6
|
|
251
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
230
252
|
var returnValue, result;
|
|
231
|
-
return (0,tslib_es6
|
|
253
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
232
254
|
switch (_a.label) {
|
|
233
255
|
case 0:
|
|
234
|
-
returnValue = api_constants
|
|
256
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
235
257
|
if (!this.checkState(checkTerminated, this._error_codes.TERMINATION_BEFORE_INIT, this._error_codes.MULTIPLE_TERMINATION)) return [3, 2];
|
|
236
|
-
this.currentState = api_constants
|
|
258
|
+
this.currentState = api_constants.global_constants.STATE_TERMINATED;
|
|
237
259
|
return [4, this.storeData(true)];
|
|
238
260
|
case 1:
|
|
239
261
|
result = _a.sent();
|
|
@@ -243,14 +265,14 @@ var BaseAPI = (function () {
|
|
|
243
265
|
returnValue =
|
|
244
266
|
typeof result !== "undefined" && result.result
|
|
245
267
|
? result.result
|
|
246
|
-
: api_constants
|
|
268
|
+
: api_constants.global_constants.SCORM_FALSE;
|
|
247
269
|
if (checkTerminated)
|
|
248
270
|
this.lastErrorCode = "0";
|
|
249
|
-
returnValue = api_constants
|
|
271
|
+
returnValue = api_constants.global_constants.SCORM_TRUE;
|
|
250
272
|
this.processListeners(callbackName);
|
|
251
273
|
_a.label = 2;
|
|
252
274
|
case 2:
|
|
253
|
-
this.apiLog(callbackName, "returned: " + returnValue,
|
|
275
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
254
276
|
this.clearSCORMError(returnValue);
|
|
255
277
|
return [2, returnValue];
|
|
256
278
|
}
|
|
@@ -270,7 +292,7 @@ var BaseAPI = (function () {
|
|
|
270
292
|
}
|
|
271
293
|
this.processListeners(callbackName, CMIElement);
|
|
272
294
|
}
|
|
273
|
-
this.apiLog(callbackName, ": returned: " + returnValue,
|
|
295
|
+
this.apiLog(callbackName, ": returned: " + returnValue, enums.LogLevelEnum.INFO, CMIElement);
|
|
274
296
|
if (returnValue === undefined) {
|
|
275
297
|
return "";
|
|
276
298
|
}
|
|
@@ -281,7 +303,7 @@ var BaseAPI = (function () {
|
|
|
281
303
|
if (value !== undefined) {
|
|
282
304
|
value = String(value);
|
|
283
305
|
}
|
|
284
|
-
var returnValue = api_constants
|
|
306
|
+
var returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
285
307
|
if (this.checkState(checkTerminated, this._error_codes.STORE_BEFORE_INIT, this._error_codes.STORE_AFTER_TERM)) {
|
|
286
308
|
if (checkTerminated)
|
|
287
309
|
this.lastErrorCode = "0";
|
|
@@ -294,27 +316,26 @@ var BaseAPI = (function () {
|
|
|
294
316
|
this.processListeners(callbackName, CMIElement, value);
|
|
295
317
|
}
|
|
296
318
|
if (returnValue === undefined) {
|
|
297
|
-
returnValue = api_constants
|
|
319
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
298
320
|
}
|
|
299
321
|
if (String(this.lastErrorCode) === "0") {
|
|
300
322
|
if (this.settings.autocommit) {
|
|
301
323
|
this.scheduleCommit(this.settings.autocommitSeconds * 1000, commitCallback);
|
|
302
324
|
}
|
|
303
325
|
}
|
|
304
|
-
this.apiLog(callbackName, ": " + value + ": result: " + returnValue,
|
|
326
|
+
this.apiLog(callbackName, ": " + value + ": result: " + returnValue, enums.LogLevelEnum.INFO, CMIElement);
|
|
305
327
|
this.clearSCORMError(returnValue);
|
|
306
328
|
return returnValue;
|
|
307
329
|
};
|
|
308
330
|
BaseAPI.prototype.commit = function (callbackName_1) {
|
|
309
|
-
return (0,tslib_es6
|
|
331
|
+
return (0,tslib_es6.__awaiter)(this, arguments, void 0, function (callbackName, checkTerminated) {
|
|
310
332
|
var returnValue, result;
|
|
311
333
|
if (checkTerminated === void 0) { checkTerminated = false; }
|
|
312
|
-
return (0,tslib_es6
|
|
334
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
313
335
|
switch (_a.label) {
|
|
314
336
|
case 0:
|
|
315
|
-
console.log("commit");
|
|
316
337
|
this.clearScheduledCommit();
|
|
317
|
-
returnValue = api_constants
|
|
338
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
318
339
|
if (!this.checkState(checkTerminated, this._error_codes.COMMIT_BEFORE_INIT, this._error_codes.COMMIT_AFTER_TERM)) return [3, 2];
|
|
319
340
|
return [4, this.storeData(false)];
|
|
320
341
|
case 1:
|
|
@@ -325,14 +346,14 @@ var BaseAPI = (function () {
|
|
|
325
346
|
returnValue =
|
|
326
347
|
typeof result !== "undefined" && result.result
|
|
327
348
|
? result.result
|
|
328
|
-
: api_constants
|
|
329
|
-
this.apiLog(callbackName, " Result: " + returnValue,
|
|
349
|
+
: api_constants.global_constants.SCORM_FALSE;
|
|
350
|
+
this.apiLog(callbackName, " Result: " + returnValue, enums.LogLevelEnum.DEBUG, "HttpRequest");
|
|
330
351
|
if (checkTerminated)
|
|
331
352
|
this.lastErrorCode = "0";
|
|
332
353
|
this.processListeners(callbackName);
|
|
333
354
|
_a.label = 2;
|
|
334
355
|
case 2:
|
|
335
|
-
this.apiLog(callbackName, "returned: " + returnValue,
|
|
356
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
336
357
|
this.clearSCORMError(returnValue);
|
|
337
358
|
return [2, returnValue];
|
|
338
359
|
}
|
|
@@ -342,7 +363,7 @@ var BaseAPI = (function () {
|
|
|
342
363
|
BaseAPI.prototype.getLastError = function (callbackName) {
|
|
343
364
|
var returnValue = String(this.lastErrorCode);
|
|
344
365
|
this.processListeners(callbackName);
|
|
345
|
-
this.apiLog(callbackName, "returned: " + returnValue,
|
|
366
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
346
367
|
return returnValue;
|
|
347
368
|
};
|
|
348
369
|
BaseAPI.prototype.getErrorString = function (callbackName, CMIErrorCode) {
|
|
@@ -351,7 +372,7 @@ var BaseAPI = (function () {
|
|
|
351
372
|
returnValue = this.getLmsErrorMessageDetails(CMIErrorCode);
|
|
352
373
|
this.processListeners(callbackName);
|
|
353
374
|
}
|
|
354
|
-
this.apiLog(callbackName, "returned: " + returnValue,
|
|
375
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
355
376
|
return returnValue;
|
|
356
377
|
};
|
|
357
378
|
BaseAPI.prototype.getDiagnostic = function (callbackName, CMIErrorCode) {
|
|
@@ -360,7 +381,7 @@ var BaseAPI = (function () {
|
|
|
360
381
|
returnValue = this.getLmsErrorMessageDetails(CMIErrorCode, true);
|
|
361
382
|
this.processListeners(callbackName);
|
|
362
383
|
}
|
|
363
|
-
this.apiLog(callbackName, "returned: " + returnValue,
|
|
384
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
364
385
|
return returnValue;
|
|
365
386
|
};
|
|
366
387
|
BaseAPI.prototype.checkState = function (checkTerminated, beforeInitError, afterTermError) {
|
|
@@ -386,11 +407,11 @@ var BaseAPI = (function () {
|
|
|
386
407
|
};
|
|
387
408
|
BaseAPI.prototype._commonSetCMIValue = function (methodName, scorm2004, CMIElement, value) {
|
|
388
409
|
if (!CMIElement || CMIElement === "") {
|
|
389
|
-
return api_constants
|
|
410
|
+
return api_constants.global_constants.SCORM_FALSE;
|
|
390
411
|
}
|
|
391
412
|
var structure = CMIElement.split(".");
|
|
392
413
|
var refObject = this;
|
|
393
|
-
var returnValue = api_constants
|
|
414
|
+
var returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
394
415
|
var foundFirstIndex = false;
|
|
395
416
|
var invalidErrorMessage = "The data model element passed to ".concat(methodName, " (").concat(CMIElement, ") is not a valid SCORM data model element.");
|
|
396
417
|
var invalidErrorCode = scorm2004
|
|
@@ -404,20 +425,20 @@ var BaseAPI = (function () {
|
|
|
404
425
|
this.throwSCORMError(this._error_codes.READ_ONLY_ELEMENT);
|
|
405
426
|
}
|
|
406
427
|
else {
|
|
407
|
-
refObject = (0,tslib_es6
|
|
428
|
+
refObject = (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, refObject), { attribute: value });
|
|
408
429
|
}
|
|
409
430
|
}
|
|
410
431
|
else if (!this._checkObjectHasProperty(refObject, attribute)) {
|
|
411
432
|
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
|
412
433
|
}
|
|
413
434
|
else {
|
|
414
|
-
if ((0,utilities
|
|
435
|
+
if ((0,utilities.stringMatches)(CMIElement, "\\.correct_responses\\.\\d+") &&
|
|
415
436
|
this.isInitialized()) {
|
|
416
437
|
this.validateCorrectResponse(CMIElement, value);
|
|
417
438
|
}
|
|
418
439
|
if (!scorm2004 || this.lastErrorCode === "0") {
|
|
419
440
|
refObject[attribute] = value;
|
|
420
|
-
returnValue = api_constants
|
|
441
|
+
returnValue = api_constants.global_constants.SCORM_TRUE;
|
|
421
442
|
}
|
|
422
443
|
}
|
|
423
444
|
}
|
|
@@ -427,7 +448,7 @@ var BaseAPI = (function () {
|
|
|
427
448
|
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
|
428
449
|
break;
|
|
429
450
|
}
|
|
430
|
-
if (refObject instanceof array
|
|
451
|
+
if (refObject instanceof array.CMIArray) {
|
|
431
452
|
var index = parseInt(structure[idx + 1], 10);
|
|
432
453
|
if (!isNaN(index)) {
|
|
433
454
|
var item = refObject.childArray[index];
|
|
@@ -453,8 +474,8 @@ var BaseAPI = (function () {
|
|
|
453
474
|
}
|
|
454
475
|
}
|
|
455
476
|
}
|
|
456
|
-
if (returnValue === api_constants
|
|
457
|
-
this.apiLog(methodName, "There was an error setting the value for: ".concat(CMIElement, ", value of: ").concat(value),
|
|
477
|
+
if (returnValue === api_constants.global_constants.SCORM_FALSE) {
|
|
478
|
+
this.apiLog(methodName, "There was an error setting the value for: ".concat(CMIElement, ", value of: ").concat(value), enums.LogLevelEnum.WARN);
|
|
458
479
|
}
|
|
459
480
|
return returnValue;
|
|
460
481
|
};
|
|
@@ -496,7 +517,7 @@ var BaseAPI = (function () {
|
|
|
496
517
|
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
|
497
518
|
break;
|
|
498
519
|
}
|
|
499
|
-
if (refObject instanceof array
|
|
520
|
+
if (refObject instanceof array.CMIArray) {
|
|
500
521
|
var index = parseInt(structure[idx + 1], 10);
|
|
501
522
|
if (!isNaN(index)) {
|
|
502
523
|
var item = refObject.childArray[index];
|
|
@@ -514,10 +535,10 @@ var BaseAPI = (function () {
|
|
|
514
535
|
if (refObject === null || refObject === undefined) {
|
|
515
536
|
if (!scorm2004) {
|
|
516
537
|
if (attribute === "_children") {
|
|
517
|
-
this.throwSCORMError(
|
|
538
|
+
this.throwSCORMError(this._error_codes.CHILDREN_ERROR);
|
|
518
539
|
}
|
|
519
540
|
else if (attribute === "_count") {
|
|
520
|
-
this.throwSCORMError(
|
|
541
|
+
this.throwSCORMError(this._error_codes.COUNT_ERROR);
|
|
521
542
|
}
|
|
522
543
|
}
|
|
523
544
|
}
|
|
@@ -526,13 +547,13 @@ var BaseAPI = (function () {
|
|
|
526
547
|
}
|
|
527
548
|
};
|
|
528
549
|
BaseAPI.prototype.isInitialized = function () {
|
|
529
|
-
return this.currentState === api_constants
|
|
550
|
+
return this.currentState === api_constants.global_constants.STATE_INITIALIZED;
|
|
530
551
|
};
|
|
531
552
|
BaseAPI.prototype.isNotInitialized = function () {
|
|
532
|
-
return this.currentState === api_constants
|
|
553
|
+
return this.currentState === api_constants.global_constants.STATE_NOT_INITIALIZED;
|
|
533
554
|
};
|
|
534
555
|
BaseAPI.prototype.isTerminated = function () {
|
|
535
|
-
return this.currentState === api_constants
|
|
556
|
+
return this.currentState === api_constants.global_constants.STATE_TERMINATED;
|
|
536
557
|
};
|
|
537
558
|
BaseAPI.prototype.on = function (listenerName, callback) {
|
|
538
559
|
if (!callback)
|
|
@@ -552,7 +573,7 @@ var BaseAPI = (function () {
|
|
|
552
573
|
CMIElement: CMIElement,
|
|
553
574
|
callback: callback,
|
|
554
575
|
});
|
|
555
|
-
this.apiLog("on", "Added event listener: ".concat(this.listenerArray.length),
|
|
576
|
+
this.apiLog("on", "Added event listener: ".concat(this.listenerArray.length), enums.LogLevelEnum.INFO, functionName);
|
|
556
577
|
}
|
|
557
578
|
};
|
|
558
579
|
BaseAPI.prototype.off = function (listenerName, callback) {
|
|
@@ -575,7 +596,7 @@ var BaseAPI = (function () {
|
|
|
575
596
|
});
|
|
576
597
|
if (removeIndex !== -1) {
|
|
577
598
|
this_1.listenerArray.splice(removeIndex, 1);
|
|
578
|
-
this_1.apiLog("off", "Removed event listener: ".concat(this_1.listenerArray.length),
|
|
599
|
+
this_1.apiLog("off", "Removed event listener: ".concat(this_1.listenerArray.length), enums.LogLevelEnum.INFO, functionName);
|
|
579
600
|
}
|
|
580
601
|
};
|
|
581
602
|
var this_1 = this;
|
|
@@ -608,7 +629,7 @@ var BaseAPI = (function () {
|
|
|
608
629
|
}
|
|
609
630
|
};
|
|
610
631
|
BaseAPI.prototype.processListeners = function (functionName, CMIElement, value) {
|
|
611
|
-
this.apiLog(functionName, value,
|
|
632
|
+
this.apiLog(functionName, value, enums.LogLevelEnum.INFO, CMIElement);
|
|
612
633
|
for (var i = 0; i < this.listenerArray.length; i++) {
|
|
613
634
|
var listener = this.listenerArray[i];
|
|
614
635
|
var functionsMatch = listener.functionName === functionName;
|
|
@@ -624,7 +645,7 @@ var BaseAPI = (function () {
|
|
|
624
645
|
CMIElementsMatch = listener.CMIElement === CMIElement;
|
|
625
646
|
}
|
|
626
647
|
if (functionsMatch && (!listenerHasCMIElement || CMIElementsMatch)) {
|
|
627
|
-
this.apiLog("processListeners", "Processing listener: ".concat(listener.functionName),
|
|
648
|
+
this.apiLog("processListeners", "Processing listener: ".concat(listener.functionName), enums.LogLevelEnum.INFO, CMIElement);
|
|
628
649
|
listener.callback(CMIElement, value);
|
|
629
650
|
}
|
|
630
651
|
}
|
|
@@ -633,11 +654,11 @@ var BaseAPI = (function () {
|
|
|
633
654
|
if (!message) {
|
|
634
655
|
message = this.getLmsErrorMessageDetails(errorNumber);
|
|
635
656
|
}
|
|
636
|
-
this.apiLog("throwSCORMError", errorNumber + ": " + message,
|
|
657
|
+
this.apiLog("throwSCORMError", errorNumber + ": " + message, enums.LogLevelEnum.ERROR);
|
|
637
658
|
this.lastErrorCode = String(errorNumber);
|
|
638
659
|
};
|
|
639
660
|
BaseAPI.prototype.clearSCORMError = function (success) {
|
|
640
|
-
if (success !== undefined && success !== api_constants
|
|
661
|
+
if (success !== undefined && success !== api_constants.global_constants.SCORM_FALSE) {
|
|
641
662
|
this.lastErrorCode = "0";
|
|
642
663
|
}
|
|
643
664
|
};
|
|
@@ -703,7 +724,7 @@ var BaseAPI = (function () {
|
|
|
703
724
|
result.forEach(function (element) {
|
|
704
725
|
obj = {};
|
|
705
726
|
obj[element[0]] = element[1];
|
|
706
|
-
_this.loadFromJSON((0,utilities
|
|
727
|
+
_this.loadFromJSON((0,utilities.unflatten)(obj), CMIElement);
|
|
707
728
|
});
|
|
708
729
|
};
|
|
709
730
|
BaseAPI.prototype.loadFromJSON = function (json, CMIElement) {
|
|
@@ -743,21 +764,21 @@ var BaseAPI = (function () {
|
|
|
743
764
|
return JSON.parse(this.renderCMIToJSONString());
|
|
744
765
|
};
|
|
745
766
|
BaseAPI.prototype.processHttpRequest = function (url_1, params_1) {
|
|
746
|
-
return (0,tslib_es6
|
|
767
|
+
return (0,tslib_es6.__awaiter)(this, arguments, void 0, function (url, params, immediate) {
|
|
747
768
|
var api, genericError, process;
|
|
748
769
|
var _this = this;
|
|
749
770
|
if (immediate === void 0) { immediate = false; }
|
|
750
|
-
return (0,tslib_es6
|
|
771
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
751
772
|
switch (_a.label) {
|
|
752
773
|
case 0:
|
|
753
774
|
api = this;
|
|
754
775
|
genericError = {
|
|
755
|
-
result: api_constants
|
|
776
|
+
result: api_constants.global_constants.SCORM_FALSE,
|
|
756
777
|
errorCode: this.error_codes.GENERAL,
|
|
757
778
|
};
|
|
758
779
|
if (immediate) {
|
|
759
|
-
this.performFetch(url, params).then(function (response) { return (0,tslib_es6
|
|
760
|
-
return (0,tslib_es6
|
|
780
|
+
this.performFetch(url, params).then(function (response) { return (0,tslib_es6.__awaiter)(_this, void 0, void 0, function () {
|
|
781
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
761
782
|
switch (_a.label) {
|
|
762
783
|
case 0: return [4, this.transformResponse(response)];
|
|
763
784
|
case 1:
|
|
@@ -767,13 +788,13 @@ var BaseAPI = (function () {
|
|
|
767
788
|
});
|
|
768
789
|
}); });
|
|
769
790
|
return [2, {
|
|
770
|
-
result: api_constants
|
|
791
|
+
result: api_constants.global_constants.SCORM_TRUE,
|
|
771
792
|
errorCode: 0,
|
|
772
793
|
}];
|
|
773
794
|
}
|
|
774
|
-
process = function (url, params, settings) { return (0,tslib_es6
|
|
795
|
+
process = function (url, params, settings) { return (0,tslib_es6.__awaiter)(_this, void 0, void 0, function () {
|
|
775
796
|
var response, e_1;
|
|
776
|
-
return (0,tslib_es6
|
|
797
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
777
798
|
switch (_a.label) {
|
|
778
799
|
case 0:
|
|
779
800
|
_a.trys.push([0, 2, , 3]);
|
|
@@ -784,7 +805,7 @@ var BaseAPI = (function () {
|
|
|
784
805
|
return [2, this.transformResponse(response)];
|
|
785
806
|
case 2:
|
|
786
807
|
e_1 = _a.sent();
|
|
787
|
-
this.apiLog("processHttpRequest", e_1,
|
|
808
|
+
this.apiLog("processHttpRequest", e_1, enums.LogLevelEnum.ERROR);
|
|
788
809
|
api.processListeners("CommitError");
|
|
789
810
|
return [2, genericError];
|
|
790
811
|
case 3: return [2];
|
|
@@ -800,14 +821,14 @@ var BaseAPI = (function () {
|
|
|
800
821
|
BaseAPI.prototype.scheduleCommit = function (when, callback) {
|
|
801
822
|
if (!this._timeout) {
|
|
802
823
|
this._timeout = new ScheduledCommit(this, when, callback);
|
|
803
|
-
this.apiLog("scheduleCommit", "scheduled",
|
|
824
|
+
this.apiLog("scheduleCommit", "scheduled", enums.LogLevelEnum.DEBUG, "");
|
|
804
825
|
}
|
|
805
826
|
};
|
|
806
827
|
BaseAPI.prototype.clearScheduledCommit = function () {
|
|
807
828
|
if (this._timeout) {
|
|
808
829
|
this._timeout.cancel();
|
|
809
830
|
this._timeout = undefined;
|
|
810
|
-
this.apiLog("clearScheduledCommit", "cleared",
|
|
831
|
+
this.apiLog("clearScheduledCommit", "cleared", enums.LogLevelEnum.DEBUG, "");
|
|
811
832
|
}
|
|
812
833
|
};
|
|
813
834
|
BaseAPI.prototype._checkObjectHasProperty = function (refObject, attribute) {
|
|
@@ -816,9 +837,9 @@ var BaseAPI = (function () {
|
|
|
816
837
|
attribute in refObject);
|
|
817
838
|
};
|
|
818
839
|
BaseAPI.prototype.handleValueAccessException = function (e, returnValue) {
|
|
819
|
-
if (e instanceof exceptions
|
|
840
|
+
if (e instanceof exceptions.ValidationError) {
|
|
820
841
|
this.lastErrorCode = String(e.errorCode);
|
|
821
|
-
returnValue = api_constants
|
|
842
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
822
843
|
}
|
|
823
844
|
else {
|
|
824
845
|
if (e instanceof Error && e.message) {
|
|
@@ -836,20 +857,20 @@ var BaseAPI = (function () {
|
|
|
836
857
|
var commitObject = this.settings.renderCommonCommitFields
|
|
837
858
|
? this.renderCommitObject(shouldTerminateCommit)
|
|
838
859
|
: this.renderCommitCMI(shouldTerminateCommit);
|
|
839
|
-
if (
|
|
860
|
+
if ([enums.LogLevelEnum.DEBUG, "1", 1, "DEBUG"].includes(this.apiLogLevel)) {
|
|
840
861
|
console.debug("Commit (terminated: " + (terminateCommit ? "yes" : "no") + "): ");
|
|
841
862
|
console.debug(commitObject);
|
|
842
863
|
}
|
|
843
864
|
return commitObject;
|
|
844
865
|
};
|
|
845
866
|
BaseAPI.prototype.performFetch = function (url, params) {
|
|
846
|
-
return (0,tslib_es6
|
|
847
|
-
return (0,tslib_es6
|
|
867
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
868
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
848
869
|
return [2, fetch(url, {
|
|
849
870
|
method: "POST",
|
|
850
871
|
mode: this.settings.fetchMode,
|
|
851
872
|
body: params instanceof Array ? params.join("&") : JSON.stringify(params),
|
|
852
|
-
headers: (0,tslib_es6
|
|
873
|
+
headers: (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, this.settings.xhrHeaders), { "Content-Type": this.settings.commitRequestDataType }),
|
|
853
874
|
credentials: this.settings.xhrWithCredentials ? "include" : undefined,
|
|
854
875
|
keepalive: true,
|
|
855
876
|
})];
|
|
@@ -857,9 +878,9 @@ var BaseAPI = (function () {
|
|
|
857
878
|
});
|
|
858
879
|
};
|
|
859
880
|
BaseAPI.prototype.transformResponse = function (response) {
|
|
860
|
-
return (0,tslib_es6
|
|
881
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
861
882
|
var result, _a;
|
|
862
|
-
return (0,tslib_es6
|
|
883
|
+
return (0,tslib_es6.__generator)(this, function (_c) {
|
|
863
884
|
switch (_c.label) {
|
|
864
885
|
case 0:
|
|
865
886
|
if (!(typeof this.settings.responseHandler === "function")) return [3, 2];
|
|
@@ -875,8 +896,7 @@ var BaseAPI = (function () {
|
|
|
875
896
|
result = _a;
|
|
876
897
|
if (response.status >= 200 &&
|
|
877
898
|
response.status <= 299 &&
|
|
878
|
-
(result.result === true ||
|
|
879
|
-
result.result === api_constants/* default */.A.global.SCORM_TRUE)) {
|
|
899
|
+
(result.result === true || result.result === api_constants.global_constants.SCORM_TRUE)) {
|
|
880
900
|
this.processListeners("CommitSuccess");
|
|
881
901
|
}
|
|
882
902
|
else {
|
|
@@ -897,6 +917,7 @@ var BaseAPI = (function () {
|
|
|
897
917
|
/***/ 941:
|
|
898
918
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
899
919
|
|
|
920
|
+
__webpack_require__.r(__webpack_exports__);
|
|
900
921
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
901
922
|
/* harmony export */ Scorm12Impl: function() { return /* binding */ Scorm12Impl; }
|
|
902
923
|
/* harmony export */ });
|
|
@@ -908,9 +929,9 @@ var BaseAPI = (function () {
|
|
|
908
929
|
/* harmony import */ var _cmi_scorm12_objectives__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(176);
|
|
909
930
|
/* harmony import */ var _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(833);
|
|
910
931
|
/* harmony import */ var _cmi_scorm12_nav__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(331);
|
|
911
|
-
/* harmony import */ var
|
|
912
|
-
/* harmony import */ var
|
|
913
|
-
/* harmony import */ var
|
|
932
|
+
/* harmony import */ var _constants_enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(56);
|
|
933
|
+
/* harmony import */ var _BaseAPI__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(429);
|
|
934
|
+
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(417);
|
|
914
935
|
|
|
915
936
|
|
|
916
937
|
|
|
@@ -924,7 +945,7 @@ var BaseAPI = (function () {
|
|
|
924
945
|
|
|
925
946
|
|
|
926
947
|
var Scorm12Impl = (function (_super) {
|
|
927
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
948
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(Scorm12Impl, _super);
|
|
928
949
|
function Scorm12Impl(settings) {
|
|
929
950
|
var _this = this;
|
|
930
951
|
if (settings) {
|
|
@@ -932,10 +953,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
932
953
|
settings.mastery_override = false;
|
|
933
954
|
}
|
|
934
955
|
}
|
|
935
|
-
_this = _super.call(this, _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__
|
|
956
|
+
_this = _super.call(this, _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors, settings) || this;
|
|
936
957
|
_this.statusSetByModule = false;
|
|
937
|
-
_this.cmi = new _cmi_scorm12_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
938
|
-
_this.nav = new _cmi_scorm12_nav__WEBPACK_IMPORTED_MODULE_6__
|
|
958
|
+
_this.cmi = new _cmi_scorm12_cmi__WEBPACK_IMPORTED_MODULE_0__.CMI();
|
|
959
|
+
_this.nav = new _cmi_scorm12_nav__WEBPACK_IMPORTED_MODULE_6__.NAV();
|
|
939
960
|
_this.LMSInitialize = _this.lmsInitialize;
|
|
940
961
|
_this.LMSFinish = _this.lmsFinish;
|
|
941
962
|
_this.LMSGetValue = _this.lmsGetValue;
|
|
@@ -947,9 +968,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
947
968
|
return _this;
|
|
948
969
|
}
|
|
949
970
|
Scorm12Impl.prototype.reset = function (settings) {
|
|
971
|
+
var _a, _b;
|
|
950
972
|
this.commonReset(settings);
|
|
951
|
-
this.cmi
|
|
952
|
-
this.nav
|
|
973
|
+
(_a = this.cmi) === null || _a === void 0 ? void 0 : _a.reset();
|
|
974
|
+
(_b = this.nav) === null || _b === void 0 ? void 0 : _b.reset();
|
|
953
975
|
};
|
|
954
976
|
Scorm12Impl.prototype.lmsInitialize = function () {
|
|
955
977
|
this.cmi.initialize();
|
|
@@ -963,8 +985,8 @@ var Scorm12Impl = (function (_super) {
|
|
|
963
985
|
};
|
|
964
986
|
Scorm12Impl.prototype.lmsFinish = function () {
|
|
965
987
|
var _this = this;
|
|
966
|
-
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
967
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
988
|
+
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(_this, void 0, void 0, function () {
|
|
989
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_a) {
|
|
968
990
|
switch (_a.label) {
|
|
969
991
|
case 0: return [4, this.internalFinish()];
|
|
970
992
|
case 1:
|
|
@@ -973,17 +995,17 @@ var Scorm12Impl = (function (_super) {
|
|
|
973
995
|
}
|
|
974
996
|
});
|
|
975
997
|
}); })();
|
|
976
|
-
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
998
|
+
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE;
|
|
977
999
|
};
|
|
978
1000
|
Scorm12Impl.prototype.internalFinish = function () {
|
|
979
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1001
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(this, void 0, void 0, function () {
|
|
980
1002
|
var result;
|
|
981
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1003
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_a) {
|
|
982
1004
|
switch (_a.label) {
|
|
983
1005
|
case 0: return [4, this.terminate("LMSFinish", true)];
|
|
984
1006
|
case 1:
|
|
985
1007
|
result = _a.sent();
|
|
986
|
-
if (result === _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1008
|
+
if (result === _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE) {
|
|
987
1009
|
if (this.nav.event !== "") {
|
|
988
1010
|
if (this.nav.event === "continue") {
|
|
989
1011
|
this.processListeners("SequenceNext");
|
|
@@ -1016,8 +1038,8 @@ var Scorm12Impl = (function (_super) {
|
|
|
1016
1038
|
this.scheduleCommit(500, "LMSCommit");
|
|
1017
1039
|
}
|
|
1018
1040
|
else {
|
|
1019
|
-
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1020
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1041
|
+
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(_this, void 0, void 0, function () {
|
|
1042
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_a) {
|
|
1021
1043
|
switch (_a.label) {
|
|
1022
1044
|
case 0: return [4, this.commit("LMSCommit", false)];
|
|
1023
1045
|
case 1:
|
|
@@ -1027,7 +1049,7 @@ var Scorm12Impl = (function (_super) {
|
|
|
1027
1049
|
});
|
|
1028
1050
|
}); })();
|
|
1029
1051
|
}
|
|
1030
|
-
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1052
|
+
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE;
|
|
1031
1053
|
};
|
|
1032
1054
|
Scorm12Impl.prototype.lmsGetLastError = function () {
|
|
1033
1055
|
return this.getLastError("LMSGetLastError");
|
|
@@ -1045,20 +1067,20 @@ var Scorm12Impl = (function (_super) {
|
|
|
1045
1067
|
return this._commonGetCMIValue("getCMIValue", false, CMIElement);
|
|
1046
1068
|
};
|
|
1047
1069
|
Scorm12Impl.prototype.getChildElement = function (CMIElement, _value, foundFirstIndex) {
|
|
1048
|
-
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1049
|
-
return new _cmi_scorm12_objectives__WEBPACK_IMPORTED_MODULE_4__
|
|
1070
|
+
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.objectives\\.\\d+")) {
|
|
1071
|
+
return new _cmi_scorm12_objectives__WEBPACK_IMPORTED_MODULE_4__.CMIObjectivesObject();
|
|
1050
1072
|
}
|
|
1051
1073
|
else if (foundFirstIndex &&
|
|
1052
|
-
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1053
|
-
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__
|
|
1074
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.interactions\\.\\d+\\.correct_responses\\.\\d+")) {
|
|
1075
|
+
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__.CMIInteractionsCorrectResponsesObject();
|
|
1054
1076
|
}
|
|
1055
1077
|
else if (foundFirstIndex &&
|
|
1056
|
-
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1057
|
-
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__
|
|
1078
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.interactions\\.\\d+\\.objectives\\.\\d+")) {
|
|
1079
|
+
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__.CMIInteractionsObjectivesObject();
|
|
1058
1080
|
}
|
|
1059
1081
|
else if (!foundFirstIndex &&
|
|
1060
|
-
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1061
|
-
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__
|
|
1082
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.interactions\\.\\d+")) {
|
|
1083
|
+
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__.CMIInteractionsObject();
|
|
1062
1084
|
}
|
|
1063
1085
|
return null;
|
|
1064
1086
|
};
|
|
@@ -1068,11 +1090,11 @@ var Scorm12Impl = (function (_super) {
|
|
|
1068
1090
|
var basicMessage = "No Error";
|
|
1069
1091
|
var detailMessage = "No Error";
|
|
1070
1092
|
errorNumber = String(errorNumber);
|
|
1071
|
-
if (_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1093
|
+
if (_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.error_descriptions[errorNumber]) {
|
|
1072
1094
|
basicMessage =
|
|
1073
|
-
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1095
|
+
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.error_descriptions[errorNumber].basicMessage;
|
|
1074
1096
|
detailMessage =
|
|
1075
|
-
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1097
|
+
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.error_descriptions[errorNumber].detailMessage;
|
|
1076
1098
|
}
|
|
1077
1099
|
return detail ? detailMessage : basicMessage;
|
|
1078
1100
|
};
|
|
@@ -1085,10 +1107,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
1085
1107
|
cmiExport.cmi.core.total_time = this.cmi.getCurrentTotalTime();
|
|
1086
1108
|
}
|
|
1087
1109
|
var result = [];
|
|
1088
|
-
var flattened = _utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1110
|
+
var flattened = _utilities__WEBPACK_IMPORTED_MODULE_1__.flatten(cmiExport);
|
|
1089
1111
|
switch (this.settings.dataCommitFormat) {
|
|
1090
1112
|
case "flattened":
|
|
1091
|
-
return _utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1113
|
+
return _utilities__WEBPACK_IMPORTED_MODULE_1__.flatten(cmiExport);
|
|
1092
1114
|
case "params":
|
|
1093
1115
|
for (var item in flattened) {
|
|
1094
1116
|
if ({}.hasOwnProperty.call(flattened, item)) {
|
|
@@ -1104,20 +1126,20 @@ var Scorm12Impl = (function (_super) {
|
|
|
1104
1126
|
Scorm12Impl.prototype.renderCommitObject = function (terminateCommit) {
|
|
1105
1127
|
var cmiExport = this.renderCommitCMI(terminateCommit);
|
|
1106
1128
|
var totalTimeHHMMSS = this.cmi.getCurrentTotalTime();
|
|
1107
|
-
var totalTimeSeconds = _utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1129
|
+
var totalTimeSeconds = _utilities__WEBPACK_IMPORTED_MODULE_1__.getTimeAsSeconds(totalTimeHHMMSS, _constants_regex__WEBPACK_IMPORTED_MODULE_9__.scorm12_regex.CMITimespan);
|
|
1108
1130
|
var lessonStatus = this.cmi.core.lesson_status;
|
|
1109
|
-
var completionStatus =
|
|
1110
|
-
var successStatus =
|
|
1131
|
+
var completionStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.CompletionStatus.unknown;
|
|
1132
|
+
var successStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.SuccessStatus.unknown;
|
|
1111
1133
|
if (lessonStatus) {
|
|
1112
1134
|
completionStatus =
|
|
1113
1135
|
lessonStatus === "completed" || lessonStatus === "passed"
|
|
1114
|
-
?
|
|
1115
|
-
:
|
|
1136
|
+
? _constants_enums__WEBPACK_IMPORTED_MODULE_7__.CompletionStatus.completed
|
|
1137
|
+
: _constants_enums__WEBPACK_IMPORTED_MODULE_7__.CompletionStatus.incomplete;
|
|
1116
1138
|
if (lessonStatus === "passed") {
|
|
1117
|
-
successStatus =
|
|
1139
|
+
successStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.SuccessStatus.passed;
|
|
1118
1140
|
}
|
|
1119
1141
|
else if (lessonStatus === "failed") {
|
|
1120
|
-
successStatus =
|
|
1142
|
+
successStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.SuccessStatus.failed;
|
|
1121
1143
|
}
|
|
1122
1144
|
}
|
|
1123
1145
|
var score = this.cmi.core.score;
|
|
@@ -1146,10 +1168,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
1146
1168
|
return commitObject;
|
|
1147
1169
|
};
|
|
1148
1170
|
Scorm12Impl.prototype.storeData = function (terminateCommit) {
|
|
1149
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1171
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(this, void 0, void 0, function () {
|
|
1150
1172
|
var originalStatus, commitObject;
|
|
1151
1173
|
var _a, _b, _c;
|
|
1152
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1174
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_d) {
|
|
1153
1175
|
switch (_d.label) {
|
|
1154
1176
|
case 0:
|
|
1155
1177
|
if (terminateCommit) {
|
|
@@ -1184,7 +1206,7 @@ var Scorm12Impl = (function (_super) {
|
|
|
1184
1206
|
return [4, this.processHttpRequest(this.settings.lmsCommitUrl, commitObject, terminateCommit)];
|
|
1185
1207
|
case 1: return [2, _d.sent()];
|
|
1186
1208
|
case 2: return [2, {
|
|
1187
|
-
result: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1209
|
+
result: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE,
|
|
1188
1210
|
errorCode: 0,
|
|
1189
1211
|
}];
|
|
1190
1212
|
}
|
|
@@ -1192,7 +1214,7 @@ var Scorm12Impl = (function (_super) {
|
|
|
1192
1214
|
});
|
|
1193
1215
|
};
|
|
1194
1216
|
return Scorm12Impl;
|
|
1195
|
-
}(
|
|
1217
|
+
}(_BaseAPI__WEBPACK_IMPORTED_MODULE_8__["default"]));
|
|
1196
1218
|
|
|
1197
1219
|
|
|
1198
1220
|
|
|
@@ -1201,29 +1223,40 @@ var Scorm12Impl = (function (_super) {
|
|
|
1201
1223
|
/***/ 589:
|
|
1202
1224
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1203
1225
|
|
|
1226
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1204
1227
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1205
|
-
/* harmony export */
|
|
1228
|
+
/* harmony export */ CMIArray: function() { return /* binding */ CMIArray; }
|
|
1206
1229
|
/* harmony export */ });
|
|
1207
|
-
/* unused harmony export scorm12_error_codes */
|
|
1208
1230
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(635);
|
|
1209
1231
|
/* harmony import */ var _base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
1210
|
-
/* harmony import */ var
|
|
1211
|
-
/* harmony import */ var
|
|
1232
|
+
/* harmony import */ var _exceptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(784);
|
|
1233
|
+
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(797);
|
|
1212
1234
|
|
|
1213
1235
|
|
|
1214
1236
|
|
|
1215
1237
|
|
|
1216
|
-
var scorm12_error_codes = _constants_error_codes__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.scorm12;
|
|
1217
1238
|
var CMIArray = (function (_super) {
|
|
1218
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_3__
|
|
1239
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(CMIArray, _super);
|
|
1219
1240
|
function CMIArray(params) {
|
|
1220
1241
|
var _this = _super.call(this) || this;
|
|
1221
1242
|
_this.__children = params.children;
|
|
1222
|
-
_this._errorCode = params.errorCode ||
|
|
1223
|
-
_this._errorClass = params.errorClass ||
|
|
1243
|
+
_this._errorCode = params.errorCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.GENERAL;
|
|
1244
|
+
_this._errorClass = params.errorClass || _exceptions__WEBPACK_IMPORTED_MODULE_1__.BaseScormValidationError;
|
|
1224
1245
|
_this.childArray = [];
|
|
1225
1246
|
return _this;
|
|
1226
1247
|
}
|
|
1248
|
+
CMIArray.prototype.reset = function (wipe) {
|
|
1249
|
+
if (wipe === void 0) { wipe = false; }
|
|
1250
|
+
this._initialized = false;
|
|
1251
|
+
if (wipe) {
|
|
1252
|
+
this.childArray = [];
|
|
1253
|
+
}
|
|
1254
|
+
else {
|
|
1255
|
+
for (var i = 0; i < this.childArray.length; i++) {
|
|
1256
|
+
this.childArray[i].reset();
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
};
|
|
1227
1260
|
Object.defineProperty(CMIArray.prototype, "_children", {
|
|
1228
1261
|
get: function () {
|
|
1229
1262
|
return this.__children;
|
|
@@ -1254,7 +1287,7 @@ var CMIArray = (function (_super) {
|
|
|
1254
1287
|
return result;
|
|
1255
1288
|
};
|
|
1256
1289
|
return CMIArray;
|
|
1257
|
-
}(_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
1290
|
+
}(_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
1258
1291
|
|
|
1259
1292
|
|
|
1260
1293
|
|
|
@@ -1263,9 +1296,10 @@ var CMIArray = (function (_super) {
|
|
|
1263
1296
|
/***/ 319:
|
|
1264
1297
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1265
1298
|
|
|
1299
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1266
1300
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1267
|
-
/* harmony export */
|
|
1268
|
-
/* harmony export */
|
|
1301
|
+
/* harmony export */ BaseCMI: function() { return /* binding */ BaseCMI; },
|
|
1302
|
+
/* harmony export */ BaseRootCMI: function() { return /* binding */ BaseRootCMI; }
|
|
1269
1303
|
/* harmony export */ });
|
|
1270
1304
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
1271
1305
|
|
|
@@ -1298,7 +1332,7 @@ var BaseCMI = (function () {
|
|
|
1298
1332
|
}());
|
|
1299
1333
|
|
|
1300
1334
|
var BaseRootCMI = (function (_super) {
|
|
1301
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_0__
|
|
1335
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(BaseRootCMI, _super);
|
|
1302
1336
|
function BaseRootCMI() {
|
|
1303
1337
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1304
1338
|
}
|
|
@@ -1312,10 +1346,10 @@ var BaseRootCMI = (function (_super) {
|
|
|
1312
1346
|
/***/ 434:
|
|
1313
1347
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1314
1348
|
|
|
1349
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1315
1350
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1316
|
-
/* harmony export */
|
|
1351
|
+
/* harmony export */ CMIScore: function() { return /* binding */ CMIScore; }
|
|
1317
1352
|
/* harmony export */ });
|
|
1318
|
-
/* unused harmony export scorm12_error_codes */
|
|
1319
1353
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(635);
|
|
1320
1354
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(340);
|
|
1321
1355
|
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(417);
|
|
@@ -1328,30 +1362,30 @@ var BaseRootCMI = (function (_super) {
|
|
|
1328
1362
|
|
|
1329
1363
|
|
|
1330
1364
|
|
|
1331
|
-
var scorm12_constants = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.scorm12;
|
|
1332
|
-
var scorm12_regex = _constants_regex__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.scorm12;
|
|
1333
|
-
var scorm12_error_codes = _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A.scorm12;
|
|
1334
1365
|
var CMIScore = (function (_super) {
|
|
1335
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_4__
|
|
1366
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(CMIScore, _super);
|
|
1336
1367
|
function CMIScore(params) {
|
|
1337
1368
|
var _this = _super.call(this) || this;
|
|
1338
1369
|
_this._raw = "";
|
|
1339
1370
|
_this._min = "";
|
|
1340
|
-
_this.__children = params.score_children || scorm12_constants.score_children;
|
|
1371
|
+
_this.__children = params.score_children || _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__.scorm12_constants.score_children;
|
|
1341
1372
|
_this.__score_range = !params.score_range
|
|
1342
1373
|
? false
|
|
1343
|
-
: scorm12_regex.score_range;
|
|
1374
|
+
: _constants_regex__WEBPACK_IMPORTED_MODULE_1__.scorm12_regex.score_range;
|
|
1344
1375
|
_this._max = params.max || params.max === "" ? params.max : "100";
|
|
1345
1376
|
_this.__invalid_error_code =
|
|
1346
|
-
params.invalidErrorCode ||
|
|
1377
|
+
params.invalidErrorCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.INVALID_SET_VALUE;
|
|
1347
1378
|
_this.__invalid_type_code =
|
|
1348
|
-
params.invalidTypeCode ||
|
|
1379
|
+
params.invalidTypeCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.TYPE_MISMATCH;
|
|
1349
1380
|
_this.__invalid_range_code =
|
|
1350
|
-
params.invalidRangeCode ||
|
|
1351
|
-
_this.__decimal_regex = params.decimalRegex || scorm12_regex.CMIDecimal;
|
|
1381
|
+
params.invalidRangeCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.VALUE_OUT_OF_RANGE;
|
|
1382
|
+
_this.__decimal_regex = params.decimalRegex || _constants_regex__WEBPACK_IMPORTED_MODULE_1__.scorm12_regex.CMIDecimal;
|
|
1352
1383
|
_this.__error_class = params.errorClass;
|
|
1353
1384
|
return _this;
|
|
1354
1385
|
}
|
|
1386
|
+
CMIScore.prototype.reset = function () {
|
|
1387
|
+
this._initialized = false;
|
|
1388
|
+
};
|
|
1355
1389
|
Object.defineProperty(CMIScore.prototype, "_children", {
|
|
1356
1390
|
get: function () {
|
|
1357
1391
|
return this.__children;
|
|
@@ -1367,9 +1401,9 @@ var CMIScore = (function (_super) {
|
|
|
1367
1401
|
return this._raw;
|
|
1368
1402
|
},
|
|
1369
1403
|
set: function (raw) {
|
|
1370
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1404
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidFormat)(raw, this.__decimal_regex, this.__invalid_type_code, this.__error_class) &&
|
|
1371
1405
|
(!this.__score_range ||
|
|
1372
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1406
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidRange)(raw, this.__score_range, this.__invalid_range_code, this.__error_class))) {
|
|
1373
1407
|
this._raw = raw;
|
|
1374
1408
|
}
|
|
1375
1409
|
},
|
|
@@ -1381,9 +1415,9 @@ var CMIScore = (function (_super) {
|
|
|
1381
1415
|
return this._min;
|
|
1382
1416
|
},
|
|
1383
1417
|
set: function (min) {
|
|
1384
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1418
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidFormat)(min, this.__decimal_regex, this.__invalid_type_code, this.__error_class) &&
|
|
1385
1419
|
(!this.__score_range ||
|
|
1386
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1420
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidRange)(min, this.__score_range, this.__invalid_range_code, this.__error_class))) {
|
|
1387
1421
|
this._min = min;
|
|
1388
1422
|
}
|
|
1389
1423
|
},
|
|
@@ -1395,9 +1429,9 @@ var CMIScore = (function (_super) {
|
|
|
1395
1429
|
return this._max;
|
|
1396
1430
|
},
|
|
1397
1431
|
set: function (max) {
|
|
1398
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1432
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidFormat)(max, this.__decimal_regex, this.__invalid_type_code, this.__error_class) &&
|
|
1399
1433
|
(!this.__score_range ||
|
|
1400
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1434
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidRange)(max, this.__score_range, this.__invalid_range_code, this.__error_class))) {
|
|
1401
1435
|
this._max = max;
|
|
1402
1436
|
}
|
|
1403
1437
|
},
|
|
@@ -1415,7 +1449,7 @@ var CMIScore = (function (_super) {
|
|
|
1415
1449
|
return result;
|
|
1416
1450
|
};
|
|
1417
1451
|
return CMIScore;
|
|
1418
|
-
}(_base_cmi__WEBPACK_IMPORTED_MODULE_2__
|
|
1452
|
+
}(_base_cmi__WEBPACK_IMPORTED_MODULE_2__.BaseCMI));
|
|
1419
1453
|
|
|
1420
1454
|
|
|
1421
1455
|
|
|
@@ -1424,9 +1458,10 @@ var CMIScore = (function (_super) {
|
|
|
1424
1458
|
/***/ 449:
|
|
1425
1459
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1426
1460
|
|
|
1461
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1427
1462
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1428
|
-
/* harmony export */
|
|
1429
|
-
/* harmony export */
|
|
1463
|
+
/* harmony export */ checkValidFormat: function() { return /* binding */ checkValidFormat; },
|
|
1464
|
+
/* harmony export */ checkValidRange: function() { return /* binding */ checkValidRange; }
|
|
1430
1465
|
/* harmony export */ });
|
|
1431
1466
|
function checkValidFormat(value, regexPattern, errorCode, errorClass, allowEmptyString) {
|
|
1432
1467
|
if (typeof value !== "string") {
|
|
@@ -1464,10 +1499,12 @@ function checkValidRange(value, rangePattern, errorCode, errorClass) {
|
|
|
1464
1499
|
/***/ 989:
|
|
1465
1500
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1466
1501
|
|
|
1502
|
+
// ESM COMPAT FLAG
|
|
1503
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1467
1504
|
|
|
1468
1505
|
// EXPORTS
|
|
1469
1506
|
__webpack_require__.d(__webpack_exports__, {
|
|
1470
|
-
|
|
1507
|
+
CMI: function() { return /* binding */ CMI; }
|
|
1471
1508
|
});
|
|
1472
1509
|
|
|
1473
1510
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs
|
|
@@ -1478,8 +1515,8 @@ var api_constants = __webpack_require__(340);
|
|
|
1478
1515
|
var error_codes = __webpack_require__(797);
|
|
1479
1516
|
// EXTERNAL MODULE: ./src/constants/regex.ts
|
|
1480
1517
|
var regex = __webpack_require__(417);
|
|
1481
|
-
// EXTERNAL MODULE: ./src/exceptions.ts
|
|
1482
|
-
var
|
|
1518
|
+
// EXTERNAL MODULE: ./src/exceptions/scorm12_exceptions.ts
|
|
1519
|
+
var scorm12_exceptions = __webpack_require__(179);
|
|
1483
1520
|
// EXTERNAL MODULE: ./src/cmi/common/base_cmi.ts
|
|
1484
1521
|
var base_cmi = __webpack_require__(319);
|
|
1485
1522
|
// EXTERNAL MODULE: ./src/cmi/scorm12/validation.ts
|
|
@@ -1499,10 +1536,10 @@ var utilities = __webpack_require__(864);
|
|
|
1499
1536
|
|
|
1500
1537
|
|
|
1501
1538
|
var CMICore = (function (_super) {
|
|
1502
|
-
(0,tslib_es6
|
|
1539
|
+
(0,tslib_es6.__extends)(CMICore, _super);
|
|
1503
1540
|
function CMICore() {
|
|
1504
1541
|
var _this = _super.call(this) || this;
|
|
1505
|
-
_this.__children = api_constants
|
|
1542
|
+
_this.__children = api_constants.scorm12_constants.core_children;
|
|
1506
1543
|
_this._student_id = "";
|
|
1507
1544
|
_this._student_name = "";
|
|
1508
1545
|
_this._lesson_location = "";
|
|
@@ -1514,13 +1551,13 @@ var CMICore = (function (_super) {
|
|
|
1514
1551
|
_this._exit = "";
|
|
1515
1552
|
_this._session_time = "00:00:00";
|
|
1516
1553
|
_this._suspend_data = "";
|
|
1517
|
-
_this.score = new score
|
|
1518
|
-
score_children: api_constants
|
|
1519
|
-
score_range: regex
|
|
1520
|
-
invalidErrorCode: error_codes
|
|
1521
|
-
invalidTypeCode: error_codes
|
|
1522
|
-
invalidRangeCode: error_codes
|
|
1523
|
-
errorClass:
|
|
1554
|
+
_this.score = new score.CMIScore({
|
|
1555
|
+
score_children: api_constants.scorm12_constants.score_children,
|
|
1556
|
+
score_range: regex.scorm12_regex.score_range,
|
|
1557
|
+
invalidErrorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
1558
|
+
invalidTypeCode: error_codes.scorm12_errors.TYPE_MISMATCH,
|
|
1559
|
+
invalidRangeCode: error_codes.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
1560
|
+
errorClass: scorm12_exceptions.Scorm12ValidationError,
|
|
1524
1561
|
});
|
|
1525
1562
|
return _this;
|
|
1526
1563
|
}
|
|
@@ -1529,12 +1566,20 @@ var CMICore = (function (_super) {
|
|
|
1529
1566
|
_super.prototype.initialize.call(this);
|
|
1530
1567
|
(_a = this.score) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
1531
1568
|
};
|
|
1569
|
+
CMICore.prototype.reset = function () {
|
|
1570
|
+
var _a;
|
|
1571
|
+
this._initialized = false;
|
|
1572
|
+
this._exit = "";
|
|
1573
|
+
this._entry = "";
|
|
1574
|
+
this._session_time = "00:00:00";
|
|
1575
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
1576
|
+
};
|
|
1532
1577
|
Object.defineProperty(CMICore.prototype, "_children", {
|
|
1533
1578
|
get: function () {
|
|
1534
1579
|
return this.__children;
|
|
1535
1580
|
},
|
|
1536
1581
|
set: function (_children) {
|
|
1537
|
-
throw new
|
|
1582
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.INVALID_SET_VALUE);
|
|
1538
1583
|
},
|
|
1539
1584
|
enumerable: false,
|
|
1540
1585
|
configurable: true
|
|
@@ -1545,7 +1590,7 @@ var CMICore = (function (_super) {
|
|
|
1545
1590
|
},
|
|
1546
1591
|
set: function (student_id) {
|
|
1547
1592
|
if (this.initialized) {
|
|
1548
|
-
throw new
|
|
1593
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1549
1594
|
}
|
|
1550
1595
|
else {
|
|
1551
1596
|
this._student_id = student_id;
|
|
@@ -1560,7 +1605,7 @@ var CMICore = (function (_super) {
|
|
|
1560
1605
|
},
|
|
1561
1606
|
set: function (student_name) {
|
|
1562
1607
|
if (this.initialized) {
|
|
1563
|
-
throw new
|
|
1608
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1564
1609
|
}
|
|
1565
1610
|
else {
|
|
1566
1611
|
this._student_name = student_name;
|
|
@@ -1574,7 +1619,7 @@ var CMICore = (function (_super) {
|
|
|
1574
1619
|
return this._lesson_location;
|
|
1575
1620
|
},
|
|
1576
1621
|
set: function (lesson_location) {
|
|
1577
|
-
if ((0,validation
|
|
1622
|
+
if ((0,validation.check12ValidFormat)(lesson_location, regex.scorm12_regex.CMIString256, true)) {
|
|
1578
1623
|
this._lesson_location = lesson_location;
|
|
1579
1624
|
}
|
|
1580
1625
|
},
|
|
@@ -1587,7 +1632,7 @@ var CMICore = (function (_super) {
|
|
|
1587
1632
|
},
|
|
1588
1633
|
set: function (credit) {
|
|
1589
1634
|
if (this.initialized) {
|
|
1590
|
-
throw new
|
|
1635
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1591
1636
|
}
|
|
1592
1637
|
else {
|
|
1593
1638
|
this._credit = credit;
|
|
@@ -1602,12 +1647,12 @@ var CMICore = (function (_super) {
|
|
|
1602
1647
|
},
|
|
1603
1648
|
set: function (lesson_status) {
|
|
1604
1649
|
if (this.initialized) {
|
|
1605
|
-
if ((0,validation
|
|
1650
|
+
if ((0,validation.check12ValidFormat)(lesson_status, regex.scorm12_regex.CMIStatus)) {
|
|
1606
1651
|
this._lesson_status = lesson_status;
|
|
1607
1652
|
}
|
|
1608
1653
|
}
|
|
1609
1654
|
else {
|
|
1610
|
-
if ((0,validation
|
|
1655
|
+
if ((0,validation.check12ValidFormat)(lesson_status, regex.scorm12_regex.CMIStatus2)) {
|
|
1611
1656
|
this._lesson_status = lesson_status;
|
|
1612
1657
|
}
|
|
1613
1658
|
}
|
|
@@ -1621,7 +1666,7 @@ var CMICore = (function (_super) {
|
|
|
1621
1666
|
},
|
|
1622
1667
|
set: function (entry) {
|
|
1623
1668
|
if (this.initialized) {
|
|
1624
|
-
throw new
|
|
1669
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1625
1670
|
}
|
|
1626
1671
|
else {
|
|
1627
1672
|
this._entry = entry;
|
|
@@ -1636,7 +1681,7 @@ var CMICore = (function (_super) {
|
|
|
1636
1681
|
},
|
|
1637
1682
|
set: function (total_time) {
|
|
1638
1683
|
if (this.initialized) {
|
|
1639
|
-
throw new
|
|
1684
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1640
1685
|
}
|
|
1641
1686
|
else {
|
|
1642
1687
|
this._total_time = total_time;
|
|
@@ -1651,7 +1696,7 @@ var CMICore = (function (_super) {
|
|
|
1651
1696
|
},
|
|
1652
1697
|
set: function (lesson_mode) {
|
|
1653
1698
|
if (this.initialized) {
|
|
1654
|
-
throw new
|
|
1699
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1655
1700
|
}
|
|
1656
1701
|
else {
|
|
1657
1702
|
this._lesson_mode = lesson_mode;
|
|
@@ -1663,12 +1708,12 @@ var CMICore = (function (_super) {
|
|
|
1663
1708
|
Object.defineProperty(CMICore.prototype, "exit", {
|
|
1664
1709
|
get: function () {
|
|
1665
1710
|
if (!this.jsonString) {
|
|
1666
|
-
throw new
|
|
1711
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1667
1712
|
}
|
|
1668
1713
|
return this._exit;
|
|
1669
1714
|
},
|
|
1670
1715
|
set: function (exit) {
|
|
1671
|
-
if ((0,validation
|
|
1716
|
+
if ((0,validation.check12ValidFormat)(exit, regex.scorm12_regex.CMIExit, true)) {
|
|
1672
1717
|
this._exit = exit;
|
|
1673
1718
|
}
|
|
1674
1719
|
},
|
|
@@ -1678,12 +1723,12 @@ var CMICore = (function (_super) {
|
|
|
1678
1723
|
Object.defineProperty(CMICore.prototype, "session_time", {
|
|
1679
1724
|
get: function () {
|
|
1680
1725
|
if (!this.jsonString) {
|
|
1681
|
-
throw new
|
|
1726
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1682
1727
|
}
|
|
1683
1728
|
return this._session_time;
|
|
1684
1729
|
},
|
|
1685
1730
|
set: function (session_time) {
|
|
1686
|
-
if ((0,validation
|
|
1731
|
+
if ((0,validation.check12ValidFormat)(session_time, regex.scorm12_regex.CMITimespan)) {
|
|
1687
1732
|
this._session_time = session_time;
|
|
1688
1733
|
}
|
|
1689
1734
|
},
|
|
@@ -1695,7 +1740,7 @@ var CMICore = (function (_super) {
|
|
|
1695
1740
|
return this._suspend_data;
|
|
1696
1741
|
},
|
|
1697
1742
|
set: function (suspend_data) {
|
|
1698
|
-
if ((0,validation
|
|
1743
|
+
if ((0,validation.check12ValidFormat)(suspend_data, regex.scorm12_regex.CMIString4096, true)) {
|
|
1699
1744
|
this._suspend_data = suspend_data;
|
|
1700
1745
|
}
|
|
1701
1746
|
},
|
|
@@ -1707,9 +1752,9 @@ var CMICore = (function (_super) {
|
|
|
1707
1752
|
var startTime = start_time;
|
|
1708
1753
|
if (typeof startTime !== "undefined" && startTime !== null) {
|
|
1709
1754
|
var seconds = new Date().getTime() - startTime;
|
|
1710
|
-
sessionTime = utilities
|
|
1755
|
+
sessionTime = utilities.getSecondsAsHHMMSS(seconds / 1000);
|
|
1711
1756
|
}
|
|
1712
|
-
return utilities
|
|
1757
|
+
return utilities.addHHMMSSTimeStrings(this._total_time, sessionTime, new RegExp(regex.scorm12_regex.CMITimespan));
|
|
1713
1758
|
};
|
|
1714
1759
|
CMICore.prototype.toJSON = function () {
|
|
1715
1760
|
this.jsonString = true;
|
|
@@ -1729,7 +1774,7 @@ var CMICore = (function (_super) {
|
|
|
1729
1774
|
return result;
|
|
1730
1775
|
};
|
|
1731
1776
|
return CMICore;
|
|
1732
|
-
}(base_cmi
|
|
1777
|
+
}(base_cmi.BaseCMI));
|
|
1733
1778
|
|
|
1734
1779
|
|
|
1735
1780
|
// EXTERNAL MODULE: ./src/cmi/scorm12/objectives.ts
|
|
@@ -1754,7 +1799,7 @@ var interactions = __webpack_require__(833);
|
|
|
1754
1799
|
|
|
1755
1800
|
|
|
1756
1801
|
var CMI = (function (_super) {
|
|
1757
|
-
(0,tslib_es6
|
|
1802
|
+
(0,tslib_es6.__extends)(CMI, _super);
|
|
1758
1803
|
function CMI(cmi_children, student_data, initialized) {
|
|
1759
1804
|
var _this = _super.call(this) || this;
|
|
1760
1805
|
_this.__children = "";
|
|
@@ -1766,14 +1811,25 @@ var CMI = (function (_super) {
|
|
|
1766
1811
|
_this.initialize();
|
|
1767
1812
|
_this.__children = cmi_children
|
|
1768
1813
|
? cmi_children
|
|
1769
|
-
: api_constants
|
|
1814
|
+
: api_constants.scorm12_constants.cmi_children;
|
|
1770
1815
|
_this.core = new CMICore();
|
|
1771
|
-
_this.objectives = new objectives
|
|
1772
|
-
_this.student_data = student_data ? student_data : new scorm12_student_data
|
|
1773
|
-
_this.student_preference = new student_preference
|
|
1774
|
-
_this.interactions = new interactions
|
|
1816
|
+
_this.objectives = new objectives.CMIObjectives();
|
|
1817
|
+
_this.student_data = student_data ? student_data : new scorm12_student_data.CMIStudentData();
|
|
1818
|
+
_this.student_preference = new student_preference.CMIStudentPreference();
|
|
1819
|
+
_this.interactions = new interactions.CMIInteractions();
|
|
1775
1820
|
return _this;
|
|
1776
1821
|
}
|
|
1822
|
+
CMI.prototype.reset = function () {
|
|
1823
|
+
var _a, _b, _c;
|
|
1824
|
+
this._initialized = false;
|
|
1825
|
+
this._launch_data = "";
|
|
1826
|
+
this._comments = "";
|
|
1827
|
+
(_a = this.core) === null || _a === void 0 ? void 0 : _a.reset();
|
|
1828
|
+
this.objectives = new objectives.CMIObjectives();
|
|
1829
|
+
this.interactions = new interactions.CMIInteractions();
|
|
1830
|
+
(_b = this.student_data) === null || _b === void 0 ? void 0 : _b.reset();
|
|
1831
|
+
(_c = this.student_preference) === null || _c === void 0 ? void 0 : _c.reset();
|
|
1832
|
+
};
|
|
1777
1833
|
CMI.prototype.initialize = function () {
|
|
1778
1834
|
var _a, _b, _c, _d, _e;
|
|
1779
1835
|
_super.prototype.initialize.call(this);
|
|
@@ -1804,7 +1860,7 @@ var CMI = (function (_super) {
|
|
|
1804
1860
|
return this.__version;
|
|
1805
1861
|
},
|
|
1806
1862
|
set: function (_version) {
|
|
1807
|
-
throw new
|
|
1863
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.INVALID_SET_VALUE);
|
|
1808
1864
|
},
|
|
1809
1865
|
enumerable: false,
|
|
1810
1866
|
configurable: true
|
|
@@ -1814,7 +1870,7 @@ var CMI = (function (_super) {
|
|
|
1814
1870
|
return this.__children;
|
|
1815
1871
|
},
|
|
1816
1872
|
set: function (_children) {
|
|
1817
|
-
throw new
|
|
1873
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.INVALID_SET_VALUE);
|
|
1818
1874
|
},
|
|
1819
1875
|
enumerable: false,
|
|
1820
1876
|
configurable: true
|
|
@@ -1838,7 +1894,7 @@ var CMI = (function (_super) {
|
|
|
1838
1894
|
},
|
|
1839
1895
|
set: function (launch_data) {
|
|
1840
1896
|
if (this.initialized) {
|
|
1841
|
-
throw new
|
|
1897
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1842
1898
|
}
|
|
1843
1899
|
else {
|
|
1844
1900
|
this._launch_data = launch_data;
|
|
@@ -1852,7 +1908,7 @@ var CMI = (function (_super) {
|
|
|
1852
1908
|
return this._comments;
|
|
1853
1909
|
},
|
|
1854
1910
|
set: function (comments) {
|
|
1855
|
-
if ((0,validation
|
|
1911
|
+
if ((0,validation.check12ValidFormat)(comments, regex.scorm12_regex.CMIString4096, true)) {
|
|
1856
1912
|
this._comments = comments;
|
|
1857
1913
|
}
|
|
1858
1914
|
},
|
|
@@ -1865,7 +1921,7 @@ var CMI = (function (_super) {
|
|
|
1865
1921
|
},
|
|
1866
1922
|
set: function (comments_from_lms) {
|
|
1867
1923
|
if (this.initialized) {
|
|
1868
|
-
throw new
|
|
1924
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1869
1925
|
}
|
|
1870
1926
|
else {
|
|
1871
1927
|
this._comments_from_lms = comments_from_lms;
|
|
@@ -1878,7 +1934,7 @@ var CMI = (function (_super) {
|
|
|
1878
1934
|
return this.core.getCurrentTotalTime(this.start_time);
|
|
1879
1935
|
};
|
|
1880
1936
|
return CMI;
|
|
1881
|
-
}(base_cmi
|
|
1937
|
+
}(base_cmi.BaseRootCMI));
|
|
1882
1938
|
|
|
1883
1939
|
|
|
1884
1940
|
|
|
@@ -1887,17 +1943,18 @@ var CMI = (function (_super) {
|
|
|
1887
1943
|
/***/ 833:
|
|
1888
1944
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1889
1945
|
|
|
1946
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1890
1947
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1891
|
-
/* harmony export */
|
|
1892
|
-
/* harmony export */
|
|
1893
|
-
/* harmony export */
|
|
1894
|
-
/* harmony export */
|
|
1948
|
+
/* harmony export */ CMIInteractions: function() { return /* binding */ CMIInteractions; },
|
|
1949
|
+
/* harmony export */ CMIInteractionsCorrectResponsesObject: function() { return /* binding */ CMIInteractionsCorrectResponsesObject; },
|
|
1950
|
+
/* harmony export */ CMIInteractionsObject: function() { return /* binding */ CMIInteractionsObject; },
|
|
1951
|
+
/* harmony export */ CMIInteractionsObjectivesObject: function() { return /* binding */ CMIInteractionsObjectivesObject; }
|
|
1895
1952
|
/* harmony export */ });
|
|
1896
1953
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(635);
|
|
1897
1954
|
/* harmony import */ var _common_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(589);
|
|
1898
1955
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
1899
1956
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(797);
|
|
1900
|
-
/* harmony import */ var
|
|
1957
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(179);
|
|
1901
1958
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(319);
|
|
1902
1959
|
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(915);
|
|
1903
1960
|
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(417);
|
|
@@ -1910,19 +1967,19 @@ var CMI = (function (_super) {
|
|
|
1910
1967
|
|
|
1911
1968
|
|
|
1912
1969
|
var CMIInteractions = (function (_super) {
|
|
1913
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
1970
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractions, _super);
|
|
1914
1971
|
function CMIInteractions() {
|
|
1915
1972
|
return _super.call(this, {
|
|
1916
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
1917
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__
|
|
1918
|
-
errorClass:
|
|
1973
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.interactions_children,
|
|
1974
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.INVALID_SET_VALUE,
|
|
1975
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError,
|
|
1919
1976
|
}) || this;
|
|
1920
1977
|
}
|
|
1921
1978
|
return CMIInteractions;
|
|
1922
|
-
}(_common_array__WEBPACK_IMPORTED_MODULE_0__
|
|
1979
|
+
}(_common_array__WEBPACK_IMPORTED_MODULE_0__.CMIArray));
|
|
1923
1980
|
|
|
1924
1981
|
var CMIInteractionsObject = (function (_super) {
|
|
1925
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
1982
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractionsObject, _super);
|
|
1926
1983
|
function CMIInteractionsObject() {
|
|
1927
1984
|
var _this = _super.call(this) || this;
|
|
1928
1985
|
_this._id = "";
|
|
@@ -1932,15 +1989,15 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1932
1989
|
_this._student_response = "";
|
|
1933
1990
|
_this._result = "";
|
|
1934
1991
|
_this._latency = "";
|
|
1935
|
-
_this.objectives = new _common_array__WEBPACK_IMPORTED_MODULE_0__
|
|
1936
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__
|
|
1937
|
-
errorClass:
|
|
1938
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
1992
|
+
_this.objectives = new _common_array__WEBPACK_IMPORTED_MODULE_0__.CMIArray({
|
|
1993
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.INVALID_SET_VALUE,
|
|
1994
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError,
|
|
1995
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.objectives_children,
|
|
1939
1996
|
});
|
|
1940
|
-
_this.correct_responses = new _common_array__WEBPACK_IMPORTED_MODULE_0__
|
|
1941
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__
|
|
1942
|
-
errorClass:
|
|
1943
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
1997
|
+
_this.correct_responses = new _common_array__WEBPACK_IMPORTED_MODULE_0__.CMIArray({
|
|
1998
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.INVALID_SET_VALUE,
|
|
1999
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError,
|
|
2000
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.correct_responses_children,
|
|
1944
2001
|
});
|
|
1945
2002
|
return _this;
|
|
1946
2003
|
}
|
|
@@ -1950,15 +2007,28 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1950
2007
|
(_a = this.objectives) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
1951
2008
|
(_b = this.correct_responses) === null || _b === void 0 ? void 0 : _b.initialize();
|
|
1952
2009
|
};
|
|
2010
|
+
CMIInteractionsObject.prototype.reset = function () {
|
|
2011
|
+
var _a, _b;
|
|
2012
|
+
this._initialized = false;
|
|
2013
|
+
this._id = "";
|
|
2014
|
+
this._time = "";
|
|
2015
|
+
this._type = "";
|
|
2016
|
+
this._weighting = "";
|
|
2017
|
+
this._student_response = "";
|
|
2018
|
+
this._result = "";
|
|
2019
|
+
this._latency = "";
|
|
2020
|
+
(_a = this.objectives) === null || _a === void 0 ? void 0 : _a.reset();
|
|
2021
|
+
(_b = this.correct_responses) === null || _b === void 0 ? void 0 : _b.reset();
|
|
2022
|
+
};
|
|
1953
2023
|
Object.defineProperty(CMIInteractionsObject.prototype, "id", {
|
|
1954
2024
|
get: function () {
|
|
1955
2025
|
if (!this.jsonString) {
|
|
1956
|
-
throw new
|
|
2026
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1957
2027
|
}
|
|
1958
2028
|
return this._id;
|
|
1959
2029
|
},
|
|
1960
2030
|
set: function (id) {
|
|
1961
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2031
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(id, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIIdentifier)) {
|
|
1962
2032
|
this._id = id;
|
|
1963
2033
|
}
|
|
1964
2034
|
},
|
|
@@ -1968,12 +2038,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1968
2038
|
Object.defineProperty(CMIInteractionsObject.prototype, "time", {
|
|
1969
2039
|
get: function () {
|
|
1970
2040
|
if (!this.jsonString) {
|
|
1971
|
-
throw new
|
|
2041
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1972
2042
|
}
|
|
1973
2043
|
return this._time;
|
|
1974
2044
|
},
|
|
1975
2045
|
set: function (time) {
|
|
1976
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2046
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(time, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMITime)) {
|
|
1977
2047
|
this._time = time;
|
|
1978
2048
|
}
|
|
1979
2049
|
},
|
|
@@ -1983,12 +2053,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1983
2053
|
Object.defineProperty(CMIInteractionsObject.prototype, "type", {
|
|
1984
2054
|
get: function () {
|
|
1985
2055
|
if (!this.jsonString) {
|
|
1986
|
-
throw new
|
|
2056
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1987
2057
|
}
|
|
1988
2058
|
return this._type;
|
|
1989
2059
|
},
|
|
1990
2060
|
set: function (type) {
|
|
1991
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2061
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(type, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIType)) {
|
|
1992
2062
|
this._type = type;
|
|
1993
2063
|
}
|
|
1994
2064
|
},
|
|
@@ -1998,13 +2068,13 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1998
2068
|
Object.defineProperty(CMIInteractionsObject.prototype, "weighting", {
|
|
1999
2069
|
get: function () {
|
|
2000
2070
|
if (!this.jsonString) {
|
|
2001
|
-
throw new
|
|
2071
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2002
2072
|
}
|
|
2003
2073
|
return this._weighting;
|
|
2004
2074
|
},
|
|
2005
2075
|
set: function (weighting) {
|
|
2006
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2007
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2076
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(weighting, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIDecimal) &&
|
|
2077
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidRange)(weighting, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.weighting_range)) {
|
|
2008
2078
|
this._weighting = weighting;
|
|
2009
2079
|
}
|
|
2010
2080
|
},
|
|
@@ -2014,12 +2084,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2014
2084
|
Object.defineProperty(CMIInteractionsObject.prototype, "student_response", {
|
|
2015
2085
|
get: function () {
|
|
2016
2086
|
if (!this.jsonString) {
|
|
2017
|
-
throw new
|
|
2087
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2018
2088
|
}
|
|
2019
2089
|
return this._student_response;
|
|
2020
2090
|
},
|
|
2021
2091
|
set: function (student_response) {
|
|
2022
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2092
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(student_response, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIFeedback, true)) {
|
|
2023
2093
|
this._student_response = student_response;
|
|
2024
2094
|
}
|
|
2025
2095
|
},
|
|
@@ -2029,12 +2099,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2029
2099
|
Object.defineProperty(CMIInteractionsObject.prototype, "result", {
|
|
2030
2100
|
get: function () {
|
|
2031
2101
|
if (!this.jsonString) {
|
|
2032
|
-
throw new
|
|
2102
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2033
2103
|
}
|
|
2034
2104
|
return this._result;
|
|
2035
2105
|
},
|
|
2036
2106
|
set: function (result) {
|
|
2037
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2107
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(result, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIResult)) {
|
|
2038
2108
|
this._result = result;
|
|
2039
2109
|
}
|
|
2040
2110
|
},
|
|
@@ -2044,12 +2114,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2044
2114
|
Object.defineProperty(CMIInteractionsObject.prototype, "latency", {
|
|
2045
2115
|
get: function () {
|
|
2046
2116
|
if (!this.jsonString) {
|
|
2047
|
-
throw new
|
|
2117
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2048
2118
|
}
|
|
2049
2119
|
return this._latency;
|
|
2050
2120
|
},
|
|
2051
2121
|
set: function (latency) {
|
|
2052
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2122
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(latency, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMITimespan)) {
|
|
2053
2123
|
this._latency = latency;
|
|
2054
2124
|
}
|
|
2055
2125
|
},
|
|
@@ -2073,21 +2143,25 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2073
2143
|
return result;
|
|
2074
2144
|
};
|
|
2075
2145
|
return CMIInteractionsObject;
|
|
2076
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__
|
|
2146
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__.BaseCMI));
|
|
2077
2147
|
|
|
2078
2148
|
var CMIInteractionsObjectivesObject = (function (_super) {
|
|
2079
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
2149
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractionsObjectivesObject, _super);
|
|
2080
2150
|
function CMIInteractionsObjectivesObject() {
|
|
2081
2151
|
var _this = _super.call(this) || this;
|
|
2082
2152
|
_this._id = "";
|
|
2083
2153
|
return _this;
|
|
2084
2154
|
}
|
|
2155
|
+
CMIInteractionsObjectivesObject.prototype.reset = function () {
|
|
2156
|
+
this._initialized = false;
|
|
2157
|
+
this._id = "";
|
|
2158
|
+
};
|
|
2085
2159
|
Object.defineProperty(CMIInteractionsObjectivesObject.prototype, "id", {
|
|
2086
2160
|
get: function () {
|
|
2087
2161
|
return this._id;
|
|
2088
2162
|
},
|
|
2089
2163
|
set: function (id) {
|
|
2090
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2164
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(id, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIIdentifier)) {
|
|
2091
2165
|
this._id = id;
|
|
2092
2166
|
}
|
|
2093
2167
|
},
|
|
@@ -2103,24 +2177,28 @@ var CMIInteractionsObjectivesObject = (function (_super) {
|
|
|
2103
2177
|
return result;
|
|
2104
2178
|
};
|
|
2105
2179
|
return CMIInteractionsObjectivesObject;
|
|
2106
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__
|
|
2180
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__.BaseCMI));
|
|
2107
2181
|
|
|
2108
2182
|
var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
2109
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
2183
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractionsCorrectResponsesObject, _super);
|
|
2110
2184
|
function CMIInteractionsCorrectResponsesObject() {
|
|
2111
2185
|
var _this = _super.call(this) || this;
|
|
2112
2186
|
_this._pattern = "";
|
|
2113
2187
|
return _this;
|
|
2114
2188
|
}
|
|
2189
|
+
CMIInteractionsCorrectResponsesObject.prototype.reset = function () {
|
|
2190
|
+
this._initialized = false;
|
|
2191
|
+
this._pattern = "";
|
|
2192
|
+
};
|
|
2115
2193
|
Object.defineProperty(CMIInteractionsCorrectResponsesObject.prototype, "pattern", {
|
|
2116
2194
|
get: function () {
|
|
2117
2195
|
if (!this.jsonString) {
|
|
2118
|
-
throw new
|
|
2196
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2119
2197
|
}
|
|
2120
2198
|
return this._pattern;
|
|
2121
2199
|
},
|
|
2122
2200
|
set: function (pattern) {
|
|
2123
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2201
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(pattern, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIFeedback, true)) {
|
|
2124
2202
|
this._pattern = pattern;
|
|
2125
2203
|
}
|
|
2126
2204
|
},
|
|
@@ -2136,7 +2214,7 @@ var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
|
2136
2214
|
return result;
|
|
2137
2215
|
};
|
|
2138
2216
|
return CMIInteractionsCorrectResponsesObject;
|
|
2139
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__
|
|
2217
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__.BaseCMI));
|
|
2140
2218
|
|
|
2141
2219
|
|
|
2142
2220
|
|
|
@@ -2145,8 +2223,9 @@ var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
|
2145
2223
|
/***/ 331:
|
|
2146
2224
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2147
2225
|
|
|
2226
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2148
2227
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2149
|
-
/* harmony export */
|
|
2228
|
+
/* harmony export */ NAV: function() { return /* binding */ NAV; }
|
|
2150
2229
|
/* harmony export */ });
|
|
2151
2230
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(635);
|
|
2152
2231
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
@@ -2157,18 +2236,22 @@ var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
|
2157
2236
|
|
|
2158
2237
|
|
|
2159
2238
|
var NAV = (function (_super) {
|
|
2160
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_3__
|
|
2239
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(NAV, _super);
|
|
2161
2240
|
function NAV() {
|
|
2162
2241
|
var _this = _super.call(this) || this;
|
|
2163
2242
|
_this._event = "";
|
|
2164
2243
|
return _this;
|
|
2165
2244
|
}
|
|
2245
|
+
NAV.prototype.reset = function () {
|
|
2246
|
+
this._event = "";
|
|
2247
|
+
this._initialized = false;
|
|
2248
|
+
};
|
|
2166
2249
|
Object.defineProperty(NAV.prototype, "event", {
|
|
2167
2250
|
get: function () {
|
|
2168
2251
|
return this._event;
|
|
2169
2252
|
},
|
|
2170
2253
|
set: function (event) {
|
|
2171
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_1__
|
|
2254
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_1__.check12ValidFormat)(event, _constants_regex__WEBPACK_IMPORTED_MODULE_2__.scorm12_regex.NAVEvent)) {
|
|
2172
2255
|
this._event = event;
|
|
2173
2256
|
}
|
|
2174
2257
|
},
|
|
@@ -2184,7 +2267,7 @@ var NAV = (function (_super) {
|
|
|
2184
2267
|
return result;
|
|
2185
2268
|
};
|
|
2186
2269
|
return NAV;
|
|
2187
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2270
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2188
2271
|
|
|
2189
2272
|
|
|
2190
2273
|
|
|
@@ -2193,9 +2276,10 @@ var NAV = (function (_super) {
|
|
|
2193
2276
|
/***/ 176:
|
|
2194
2277
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2195
2278
|
|
|
2279
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2196
2280
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2197
|
-
/* harmony export */
|
|
2198
|
-
/* harmony export */
|
|
2281
|
+
/* harmony export */ CMIObjectives: function() { return /* binding */ CMIObjectives; },
|
|
2282
|
+
/* harmony export */ CMIObjectivesObject: function() { return /* binding */ CMIObjectivesObject; }
|
|
2199
2283
|
/* harmony export */ });
|
|
2200
2284
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(635);
|
|
2201
2285
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
@@ -2203,7 +2287,7 @@ var NAV = (function (_super) {
|
|
|
2203
2287
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(340);
|
|
2204
2288
|
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(417);
|
|
2205
2289
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(797);
|
|
2206
|
-
/* harmony import */ var
|
|
2290
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(179);
|
|
2207
2291
|
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(915);
|
|
2208
2292
|
/* harmony import */ var _common_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(589);
|
|
2209
2293
|
|
|
@@ -2216,39 +2300,46 @@ var NAV = (function (_super) {
|
|
|
2216
2300
|
|
|
2217
2301
|
|
|
2218
2302
|
var CMIObjectives = (function (_super) {
|
|
2219
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_8__
|
|
2303
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(CMIObjectives, _super);
|
|
2220
2304
|
function CMIObjectives() {
|
|
2221
2305
|
return _super.call(this, {
|
|
2222
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
2223
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2224
|
-
errorClass:
|
|
2306
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.objectives_children,
|
|
2307
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.INVALID_SET_VALUE,
|
|
2308
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_5__.Scorm12ValidationError,
|
|
2225
2309
|
}) || this;
|
|
2226
2310
|
}
|
|
2227
2311
|
return CMIObjectives;
|
|
2228
|
-
}(_common_array__WEBPACK_IMPORTED_MODULE_7__
|
|
2312
|
+
}(_common_array__WEBPACK_IMPORTED_MODULE_7__.CMIArray));
|
|
2229
2313
|
|
|
2230
2314
|
var CMIObjectivesObject = (function (_super) {
|
|
2231
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_8__
|
|
2315
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(CMIObjectivesObject, _super);
|
|
2232
2316
|
function CMIObjectivesObject() {
|
|
2233
2317
|
var _this = _super.call(this) || this;
|
|
2234
2318
|
_this._id = "";
|
|
2235
2319
|
_this._status = "";
|
|
2236
|
-
_this.score = new _common_score__WEBPACK_IMPORTED_MODULE_1__
|
|
2237
|
-
score_children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
2238
|
-
score_range: _constants_regex__WEBPACK_IMPORTED_MODULE_3__
|
|
2239
|
-
invalidErrorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2240
|
-
invalidTypeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2241
|
-
invalidRangeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2242
|
-
errorClass:
|
|
2320
|
+
_this.score = new _common_score__WEBPACK_IMPORTED_MODULE_1__.CMIScore({
|
|
2321
|
+
score_children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.score_children,
|
|
2322
|
+
score_range: _constants_regex__WEBPACK_IMPORTED_MODULE_3__.scorm12_regex.score_range,
|
|
2323
|
+
invalidErrorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.INVALID_SET_VALUE,
|
|
2324
|
+
invalidTypeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.TYPE_MISMATCH,
|
|
2325
|
+
invalidRangeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
2326
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_5__.Scorm12ValidationError,
|
|
2243
2327
|
});
|
|
2244
2328
|
return _this;
|
|
2245
2329
|
}
|
|
2330
|
+
CMIObjectivesObject.prototype.reset = function () {
|
|
2331
|
+
var _a;
|
|
2332
|
+
this._initialized = false;
|
|
2333
|
+
this._id = "";
|
|
2334
|
+
this._status = "";
|
|
2335
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
2336
|
+
};
|
|
2246
2337
|
Object.defineProperty(CMIObjectivesObject.prototype, "id", {
|
|
2247
2338
|
get: function () {
|
|
2248
2339
|
return this._id;
|
|
2249
2340
|
},
|
|
2250
2341
|
set: function (id) {
|
|
2251
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__
|
|
2342
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__.check12ValidFormat)(id, _constants_regex__WEBPACK_IMPORTED_MODULE_3__.scorm12_regex.CMIIdentifier)) {
|
|
2252
2343
|
this._id = id;
|
|
2253
2344
|
}
|
|
2254
2345
|
},
|
|
@@ -2260,7 +2351,7 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2260
2351
|
return this._status;
|
|
2261
2352
|
},
|
|
2262
2353
|
set: function (status) {
|
|
2263
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__
|
|
2354
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__.check12ValidFormat)(status, _constants_regex__WEBPACK_IMPORTED_MODULE_3__.scorm12_regex.CMIStatus2)) {
|
|
2264
2355
|
this._status = status;
|
|
2265
2356
|
}
|
|
2266
2357
|
},
|
|
@@ -2278,7 +2369,7 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2278
2369
|
return result;
|
|
2279
2370
|
};
|
|
2280
2371
|
return CMIObjectivesObject;
|
|
2281
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2372
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2282
2373
|
|
|
2283
2374
|
|
|
2284
2375
|
|
|
@@ -2287,13 +2378,14 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2287
2378
|
/***/ 532:
|
|
2288
2379
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2289
2380
|
|
|
2381
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2290
2382
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2291
|
-
/* harmony export */
|
|
2383
|
+
/* harmony export */ CMIStudentData: function() { return /* binding */ CMIStudentData; }
|
|
2292
2384
|
/* harmony export */ });
|
|
2293
2385
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(635);
|
|
2294
2386
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
2295
2387
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
2296
|
-
/* harmony import */ var
|
|
2388
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(179);
|
|
2297
2389
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(797);
|
|
2298
2390
|
|
|
2299
2391
|
|
|
@@ -2301,7 +2393,7 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2301
2393
|
|
|
2302
2394
|
|
|
2303
2395
|
var CMIStudentData = (function (_super) {
|
|
2304
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_4__
|
|
2396
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(CMIStudentData, _super);
|
|
2305
2397
|
function CMIStudentData(student_data_children) {
|
|
2306
2398
|
var _this = _super.call(this) || this;
|
|
2307
2399
|
_this._mastery_score = "";
|
|
@@ -2309,15 +2401,18 @@ var CMIStudentData = (function (_super) {
|
|
|
2309
2401
|
_this._time_limit_action = "";
|
|
2310
2402
|
_this.__children = student_data_children
|
|
2311
2403
|
? student_data_children
|
|
2312
|
-
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
2404
|
+
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.student_data_children;
|
|
2313
2405
|
return _this;
|
|
2314
2406
|
}
|
|
2407
|
+
CMIStudentData.prototype.reset = function () {
|
|
2408
|
+
this._initialized = false;
|
|
2409
|
+
};
|
|
2315
2410
|
Object.defineProperty(CMIStudentData.prototype, "_children", {
|
|
2316
2411
|
get: function () {
|
|
2317
2412
|
return this.__children;
|
|
2318
2413
|
},
|
|
2319
2414
|
set: function (_children) {
|
|
2320
|
-
throw new
|
|
2415
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.INVALID_SET_VALUE);
|
|
2321
2416
|
},
|
|
2322
2417
|
enumerable: false,
|
|
2323
2418
|
configurable: true
|
|
@@ -2328,7 +2423,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2328
2423
|
},
|
|
2329
2424
|
set: function (mastery_score) {
|
|
2330
2425
|
if (this.initialized) {
|
|
2331
|
-
throw new
|
|
2426
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.READ_ONLY_ELEMENT);
|
|
2332
2427
|
}
|
|
2333
2428
|
else {
|
|
2334
2429
|
this._mastery_score = mastery_score;
|
|
@@ -2343,7 +2438,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2343
2438
|
},
|
|
2344
2439
|
set: function (max_time_allowed) {
|
|
2345
2440
|
if (this.initialized) {
|
|
2346
|
-
throw new
|
|
2441
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.READ_ONLY_ELEMENT);
|
|
2347
2442
|
}
|
|
2348
2443
|
else {
|
|
2349
2444
|
this._max_time_allowed = max_time_allowed;
|
|
@@ -2358,7 +2453,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2358
2453
|
},
|
|
2359
2454
|
set: function (time_limit_action) {
|
|
2360
2455
|
if (this.initialized) {
|
|
2361
|
-
throw new
|
|
2456
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.READ_ONLY_ELEMENT);
|
|
2362
2457
|
}
|
|
2363
2458
|
else {
|
|
2364
2459
|
this._time_limit_action = time_limit_action;
|
|
@@ -2378,7 +2473,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2378
2473
|
return result;
|
|
2379
2474
|
};
|
|
2380
2475
|
return CMIStudentData;
|
|
2381
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2476
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2382
2477
|
|
|
2383
2478
|
|
|
2384
2479
|
|
|
@@ -2387,16 +2482,17 @@ var CMIStudentData = (function (_super) {
|
|
|
2387
2482
|
/***/ 181:
|
|
2388
2483
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2389
2484
|
|
|
2485
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2390
2486
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2391
|
-
/* harmony export */
|
|
2487
|
+
/* harmony export */ CMIStudentPreference: function() { return /* binding */ CMIStudentPreference; }
|
|
2392
2488
|
/* harmony export */ });
|
|
2393
2489
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(635);
|
|
2394
2490
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
2395
2491
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
2396
|
-
/* harmony import */ var
|
|
2397
|
-
/* harmony import */ var
|
|
2398
|
-
/* harmony import */ var
|
|
2399
|
-
/* harmony import */ var
|
|
2492
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(179);
|
|
2493
|
+
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(915);
|
|
2494
|
+
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(417);
|
|
2495
|
+
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(797);
|
|
2400
2496
|
|
|
2401
2497
|
|
|
2402
2498
|
|
|
@@ -2405,7 +2501,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2405
2501
|
|
|
2406
2502
|
|
|
2407
2503
|
var CMIStudentPreference = (function (_super) {
|
|
2408
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_6__
|
|
2504
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(CMIStudentPreference, _super);
|
|
2409
2505
|
function CMIStudentPreference(student_preference_children) {
|
|
2410
2506
|
var _this = _super.call(this) || this;
|
|
2411
2507
|
_this._audio = "";
|
|
@@ -2414,15 +2510,18 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2414
2510
|
_this._text = "";
|
|
2415
2511
|
_this.__children = student_preference_children
|
|
2416
2512
|
? student_preference_children
|
|
2417
|
-
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
2513
|
+
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.student_preference_children;
|
|
2418
2514
|
return _this;
|
|
2419
2515
|
}
|
|
2516
|
+
CMIStudentPreference.prototype.reset = function () {
|
|
2517
|
+
this._initialized = false;
|
|
2518
|
+
};
|
|
2420
2519
|
Object.defineProperty(CMIStudentPreference.prototype, "_children", {
|
|
2421
2520
|
get: function () {
|
|
2422
2521
|
return this.__children;
|
|
2423
2522
|
},
|
|
2424
2523
|
set: function (_children) {
|
|
2425
|
-
throw new
|
|
2524
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_5__.scorm12_errors.INVALID_SET_VALUE);
|
|
2426
2525
|
},
|
|
2427
2526
|
enumerable: false,
|
|
2428
2527
|
configurable: true
|
|
@@ -2432,8 +2531,8 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2432
2531
|
return this._audio;
|
|
2433
2532
|
},
|
|
2434
2533
|
set: function (audio) {
|
|
2435
|
-
if ((0,
|
|
2436
|
-
(0,
|
|
2534
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(audio, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMISInteger) &&
|
|
2535
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidRange)(audio, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.audio_range)) {
|
|
2437
2536
|
this._audio = audio;
|
|
2438
2537
|
}
|
|
2439
2538
|
},
|
|
@@ -2445,7 +2544,7 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2445
2544
|
return this._language;
|
|
2446
2545
|
},
|
|
2447
2546
|
set: function (language) {
|
|
2448
|
-
if ((0,
|
|
2547
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(language, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMIString256)) {
|
|
2449
2548
|
this._language = language;
|
|
2450
2549
|
}
|
|
2451
2550
|
},
|
|
@@ -2457,8 +2556,8 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2457
2556
|
return this._speed;
|
|
2458
2557
|
},
|
|
2459
2558
|
set: function (speed) {
|
|
2460
|
-
if ((0,
|
|
2461
|
-
(0,
|
|
2559
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(speed, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMISInteger) &&
|
|
2560
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidRange)(speed, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.speed_range)) {
|
|
2462
2561
|
this._speed = speed;
|
|
2463
2562
|
}
|
|
2464
2563
|
},
|
|
@@ -2470,8 +2569,8 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2470
2569
|
return this._text;
|
|
2471
2570
|
},
|
|
2472
2571
|
set: function (text) {
|
|
2473
|
-
if ((0,
|
|
2474
|
-
(0,
|
|
2572
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(text, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMISInteger) &&
|
|
2573
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidRange)(text, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.text_range)) {
|
|
2475
2574
|
this._text = text;
|
|
2476
2575
|
}
|
|
2477
2576
|
},
|
|
@@ -2490,7 +2589,7 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2490
2589
|
return result;
|
|
2491
2590
|
};
|
|
2492
2591
|
return CMIStudentPreference;
|
|
2493
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2592
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2494
2593
|
|
|
2495
2594
|
|
|
2496
2595
|
|
|
@@ -2499,24 +2598,25 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2499
2598
|
/***/ 915:
|
|
2500
2599
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2501
2600
|
|
|
2601
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2502
2602
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2503
|
-
/* harmony export */
|
|
2504
|
-
/* harmony export */
|
|
2603
|
+
/* harmony export */ check12ValidFormat: function() { return /* binding */ check12ValidFormat; },
|
|
2604
|
+
/* harmony export */ check12ValidRange: function() { return /* binding */ check12ValidRange; }
|
|
2505
2605
|
/* harmony export */ });
|
|
2506
2606
|
/* harmony import */ var _common_validation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(449);
|
|
2507
2607
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
|
|
2508
|
-
/* harmony import */ var
|
|
2608
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
|
|
2509
2609
|
|
|
2510
2610
|
|
|
2511
2611
|
|
|
2512
2612
|
function check12ValidFormat(value, regexPattern, allowEmptyString) {
|
|
2513
|
-
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__
|
|
2613
|
+
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);
|
|
2514
2614
|
}
|
|
2515
2615
|
function check12ValidRange(value, rangePattern, allowEmptyString) {
|
|
2516
2616
|
if (!allowEmptyString && value === "") {
|
|
2517
|
-
throw new
|
|
2617
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_0__.scorm12_errors.VALUE_OUT_OF_RANGE);
|
|
2518
2618
|
}
|
|
2519
|
-
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__
|
|
2619
|
+
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);
|
|
2520
2620
|
}
|
|
2521
2621
|
|
|
2522
2622
|
|
|
@@ -2525,21 +2625,23 @@ function check12ValidRange(value, rangePattern, allowEmptyString) {
|
|
|
2525
2625
|
/***/ 340:
|
|
2526
2626
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2527
2627
|
|
|
2628
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2629
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2630
|
+
/* harmony export */ aicc_constants: function() { return /* binding */ aicc_constants; },
|
|
2631
|
+
/* harmony export */ global_constants: function() { return /* binding */ global_constants; },
|
|
2632
|
+
/* harmony export */ scorm12_constants: function() { return /* binding */ scorm12_constants; },
|
|
2633
|
+
/* harmony export */ scorm2004_constants: function() { return /* binding */ scorm2004_constants; }
|
|
2634
|
+
/* harmony export */ });
|
|
2528
2635
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2529
2636
|
|
|
2530
|
-
var
|
|
2637
|
+
var global_constants = {
|
|
2531
2638
|
SCORM_TRUE: "true",
|
|
2532
2639
|
SCORM_FALSE: "false",
|
|
2533
2640
|
STATE_NOT_INITIALIZED: 0,
|
|
2534
2641
|
STATE_INITIALIZED: 1,
|
|
2535
2642
|
STATE_TERMINATED: 2,
|
|
2536
|
-
LOG_LEVEL_DEBUG: 1,
|
|
2537
|
-
LOG_LEVEL_INFO: 2,
|
|
2538
|
-
LOG_LEVEL_WARNING: 3,
|
|
2539
|
-
LOG_LEVEL_ERROR: 4,
|
|
2540
|
-
LOG_LEVEL_NONE: 5,
|
|
2541
2643
|
};
|
|
2542
|
-
var
|
|
2644
|
+
var scorm12_constants = {
|
|
2543
2645
|
cmi_children: "core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions",
|
|
2544
2646
|
core_children: "student_id,student_name,lesson_location,credit,lesson_status,entry,score,total_time,lesson_mode,exit,session_time",
|
|
2545
2647
|
score_children: "raw,min,max",
|
|
@@ -2600,7 +2702,7 @@ var scorm12 = {
|
|
|
2600
2702
|
},
|
|
2601
2703
|
},
|
|
2602
2704
|
};
|
|
2603
|
-
var
|
|
2705
|
+
var aicc_constants = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, scorm12_constants), {
|
|
2604
2706
|
cmi_children: "core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions,evaluation",
|
|
2605
2707
|
student_preference_children: "audio,language,lesson_type,speed,text,text_color,text_location,text_size,video,windows",
|
|
2606
2708
|
student_data_children: "attempt_number,tries,mastery_score,max_time_allowed,time_limit_action",
|
|
@@ -2609,7 +2711,7 @@ var aicc = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .Cl)((0,tslib__W
|
|
|
2609
2711
|
attempt_records_children: "score,lesson_status",
|
|
2610
2712
|
paths_children: "location_id,date,time,status,why_left,time_in_element",
|
|
2611
2713
|
});
|
|
2612
|
-
var
|
|
2714
|
+
var scorm2004_constants = {
|
|
2613
2715
|
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",
|
|
2614
2716
|
comments_children: "comment,timestamp,location",
|
|
2615
2717
|
score_children: "max,raw,scaled,min",
|
|
@@ -2618,6 +2720,7 @@ var scorm2004 = {
|
|
|
2618
2720
|
student_data_children: "mastery_score,max_time_allowed,time_limit_action",
|
|
2619
2721
|
student_preference_children: "audio_level,audio_captioning,delivery_speed,language",
|
|
2620
2722
|
interactions_children: "id,type,objectives,timestamp,correct_responses,weighting,learner_response,result,latency,description",
|
|
2723
|
+
adl_data_children: "id,store",
|
|
2621
2724
|
error_descriptions: {
|
|
2622
2725
|
"0": {
|
|
2623
2726
|
basicMessage: "No Error",
|
|
@@ -2725,13 +2828,6 @@ var scorm2004 = {
|
|
|
2725
2828
|
},
|
|
2726
2829
|
},
|
|
2727
2830
|
};
|
|
2728
|
-
var APIConstants = {
|
|
2729
|
-
global: global,
|
|
2730
|
-
scorm12: scorm12,
|
|
2731
|
-
aicc: aicc,
|
|
2732
|
-
scorm2004: scorm2004,
|
|
2733
|
-
};
|
|
2734
|
-
/* harmony default export */ __webpack_exports__.A = (APIConstants);
|
|
2735
2831
|
|
|
2736
2832
|
|
|
2737
2833
|
/***/ }),
|
|
@@ -2739,11 +2835,13 @@ var APIConstants = {
|
|
|
2739
2835
|
/***/ 56:
|
|
2740
2836
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2741
2837
|
|
|
2838
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2742
2839
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2743
|
-
/* harmony export */
|
|
2744
|
-
/* harmony export */
|
|
2840
|
+
/* harmony export */ CompletionStatus: function() { return /* binding */ CompletionStatus; },
|
|
2841
|
+
/* harmony export */ LogLevelEnum: function() { return /* binding */ LogLevelEnum; },
|
|
2842
|
+
/* harmony export */ NAVBoolean: function() { return /* binding */ NAVBoolean; },
|
|
2843
|
+
/* harmony export */ SuccessStatus: function() { return /* binding */ SuccessStatus; }
|
|
2745
2844
|
/* harmony export */ });
|
|
2746
|
-
/* unused harmony export NAVBoolean */
|
|
2747
2845
|
var NAVBoolean;
|
|
2748
2846
|
(function (NAVBoolean) {
|
|
2749
2847
|
NAVBoolean["unknown"] = "unknown";
|
|
@@ -2762,6 +2860,15 @@ var CompletionStatus;
|
|
|
2762
2860
|
CompletionStatus["incomplete"] = "incomplete";
|
|
2763
2861
|
CompletionStatus["unknown"] = "unknown";
|
|
2764
2862
|
})(CompletionStatus || (CompletionStatus = {}));
|
|
2863
|
+
var LogLevelEnum;
|
|
2864
|
+
(function (LogLevelEnum) {
|
|
2865
|
+
LogLevelEnum[LogLevelEnum["_"] = 0] = "_";
|
|
2866
|
+
LogLevelEnum[LogLevelEnum["DEBUG"] = 1] = "DEBUG";
|
|
2867
|
+
LogLevelEnum[LogLevelEnum["INFO"] = 2] = "INFO";
|
|
2868
|
+
LogLevelEnum[LogLevelEnum["WARN"] = 3] = "WARN";
|
|
2869
|
+
LogLevelEnum[LogLevelEnum["ERROR"] = 4] = "ERROR";
|
|
2870
|
+
LogLevelEnum[LogLevelEnum["NONE"] = 5] = "NONE";
|
|
2871
|
+
})(LogLevelEnum || (LogLevelEnum = {}));
|
|
2765
2872
|
|
|
2766
2873
|
|
|
2767
2874
|
/***/ }),
|
|
@@ -2769,9 +2876,15 @@ var CompletionStatus;
|
|
|
2769
2876
|
/***/ 797:
|
|
2770
2877
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2771
2878
|
|
|
2879
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2880
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2881
|
+
/* harmony export */ global_errors: function() { return /* binding */ global_errors; },
|
|
2882
|
+
/* harmony export */ scorm12_errors: function() { return /* binding */ scorm12_errors; },
|
|
2883
|
+
/* harmony export */ scorm2004_errors: function() { return /* binding */ scorm2004_errors; }
|
|
2884
|
+
/* harmony export */ });
|
|
2772
2885
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2773
2886
|
|
|
2774
|
-
var
|
|
2887
|
+
var global_errors = {
|
|
2775
2888
|
GENERAL: 101,
|
|
2776
2889
|
INITIALIZATION_FAILED: 101,
|
|
2777
2890
|
INITIALIZED: 101,
|
|
@@ -2801,13 +2914,8 @@ var global = {
|
|
|
2801
2914
|
VALUE_OUT_OF_RANGE: 101,
|
|
2802
2915
|
DEPENDENCY_NOT_ESTABLISHED: 101,
|
|
2803
2916
|
};
|
|
2804
|
-
var
|
|
2805
|
-
var
|
|
2806
|
-
var ErrorCodes = {
|
|
2807
|
-
scorm12: scorm12,
|
|
2808
|
-
scorm2004: scorm2004,
|
|
2809
|
-
};
|
|
2810
|
-
/* harmony default export */ __webpack_exports__.A = (ErrorCodes);
|
|
2917
|
+
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 });
|
|
2918
|
+
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 });
|
|
2811
2919
|
|
|
2812
2920
|
|
|
2813
2921
|
/***/ }),
|
|
@@ -2815,9 +2923,15 @@ var ErrorCodes = {
|
|
|
2815
2923
|
/***/ 417:
|
|
2816
2924
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2817
2925
|
|
|
2926
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2927
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2928
|
+
/* harmony export */ aicc_regex: function() { return /* binding */ aicc_regex; },
|
|
2929
|
+
/* harmony export */ scorm12_regex: function() { return /* binding */ scorm12_regex; },
|
|
2930
|
+
/* harmony export */ scorm2004_regex: function() { return /* binding */ scorm2004_regex; }
|
|
2931
|
+
/* harmony export */ });
|
|
2818
2932
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2819
2933
|
|
|
2820
|
-
var
|
|
2934
|
+
var scorm12_regex = {
|
|
2821
2935
|
CMIString256: "^.{0,255}$",
|
|
2822
2936
|
CMIString4096: "^.{0,4096}$",
|
|
2823
2937
|
CMITime: "^(?:[01]\\d|2[0123]):(?:[012345]\\d):(?:[012345]\\d)$",
|
|
@@ -2840,10 +2954,10 @@ var scorm12 = {
|
|
|
2840
2954
|
weighting_range: "-100#100",
|
|
2841
2955
|
text_range: "-1#1",
|
|
2842
2956
|
};
|
|
2843
|
-
var
|
|
2957
|
+
var aicc_regex = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, scorm12_regex), {
|
|
2844
2958
|
CMIIdentifier: "^\\w{1,255}$",
|
|
2845
2959
|
});
|
|
2846
|
-
var
|
|
2960
|
+
var scorm2004_regex = {
|
|
2847
2961
|
CMIString200: "^[\\u0000-\\uFFFF]{0,200}$",
|
|
2848
2962
|
CMIString250: "^[\\u0000-\\uFFFF]{0,250}$",
|
|
2849
2963
|
CMIString1000: "^[\\u0000-\\uFFFF]{0,1000}$",
|
|
@@ -2870,7 +2984,7 @@ var scorm2004 = {
|
|
|
2870
2984
|
CMIExit: "^(time-out|suspend|logout|normal)$",
|
|
2871
2985
|
CMIType: "^(true-false|choice|fill-in|long-fill-in|matching|performance|sequencing|likert|numeric|other)$",
|
|
2872
2986
|
CMIResult: "^(correct|incorrect|unanticipated|neutral|-?([0-9]{1,4})(\\.[0-9]{1,18})?)$",
|
|
2873
|
-
NAVEvent: "^(previous|continue|exit|exitAll|abandon|abandonAll|suspendAll|_none_|(\\{target
|
|
2987
|
+
NAVEvent: "^(previous|continue|exit|exitAll|abandon|abandonAll|suspendAll|_none_|(\\{target=(?<choice_target>\\S{0,}[a-zA-Z0-9-_]+)})?choice|(\\{target=(?<jump_target>\\S{0,}[a-zA-Z0-9-_]+)})?jump)$",
|
|
2874
2988
|
NAVBoolean: "^(unknown|true|false$)",
|
|
2875
2989
|
NAVTarget: "^{target=\\S{0,}[a-zA-Z0-9-_]+}$",
|
|
2876
2990
|
scaled_range: "-1#1",
|
|
@@ -2879,12 +2993,6 @@ var scorm2004 = {
|
|
|
2879
2993
|
text_range: "-1#1",
|
|
2880
2994
|
progress_range: "0#1",
|
|
2881
2995
|
};
|
|
2882
|
-
var Regex = {
|
|
2883
|
-
aicc: aicc,
|
|
2884
|
-
scorm12: scorm12,
|
|
2885
|
-
scorm2004: scorm2004,
|
|
2886
|
-
};
|
|
2887
|
-
/* harmony default export */ __webpack_exports__.A = (Regex);
|
|
2888
2996
|
|
|
2889
2997
|
|
|
2890
2998
|
/***/ }),
|
|
@@ -2892,22 +3000,15 @@ var Regex = {
|
|
|
2892
3000
|
/***/ 784:
|
|
2893
3001
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2894
3002
|
|
|
3003
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2895
3004
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2896
|
-
/* harmony export */
|
|
2897
|
-
/* harmony export */
|
|
2898
|
-
/* harmony export */ tQ: function() { return /* binding */ Scorm12ValidationError; },
|
|
2899
|
-
/* harmony export */ yI: function() { return /* binding */ ValidationError; }
|
|
3005
|
+
/* harmony export */ BaseScormValidationError: function() { return /* binding */ BaseScormValidationError; },
|
|
3006
|
+
/* harmony export */ ValidationError: function() { return /* binding */ ValidationError; }
|
|
2900
3007
|
/* harmony export */ });
|
|
2901
|
-
/*
|
|
2902
|
-
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(635);
|
|
2903
|
-
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(340);
|
|
2904
|
-
|
|
3008
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2905
3009
|
|
|
2906
|
-
var scorm12_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.scorm12.error_descriptions;
|
|
2907
|
-
var aicc_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.aicc.error_descriptions;
|
|
2908
|
-
var scorm2004_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.scorm2004.error_descriptions;
|
|
2909
3010
|
var BaseScormValidationError = (function (_super) {
|
|
2910
|
-
(0,
|
|
3011
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(BaseScormValidationError, _super);
|
|
2911
3012
|
function BaseScormValidationError(errorCode) {
|
|
2912
3013
|
var _this = _super.call(this, errorCode.toString()) || this;
|
|
2913
3014
|
_this._errorCode = errorCode;
|
|
@@ -2921,18 +3022,15 @@ var BaseScormValidationError = (function (_super) {
|
|
|
2921
3022
|
enumerable: false,
|
|
2922
3023
|
configurable: true
|
|
2923
3024
|
});
|
|
2924
|
-
BaseScormValidationError.prototype.setMessage = function (message) {
|
|
2925
|
-
this.message = message;
|
|
2926
|
-
};
|
|
2927
3025
|
return BaseScormValidationError;
|
|
2928
3026
|
}(Error));
|
|
2929
3027
|
|
|
2930
3028
|
var ValidationError = (function (_super) {
|
|
2931
|
-
(0,
|
|
3029
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(ValidationError, _super);
|
|
2932
3030
|
function ValidationError(errorCode, errorMessage, detailedMessage) {
|
|
2933
3031
|
var _this = _super.call(this, errorCode) || this;
|
|
2934
3032
|
_this._detailedMessage = "";
|
|
2935
|
-
_this.
|
|
3033
|
+
_this.message = errorMessage;
|
|
2936
3034
|
_this._errorMessage = errorMessage;
|
|
2937
3035
|
if (detailedMessage) {
|
|
2938
3036
|
_this._detailedMessage = detailedMessage;
|
|
@@ -2956,8 +3054,26 @@ var ValidationError = (function (_super) {
|
|
|
2956
3054
|
return ValidationError;
|
|
2957
3055
|
}(BaseScormValidationError));
|
|
2958
3056
|
|
|
3057
|
+
|
|
3058
|
+
|
|
3059
|
+
/***/ }),
|
|
3060
|
+
|
|
3061
|
+
/***/ 179:
|
|
3062
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3063
|
+
|
|
3064
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3065
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3066
|
+
/* harmony export */ Scorm12ValidationError: function() { return /* binding */ Scorm12ValidationError; }
|
|
3067
|
+
/* harmony export */ });
|
|
3068
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(635);
|
|
3069
|
+
/* harmony import */ var _exceptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(784);
|
|
3070
|
+
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
3071
|
+
|
|
3072
|
+
|
|
3073
|
+
|
|
3074
|
+
var scorm12_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.error_descriptions;
|
|
2959
3075
|
var Scorm12ValidationError = (function (_super) {
|
|
2960
|
-
(0,
|
|
3076
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Scorm12ValidationError, _super);
|
|
2961
3077
|
function Scorm12ValidationError(errorCode) {
|
|
2962
3078
|
var _this = this;
|
|
2963
3079
|
if ({}.hasOwnProperty.call(scorm12_errors, String(errorCode))) {
|
|
@@ -2969,37 +3085,7 @@ var Scorm12ValidationError = (function (_super) {
|
|
|
2969
3085
|
return _this;
|
|
2970
3086
|
}
|
|
2971
3087
|
return Scorm12ValidationError;
|
|
2972
|
-
}(ValidationError));
|
|
2973
|
-
|
|
2974
|
-
var AICCValidationError = (function (_super) {
|
|
2975
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__extends */ .C6)(AICCValidationError, _super);
|
|
2976
|
-
function AICCValidationError(errorCode) {
|
|
2977
|
-
var _this = this;
|
|
2978
|
-
if ({}.hasOwnProperty.call(aicc_errors, String(errorCode))) {
|
|
2979
|
-
_this = _super.call(this, errorCode, aicc_errors[String(errorCode)].basicMessage, aicc_errors[String(errorCode)].detailMessage) || this;
|
|
2980
|
-
}
|
|
2981
|
-
else {
|
|
2982
|
-
_this = _super.call(this, 101, aicc_errors["101"].basicMessage, aicc_errors["101"].detailMessage) || this;
|
|
2983
|
-
}
|
|
2984
|
-
return _this;
|
|
2985
|
-
}
|
|
2986
|
-
return AICCValidationError;
|
|
2987
|
-
}(ValidationError));
|
|
2988
|
-
|
|
2989
|
-
var Scorm2004ValidationError = (function (_super) {
|
|
2990
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__extends */ .C6)(Scorm2004ValidationError, _super);
|
|
2991
|
-
function Scorm2004ValidationError(errorCode) {
|
|
2992
|
-
var _this = this;
|
|
2993
|
-
if ({}.hasOwnProperty.call(scorm2004_errors, String(errorCode))) {
|
|
2994
|
-
_this = _super.call(this, errorCode, scorm2004_errors[String(errorCode)].basicMessage, scorm2004_errors[String(errorCode)].detailMessage) || this;
|
|
2995
|
-
}
|
|
2996
|
-
else {
|
|
2997
|
-
_this = _super.call(this, 101, scorm2004_errors["101"].basicMessage, scorm2004_errors["101"].detailMessage) || this;
|
|
2998
|
-
}
|
|
2999
|
-
return _this;
|
|
3000
|
-
}
|
|
3001
|
-
return Scorm2004ValidationError;
|
|
3002
|
-
}(ValidationError));
|
|
3088
|
+
}(_exceptions__WEBPACK_IMPORTED_MODULE_0__.ValidationError));
|
|
3003
3089
|
|
|
3004
3090
|
|
|
3005
3091
|
|
|
@@ -3008,16 +3094,24 @@ var Scorm2004ValidationError = (function (_super) {
|
|
|
3008
3094
|
/***/ 864:
|
|
3009
3095
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3010
3096
|
|
|
3097
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3011
3098
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3012
|
-
/* harmony export */
|
|
3013
|
-
/* harmony export */
|
|
3014
|
-
/* harmony export */
|
|
3015
|
-
/* harmony export */
|
|
3016
|
-
/* harmony export */
|
|
3017
|
-
/* harmony export */
|
|
3018
|
-
/* harmony export */
|
|
3099
|
+
/* harmony export */ SECONDS_PER_DAY: function() { return /* binding */ SECONDS_PER_DAY; },
|
|
3100
|
+
/* harmony export */ SECONDS_PER_HOUR: function() { return /* binding */ SECONDS_PER_HOUR; },
|
|
3101
|
+
/* harmony export */ SECONDS_PER_MINUTE: function() { return /* binding */ SECONDS_PER_MINUTE; },
|
|
3102
|
+
/* harmony export */ SECONDS_PER_SECOND: function() { return /* binding */ SECONDS_PER_SECOND; },
|
|
3103
|
+
/* harmony export */ addHHMMSSTimeStrings: function() { return /* binding */ addHHMMSSTimeStrings; },
|
|
3104
|
+
/* harmony export */ addTwoDurations: function() { return /* binding */ addTwoDurations; },
|
|
3105
|
+
/* harmony export */ countDecimals: function() { return /* binding */ countDecimals; },
|
|
3106
|
+
/* harmony export */ flatten: function() { return /* binding */ flatten; },
|
|
3107
|
+
/* harmony export */ formatMessage: function() { return /* binding */ formatMessage; },
|
|
3108
|
+
/* harmony export */ getDurationAsSeconds: function() { return /* binding */ getDurationAsSeconds; },
|
|
3109
|
+
/* harmony export */ getSecondsAsHHMMSS: function() { return /* binding */ getSecondsAsHHMMSS; },
|
|
3110
|
+
/* harmony export */ getSecondsAsISODuration: function() { return /* binding */ getSecondsAsISODuration; },
|
|
3111
|
+
/* harmony export */ getTimeAsSeconds: function() { return /* binding */ getTimeAsSeconds; },
|
|
3112
|
+
/* harmony export */ stringMatches: function() { return /* binding */ stringMatches; },
|
|
3113
|
+
/* harmony export */ unflatten: function() { return /* binding */ unflatten; }
|
|
3019
3114
|
/* harmony export */ });
|
|
3020
|
-
/* unused harmony exports SECONDS_PER_SECOND, SECONDS_PER_MINUTE, SECONDS_PER_HOUR, SECONDS_PER_DAY, getSecondsAsISODuration, getDurationAsSeconds, addTwoDurations, countDecimals */
|
|
3021
3115
|
var SECONDS_PER_SECOND = 1.0;
|
|
3022
3116
|
var SECONDS_PER_MINUTE = 60;
|
|
3023
3117
|
var SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE;
|
|
@@ -3209,13 +3303,40 @@ function stringMatches(str, tester) {
|
|
|
3209
3303
|
/***/ 635:
|
|
3210
3304
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
3211
3305
|
|
|
3306
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3212
3307
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3213
|
-
/* harmony export */
|
|
3214
|
-
/* harmony export */
|
|
3215
|
-
/* harmony export */
|
|
3216
|
-
/* harmony export */
|
|
3308
|
+
/* harmony export */ __addDisposableResource: function() { return /* binding */ __addDisposableResource; },
|
|
3309
|
+
/* harmony export */ __assign: function() { return /* binding */ __assign; },
|
|
3310
|
+
/* harmony export */ __asyncDelegator: function() { return /* binding */ __asyncDelegator; },
|
|
3311
|
+
/* harmony export */ __asyncGenerator: function() { return /* binding */ __asyncGenerator; },
|
|
3312
|
+
/* harmony export */ __asyncValues: function() { return /* binding */ __asyncValues; },
|
|
3313
|
+
/* harmony export */ __await: function() { return /* binding */ __await; },
|
|
3314
|
+
/* harmony export */ __awaiter: function() { return /* binding */ __awaiter; },
|
|
3315
|
+
/* harmony export */ __classPrivateFieldGet: function() { return /* binding */ __classPrivateFieldGet; },
|
|
3316
|
+
/* harmony export */ __classPrivateFieldIn: function() { return /* binding */ __classPrivateFieldIn; },
|
|
3317
|
+
/* harmony export */ __classPrivateFieldSet: function() { return /* binding */ __classPrivateFieldSet; },
|
|
3318
|
+
/* harmony export */ __createBinding: function() { return /* binding */ __createBinding; },
|
|
3319
|
+
/* harmony export */ __decorate: function() { return /* binding */ __decorate; },
|
|
3320
|
+
/* harmony export */ __disposeResources: function() { return /* binding */ __disposeResources; },
|
|
3321
|
+
/* harmony export */ __esDecorate: function() { return /* binding */ __esDecorate; },
|
|
3322
|
+
/* harmony export */ __exportStar: function() { return /* binding */ __exportStar; },
|
|
3323
|
+
/* harmony export */ __extends: function() { return /* binding */ __extends; },
|
|
3324
|
+
/* harmony export */ __generator: function() { return /* binding */ __generator; },
|
|
3325
|
+
/* harmony export */ __importDefault: function() { return /* binding */ __importDefault; },
|
|
3326
|
+
/* harmony export */ __importStar: function() { return /* binding */ __importStar; },
|
|
3327
|
+
/* harmony export */ __makeTemplateObject: function() { return /* binding */ __makeTemplateObject; },
|
|
3328
|
+
/* harmony export */ __metadata: function() { return /* binding */ __metadata; },
|
|
3329
|
+
/* harmony export */ __param: function() { return /* binding */ __param; },
|
|
3330
|
+
/* harmony export */ __propKey: function() { return /* binding */ __propKey; },
|
|
3331
|
+
/* harmony export */ __read: function() { return /* binding */ __read; },
|
|
3332
|
+
/* harmony export */ __rest: function() { return /* binding */ __rest; },
|
|
3333
|
+
/* harmony export */ __runInitializers: function() { return /* binding */ __runInitializers; },
|
|
3334
|
+
/* harmony export */ __setFunctionName: function() { return /* binding */ __setFunctionName; },
|
|
3335
|
+
/* harmony export */ __spread: function() { return /* binding */ __spread; },
|
|
3336
|
+
/* harmony export */ __spreadArray: function() { return /* binding */ __spreadArray; },
|
|
3337
|
+
/* harmony export */ __spreadArrays: function() { return /* binding */ __spreadArrays; },
|
|
3338
|
+
/* harmony export */ __values: function() { return /* binding */ __values; }
|
|
3217
3339
|
/* harmony export */ });
|
|
3218
|
-
/* 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 */
|
|
3219
3340
|
/******************************************************************************
|
|
3220
3341
|
Copyright (c) Microsoft Corporation.
|
|
3221
3342
|
|
|
@@ -3565,7 +3686,7 @@ function __disposeResources(env) {
|
|
|
3565
3686
|
return next();
|
|
3566
3687
|
}
|
|
3567
3688
|
|
|
3568
|
-
/*
|
|
3689
|
+
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
3569
3690
|
__extends,
|
|
3570
3691
|
__assign,
|
|
3571
3692
|
__rest,
|
|
@@ -3675,6 +3796,27 @@ var api_constants = __webpack_require__(340);
|
|
|
3675
3796
|
var array = __webpack_require__(589);
|
|
3676
3797
|
// EXTERNAL MODULE: ./src/exceptions.ts
|
|
3677
3798
|
var exceptions = __webpack_require__(784);
|
|
3799
|
+
;// ./src/exceptions/aicc_exceptions.ts
|
|
3800
|
+
|
|
3801
|
+
|
|
3802
|
+
|
|
3803
|
+
var aicc_errors = api_constants.aicc_constants.error_descriptions;
|
|
3804
|
+
var AICCValidationError = (function (_super) {
|
|
3805
|
+
(0,tslib_es6.__extends)(AICCValidationError, _super);
|
|
3806
|
+
function AICCValidationError(errorCode) {
|
|
3807
|
+
var _this = this;
|
|
3808
|
+
if ({}.hasOwnProperty.call(aicc_errors, String(errorCode))) {
|
|
3809
|
+
_this = _super.call(this, errorCode, aicc_errors[String(errorCode)].basicMessage, aicc_errors[String(errorCode)].detailMessage) || this;
|
|
3810
|
+
}
|
|
3811
|
+
else {
|
|
3812
|
+
_this = _super.call(this, 101, aicc_errors["101"].basicMessage, aicc_errors["101"].detailMessage) || this;
|
|
3813
|
+
}
|
|
3814
|
+
return _this;
|
|
3815
|
+
}
|
|
3816
|
+
return AICCValidationError;
|
|
3817
|
+
}(exceptions.ValidationError));
|
|
3818
|
+
|
|
3819
|
+
|
|
3678
3820
|
// EXTERNAL MODULE: ./src/cmi/common/base_cmi.ts
|
|
3679
3821
|
var base_cmi = __webpack_require__(319);
|
|
3680
3822
|
// EXTERNAL MODULE: ./src/constants/error_codes.ts
|
|
@@ -3685,9 +3827,8 @@ var validation = __webpack_require__(449);
|
|
|
3685
3827
|
|
|
3686
3828
|
|
|
3687
3829
|
|
|
3688
|
-
var aicc_error_codes = error_codes/* default */.A.scorm12;
|
|
3689
3830
|
function checkAICCValidFormat(value, regexPattern, allowEmptyString) {
|
|
3690
|
-
return (0,validation
|
|
3831
|
+
return (0,validation.checkValidFormat)(value, regexPattern, error_codes.scorm12_errors.TYPE_MISMATCH, AICCValidationError, allowEmptyString);
|
|
3691
3832
|
}
|
|
3692
3833
|
|
|
3693
3834
|
// EXTERNAL MODULE: ./src/constants/regex.ts
|
|
@@ -3702,7 +3843,7 @@ var regex = __webpack_require__(417);
|
|
|
3702
3843
|
|
|
3703
3844
|
|
|
3704
3845
|
var CMIEvaluation = (function (_super) {
|
|
3705
|
-
(0,tslib_es6
|
|
3846
|
+
(0,tslib_es6.__extends)(CMIEvaluation, _super);
|
|
3706
3847
|
function CMIEvaluation() {
|
|
3707
3848
|
var _this = _super.call(this) || this;
|
|
3708
3849
|
_this.comments = new CMIEvaluationComments();
|
|
@@ -3713,6 +3854,11 @@ var CMIEvaluation = (function (_super) {
|
|
|
3713
3854
|
_super.prototype.initialize.call(this);
|
|
3714
3855
|
(_a = this.comments) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
3715
3856
|
};
|
|
3857
|
+
CMIEvaluation.prototype.reset = function () {
|
|
3858
|
+
var _a;
|
|
3859
|
+
this._initialized = false;
|
|
3860
|
+
(_a = this.comments) === null || _a === void 0 ? void 0 : _a.reset();
|
|
3861
|
+
};
|
|
3716
3862
|
CMIEvaluation.prototype.toJSON = function () {
|
|
3717
3863
|
this.jsonString = true;
|
|
3718
3864
|
var result = {
|
|
@@ -3722,21 +3868,21 @@ var CMIEvaluation = (function (_super) {
|
|
|
3722
3868
|
return result;
|
|
3723
3869
|
};
|
|
3724
3870
|
return CMIEvaluation;
|
|
3725
|
-
}(base_cmi
|
|
3871
|
+
}(base_cmi.BaseCMI));
|
|
3726
3872
|
|
|
3727
3873
|
var CMIEvaluationComments = (function (_super) {
|
|
3728
|
-
(0,tslib_es6
|
|
3874
|
+
(0,tslib_es6.__extends)(CMIEvaluationComments, _super);
|
|
3729
3875
|
function CMIEvaluationComments() {
|
|
3730
3876
|
return _super.call(this, {
|
|
3731
|
-
children: api_constants
|
|
3732
|
-
errorCode: error_codes
|
|
3733
|
-
errorClass:
|
|
3877
|
+
children: api_constants.aicc_constants.comments_children,
|
|
3878
|
+
errorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
3879
|
+
errorClass: AICCValidationError,
|
|
3734
3880
|
}) || this;
|
|
3735
3881
|
}
|
|
3736
3882
|
return CMIEvaluationComments;
|
|
3737
|
-
}(array
|
|
3883
|
+
}(array.CMIArray));
|
|
3738
3884
|
var CMIEvaluationCommentsObject = (function (_super) {
|
|
3739
|
-
(0,tslib_es6
|
|
3885
|
+
(0,tslib_es6.__extends)(CMIEvaluationCommentsObject, _super);
|
|
3740
3886
|
function CMIEvaluationCommentsObject() {
|
|
3741
3887
|
var _this = _super.call(this) || this;
|
|
3742
3888
|
_this._content = "";
|
|
@@ -3744,12 +3890,18 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3744
3890
|
_this._time = "";
|
|
3745
3891
|
return _this;
|
|
3746
3892
|
}
|
|
3893
|
+
CMIEvaluationCommentsObject.prototype.reset = function () {
|
|
3894
|
+
this._initialized = false;
|
|
3895
|
+
this._content = "";
|
|
3896
|
+
this._location = "";
|
|
3897
|
+
this._time = "";
|
|
3898
|
+
};
|
|
3747
3899
|
Object.defineProperty(CMIEvaluationCommentsObject.prototype, "content", {
|
|
3748
3900
|
get: function () {
|
|
3749
3901
|
return this._content;
|
|
3750
3902
|
},
|
|
3751
3903
|
set: function (content) {
|
|
3752
|
-
if (checkAICCValidFormat(content, regex
|
|
3904
|
+
if (checkAICCValidFormat(content, regex.aicc_regex.CMIString256)) {
|
|
3753
3905
|
this._content = content;
|
|
3754
3906
|
}
|
|
3755
3907
|
},
|
|
@@ -3761,7 +3913,7 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3761
3913
|
return this._location;
|
|
3762
3914
|
},
|
|
3763
3915
|
set: function (location) {
|
|
3764
|
-
if (checkAICCValidFormat(location, regex
|
|
3916
|
+
if (checkAICCValidFormat(location, regex.aicc_regex.CMIString256)) {
|
|
3765
3917
|
this._location = location;
|
|
3766
3918
|
}
|
|
3767
3919
|
},
|
|
@@ -3773,7 +3925,7 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3773
3925
|
return this._time;
|
|
3774
3926
|
},
|
|
3775
3927
|
set: function (time) {
|
|
3776
|
-
if (checkAICCValidFormat(time, regex
|
|
3928
|
+
if (checkAICCValidFormat(time, regex.aicc_regex.CMITime)) {
|
|
3777
3929
|
this._time = time;
|
|
3778
3930
|
}
|
|
3779
3931
|
},
|
|
@@ -3791,7 +3943,7 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3791
3943
|
return result;
|
|
3792
3944
|
};
|
|
3793
3945
|
return CMIEvaluationCommentsObject;
|
|
3794
|
-
}(base_cmi
|
|
3946
|
+
}(base_cmi.BaseCMI));
|
|
3795
3947
|
|
|
3796
3948
|
|
|
3797
3949
|
// EXTERNAL MODULE: ./src/cmi/scorm12/student_preference.ts
|
|
@@ -3806,17 +3958,17 @@ var student_preference = __webpack_require__(181);
|
|
|
3806
3958
|
|
|
3807
3959
|
|
|
3808
3960
|
var AICCStudentPreferences = (function (_super) {
|
|
3809
|
-
(0,tslib_es6
|
|
3961
|
+
(0,tslib_es6.__extends)(AICCStudentPreferences, _super);
|
|
3810
3962
|
function AICCStudentPreferences() {
|
|
3811
|
-
var _this = _super.call(this, api_constants
|
|
3963
|
+
var _this = _super.call(this, api_constants.aicc_constants.student_preference_children) || this;
|
|
3812
3964
|
_this._lesson_type = "";
|
|
3813
3965
|
_this._text_color = "";
|
|
3814
3966
|
_this._text_location = "";
|
|
3815
3967
|
_this._text_size = "";
|
|
3816
3968
|
_this._video = "";
|
|
3817
|
-
_this.windows = new array
|
|
3818
|
-
errorCode: error_codes
|
|
3819
|
-
errorClass:
|
|
3969
|
+
_this.windows = new array.CMIArray({
|
|
3970
|
+
errorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
3971
|
+
errorClass: AICCValidationError,
|
|
3820
3972
|
children: "",
|
|
3821
3973
|
});
|
|
3822
3974
|
return _this;
|
|
@@ -3831,7 +3983,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3831
3983
|
return this._lesson_type;
|
|
3832
3984
|
},
|
|
3833
3985
|
set: function (lesson_type) {
|
|
3834
|
-
if (checkAICCValidFormat(lesson_type, regex
|
|
3986
|
+
if (checkAICCValidFormat(lesson_type, regex.aicc_regex.CMIString256)) {
|
|
3835
3987
|
this._lesson_type = lesson_type;
|
|
3836
3988
|
}
|
|
3837
3989
|
},
|
|
@@ -3843,7 +3995,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3843
3995
|
return this._text_color;
|
|
3844
3996
|
},
|
|
3845
3997
|
set: function (text_color) {
|
|
3846
|
-
if (checkAICCValidFormat(text_color, regex
|
|
3998
|
+
if (checkAICCValidFormat(text_color, regex.aicc_regex.CMIString256)) {
|
|
3847
3999
|
this._text_color = text_color;
|
|
3848
4000
|
}
|
|
3849
4001
|
},
|
|
@@ -3855,7 +4007,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3855
4007
|
return this._text_location;
|
|
3856
4008
|
},
|
|
3857
4009
|
set: function (text_location) {
|
|
3858
|
-
if (checkAICCValidFormat(text_location, regex
|
|
4010
|
+
if (checkAICCValidFormat(text_location, regex.aicc_regex.CMIString256)) {
|
|
3859
4011
|
this._text_location = text_location;
|
|
3860
4012
|
}
|
|
3861
4013
|
},
|
|
@@ -3867,7 +4019,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3867
4019
|
return this._text_size;
|
|
3868
4020
|
},
|
|
3869
4021
|
set: function (text_size) {
|
|
3870
|
-
if (checkAICCValidFormat(text_size, regex
|
|
4022
|
+
if (checkAICCValidFormat(text_size, regex.aicc_regex.CMIString256)) {
|
|
3871
4023
|
this._text_size = text_size;
|
|
3872
4024
|
}
|
|
3873
4025
|
},
|
|
@@ -3879,7 +4031,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3879
4031
|
return this._video;
|
|
3880
4032
|
},
|
|
3881
4033
|
set: function (video) {
|
|
3882
|
-
if (checkAICCValidFormat(video, regex
|
|
4034
|
+
if (checkAICCValidFormat(video, regex.aicc_regex.CMIString256)) {
|
|
3883
4035
|
this._video = video;
|
|
3884
4036
|
}
|
|
3885
4037
|
},
|
|
@@ -3904,7 +4056,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3904
4056
|
return result;
|
|
3905
4057
|
};
|
|
3906
4058
|
return AICCStudentPreferences;
|
|
3907
|
-
}(student_preference
|
|
4059
|
+
}(student_preference.CMIStudentPreference));
|
|
3908
4060
|
|
|
3909
4061
|
|
|
3910
4062
|
;// ./src/cmi/aicc/student_demographics.ts
|
|
@@ -3914,10 +4066,10 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3914
4066
|
|
|
3915
4067
|
|
|
3916
4068
|
var CMIStudentDemographics = (function (_super) {
|
|
3917
|
-
(0,tslib_es6
|
|
4069
|
+
(0,tslib_es6.__extends)(CMIStudentDemographics, _super);
|
|
3918
4070
|
function CMIStudentDemographics() {
|
|
3919
4071
|
var _this = _super.call(this) || this;
|
|
3920
|
-
_this.__children = api_constants
|
|
4072
|
+
_this.__children = api_constants.aicc_constants.student_demographics_children;
|
|
3921
4073
|
_this._city = "";
|
|
3922
4074
|
_this._class = "";
|
|
3923
4075
|
_this._company = "";
|
|
@@ -3933,6 +4085,9 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3933
4085
|
_this._years_experience = "";
|
|
3934
4086
|
return _this;
|
|
3935
4087
|
}
|
|
4088
|
+
CMIStudentDemographics.prototype.reset = function () {
|
|
4089
|
+
this._initialized = false;
|
|
4090
|
+
};
|
|
3936
4091
|
Object.defineProperty(CMIStudentDemographics.prototype, "_children", {
|
|
3937
4092
|
get: function () {
|
|
3938
4093
|
return this.__children;
|
|
@@ -3946,7 +4101,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3946
4101
|
},
|
|
3947
4102
|
set: function (city) {
|
|
3948
4103
|
if (this.initialized) {
|
|
3949
|
-
throw new
|
|
4104
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
3950
4105
|
}
|
|
3951
4106
|
else {
|
|
3952
4107
|
this._city = city;
|
|
@@ -3961,7 +4116,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3961
4116
|
},
|
|
3962
4117
|
set: function (clazz) {
|
|
3963
4118
|
if (this.initialized) {
|
|
3964
|
-
throw new
|
|
4119
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
3965
4120
|
}
|
|
3966
4121
|
else {
|
|
3967
4122
|
this._class = clazz;
|
|
@@ -3976,7 +4131,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3976
4131
|
},
|
|
3977
4132
|
set: function (company) {
|
|
3978
4133
|
if (this.initialized) {
|
|
3979
|
-
throw new
|
|
4134
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
3980
4135
|
}
|
|
3981
4136
|
else {
|
|
3982
4137
|
this._company = company;
|
|
@@ -3991,7 +4146,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3991
4146
|
},
|
|
3992
4147
|
set: function (country) {
|
|
3993
4148
|
if (this.initialized) {
|
|
3994
|
-
throw new
|
|
4149
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
3995
4150
|
}
|
|
3996
4151
|
else {
|
|
3997
4152
|
this._country = country;
|
|
@@ -4006,7 +4161,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4006
4161
|
},
|
|
4007
4162
|
set: function (experience) {
|
|
4008
4163
|
if (this.initialized) {
|
|
4009
|
-
throw new
|
|
4164
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4010
4165
|
}
|
|
4011
4166
|
else {
|
|
4012
4167
|
this._experience = experience;
|
|
@@ -4021,7 +4176,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4021
4176
|
},
|
|
4022
4177
|
set: function (familiar_name) {
|
|
4023
4178
|
if (this.initialized) {
|
|
4024
|
-
throw new
|
|
4179
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4025
4180
|
}
|
|
4026
4181
|
else {
|
|
4027
4182
|
this._familiar_name = familiar_name;
|
|
@@ -4036,7 +4191,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4036
4191
|
},
|
|
4037
4192
|
set: function (instructor_name) {
|
|
4038
4193
|
if (this.initialized) {
|
|
4039
|
-
throw new
|
|
4194
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4040
4195
|
}
|
|
4041
4196
|
else {
|
|
4042
4197
|
this._instructor_name = instructor_name;
|
|
@@ -4051,7 +4206,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4051
4206
|
},
|
|
4052
4207
|
set: function (title) {
|
|
4053
4208
|
if (this.initialized) {
|
|
4054
|
-
throw new
|
|
4209
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4055
4210
|
}
|
|
4056
4211
|
else {
|
|
4057
4212
|
this._title = title;
|
|
@@ -4066,7 +4221,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4066
4221
|
},
|
|
4067
4222
|
set: function (native_language) {
|
|
4068
4223
|
if (this.initialized) {
|
|
4069
|
-
throw new
|
|
4224
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4070
4225
|
}
|
|
4071
4226
|
else {
|
|
4072
4227
|
this._native_language = native_language;
|
|
@@ -4081,7 +4236,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4081
4236
|
},
|
|
4082
4237
|
set: function (state) {
|
|
4083
4238
|
if (this.initialized) {
|
|
4084
|
-
throw new
|
|
4239
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4085
4240
|
}
|
|
4086
4241
|
else {
|
|
4087
4242
|
this._state = state;
|
|
@@ -4096,7 +4251,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4096
4251
|
},
|
|
4097
4252
|
set: function (street_address) {
|
|
4098
4253
|
if (this.initialized) {
|
|
4099
|
-
throw new
|
|
4254
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4100
4255
|
}
|
|
4101
4256
|
else {
|
|
4102
4257
|
this._street_address = street_address;
|
|
@@ -4111,7 +4266,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4111
4266
|
},
|
|
4112
4267
|
set: function (telephone) {
|
|
4113
4268
|
if (this.initialized) {
|
|
4114
|
-
throw new
|
|
4269
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4115
4270
|
}
|
|
4116
4271
|
else {
|
|
4117
4272
|
this._telephone = telephone;
|
|
@@ -4126,7 +4281,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4126
4281
|
},
|
|
4127
4282
|
set: function (years_experience) {
|
|
4128
4283
|
if (this.initialized) {
|
|
4129
|
-
throw new
|
|
4284
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4130
4285
|
}
|
|
4131
4286
|
else {
|
|
4132
4287
|
this._years_experience = years_experience;
|
|
@@ -4156,7 +4311,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4156
4311
|
return result;
|
|
4157
4312
|
};
|
|
4158
4313
|
return CMIStudentDemographics;
|
|
4159
|
-
}(base_cmi
|
|
4314
|
+
}(base_cmi.BaseCMI));
|
|
4160
4315
|
|
|
4161
4316
|
|
|
4162
4317
|
// EXTERNAL MODULE: ./src/cmi/common/score.ts
|
|
@@ -4172,28 +4327,28 @@ var score = __webpack_require__(434);
|
|
|
4172
4327
|
|
|
4173
4328
|
|
|
4174
4329
|
var CMITries = (function (_super) {
|
|
4175
|
-
(0,tslib_es6
|
|
4330
|
+
(0,tslib_es6.__extends)(CMITries, _super);
|
|
4176
4331
|
function CMITries() {
|
|
4177
4332
|
return _super.call(this, {
|
|
4178
|
-
children: api_constants
|
|
4333
|
+
children: api_constants.aicc_constants.tries_children,
|
|
4179
4334
|
}) || this;
|
|
4180
4335
|
}
|
|
4181
4336
|
return CMITries;
|
|
4182
|
-
}(array
|
|
4337
|
+
}(array.CMIArray));
|
|
4183
4338
|
|
|
4184
4339
|
var CMITriesObject = (function (_super) {
|
|
4185
|
-
(0,tslib_es6
|
|
4340
|
+
(0,tslib_es6.__extends)(CMITriesObject, _super);
|
|
4186
4341
|
function CMITriesObject() {
|
|
4187
4342
|
var _this = _super.call(this) || this;
|
|
4188
4343
|
_this._status = "";
|
|
4189
4344
|
_this._time = "";
|
|
4190
|
-
_this.score = new score
|
|
4191
|
-
score_children: api_constants
|
|
4192
|
-
score_range: regex
|
|
4193
|
-
invalidErrorCode: error_codes
|
|
4194
|
-
invalidTypeCode: error_codes
|
|
4195
|
-
invalidRangeCode: error_codes
|
|
4196
|
-
errorClass:
|
|
4345
|
+
_this.score = new score.CMIScore({
|
|
4346
|
+
score_children: api_constants.aicc_constants.score_children,
|
|
4347
|
+
score_range: regex.aicc_regex.score_range,
|
|
4348
|
+
invalidErrorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
4349
|
+
invalidTypeCode: error_codes.scorm12_errors.TYPE_MISMATCH,
|
|
4350
|
+
invalidRangeCode: error_codes.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
4351
|
+
errorClass: AICCValidationError,
|
|
4197
4352
|
});
|
|
4198
4353
|
return _this;
|
|
4199
4354
|
}
|
|
@@ -4202,12 +4357,19 @@ var CMITriesObject = (function (_super) {
|
|
|
4202
4357
|
_super.prototype.initialize.call(this);
|
|
4203
4358
|
(_a = this.score) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
4204
4359
|
};
|
|
4360
|
+
CMITriesObject.prototype.reset = function () {
|
|
4361
|
+
var _a;
|
|
4362
|
+
this._initialized = false;
|
|
4363
|
+
this._status = "";
|
|
4364
|
+
this._time = "";
|
|
4365
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
4366
|
+
};
|
|
4205
4367
|
Object.defineProperty(CMITriesObject.prototype, "status", {
|
|
4206
4368
|
get: function () {
|
|
4207
4369
|
return this._status;
|
|
4208
4370
|
},
|
|
4209
4371
|
set: function (status) {
|
|
4210
|
-
if (checkAICCValidFormat(status, regex
|
|
4372
|
+
if (checkAICCValidFormat(status, regex.aicc_regex.CMIStatus2)) {
|
|
4211
4373
|
this._status = status;
|
|
4212
4374
|
}
|
|
4213
4375
|
},
|
|
@@ -4219,7 +4381,7 @@ var CMITriesObject = (function (_super) {
|
|
|
4219
4381
|
return this._time;
|
|
4220
4382
|
},
|
|
4221
4383
|
set: function (time) {
|
|
4222
|
-
if (checkAICCValidFormat(time, regex
|
|
4384
|
+
if (checkAICCValidFormat(time, regex.aicc_regex.CMITime)) {
|
|
4223
4385
|
this._time = time;
|
|
4224
4386
|
}
|
|
4225
4387
|
},
|
|
@@ -4237,7 +4399,7 @@ var CMITriesObject = (function (_super) {
|
|
|
4237
4399
|
return result;
|
|
4238
4400
|
};
|
|
4239
4401
|
return CMITriesObject;
|
|
4240
|
-
}(base_cmi
|
|
4402
|
+
}(base_cmi.BaseCMI));
|
|
4241
4403
|
|
|
4242
4404
|
|
|
4243
4405
|
// EXTERNAL MODULE: ./src/cmi/scorm12/student_data.ts
|
|
@@ -4253,41 +4415,47 @@ var student_data = __webpack_require__(532);
|
|
|
4253
4415
|
|
|
4254
4416
|
|
|
4255
4417
|
var CMIAttemptRecords = (function (_super) {
|
|
4256
|
-
(0,tslib_es6
|
|
4418
|
+
(0,tslib_es6.__extends)(CMIAttemptRecords, _super);
|
|
4257
4419
|
function CMIAttemptRecords() {
|
|
4258
4420
|
return _super.call(this, {
|
|
4259
|
-
children: api_constants
|
|
4421
|
+
children: api_constants.aicc_constants.attempt_records_children,
|
|
4260
4422
|
}) || this;
|
|
4261
4423
|
}
|
|
4262
4424
|
return CMIAttemptRecords;
|
|
4263
|
-
}(array
|
|
4425
|
+
}(array.CMIArray));
|
|
4264
4426
|
|
|
4265
4427
|
var CMIAttemptRecordsObject = (function (_super) {
|
|
4266
|
-
(0,tslib_es6
|
|
4428
|
+
(0,tslib_es6.__extends)(CMIAttemptRecordsObject, _super);
|
|
4267
4429
|
function CMIAttemptRecordsObject() {
|
|
4268
4430
|
var _this = _super.call(this) || this;
|
|
4269
4431
|
_this._lesson_status = "";
|
|
4270
|
-
_this.score = new score
|
|
4271
|
-
score_children: api_constants
|
|
4272
|
-
score_range: regex
|
|
4273
|
-
invalidErrorCode: error_codes
|
|
4274
|
-
invalidTypeCode: error_codes
|
|
4275
|
-
invalidRangeCode: error_codes
|
|
4276
|
-
errorClass:
|
|
4432
|
+
_this.score = new score.CMIScore({
|
|
4433
|
+
score_children: api_constants.aicc_constants.score_children,
|
|
4434
|
+
score_range: regex.aicc_regex.score_range,
|
|
4435
|
+
invalidErrorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
4436
|
+
invalidTypeCode: error_codes.scorm12_errors.TYPE_MISMATCH,
|
|
4437
|
+
invalidRangeCode: error_codes.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
4438
|
+
errorClass: AICCValidationError,
|
|
4277
4439
|
});
|
|
4278
4440
|
return _this;
|
|
4279
4441
|
}
|
|
4280
4442
|
CMIAttemptRecordsObject.prototype.initialize = function () {
|
|
4281
4443
|
var _a;
|
|
4282
4444
|
_super.prototype.initialize.call(this);
|
|
4445
|
+
this._lesson_status = "";
|
|
4283
4446
|
(_a = this.score) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
4284
4447
|
};
|
|
4448
|
+
CMIAttemptRecordsObject.prototype.reset = function () {
|
|
4449
|
+
var _a;
|
|
4450
|
+
this._initialized = false;
|
|
4451
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
4452
|
+
};
|
|
4285
4453
|
Object.defineProperty(CMIAttemptRecordsObject.prototype, "lesson_status", {
|
|
4286
4454
|
get: function () {
|
|
4287
4455
|
return this._lesson_status;
|
|
4288
4456
|
},
|
|
4289
4457
|
set: function (lesson_status) {
|
|
4290
|
-
if (checkAICCValidFormat(lesson_status, regex
|
|
4458
|
+
if (checkAICCValidFormat(lesson_status, regex.aicc_regex.CMIStatus2)) {
|
|
4291
4459
|
this._lesson_status = lesson_status;
|
|
4292
4460
|
}
|
|
4293
4461
|
},
|
|
@@ -4304,7 +4472,7 @@ var CMIAttemptRecordsObject = (function (_super) {
|
|
|
4304
4472
|
return result;
|
|
4305
4473
|
};
|
|
4306
4474
|
return CMIAttemptRecordsObject;
|
|
4307
|
-
}(base_cmi
|
|
4475
|
+
}(base_cmi.BaseCMI));
|
|
4308
4476
|
|
|
4309
4477
|
|
|
4310
4478
|
;// ./src/cmi/aicc/student_data.ts
|
|
@@ -4316,9 +4484,9 @@ var CMIAttemptRecordsObject = (function (_super) {
|
|
|
4316
4484
|
|
|
4317
4485
|
|
|
4318
4486
|
var AICCCMIStudentData = (function (_super) {
|
|
4319
|
-
(0,tslib_es6
|
|
4487
|
+
(0,tslib_es6.__extends)(AICCCMIStudentData, _super);
|
|
4320
4488
|
function AICCCMIStudentData() {
|
|
4321
|
-
var _this = _super.call(this, api_constants
|
|
4489
|
+
var _this = _super.call(this, api_constants.aicc_constants.student_data_children) || this;
|
|
4322
4490
|
_this._tries_during_lesson = "";
|
|
4323
4491
|
_this.tries = new CMITries();
|
|
4324
4492
|
_this.attempt_records = new CMIAttemptRecords();
|
|
@@ -4330,13 +4498,19 @@ var AICCCMIStudentData = (function (_super) {
|
|
|
4330
4498
|
(_a = this.tries) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
4331
4499
|
(_b = this.attempt_records) === null || _b === void 0 ? void 0 : _b.initialize();
|
|
4332
4500
|
};
|
|
4501
|
+
AICCCMIStudentData.prototype.reset = function () {
|
|
4502
|
+
var _a, _b;
|
|
4503
|
+
this._initialized = false;
|
|
4504
|
+
(_a = this.tries) === null || _a === void 0 ? void 0 : _a.reset(true);
|
|
4505
|
+
(_b = this.attempt_records) === null || _b === void 0 ? void 0 : _b.reset(true);
|
|
4506
|
+
};
|
|
4333
4507
|
Object.defineProperty(AICCCMIStudentData.prototype, "tries_during_lesson", {
|
|
4334
4508
|
get: function () {
|
|
4335
4509
|
return this._tries_during_lesson;
|
|
4336
4510
|
},
|
|
4337
4511
|
set: function (tries_during_lesson) {
|
|
4338
4512
|
if (this.initialized) {
|
|
4339
|
-
throw new
|
|
4513
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4340
4514
|
}
|
|
4341
4515
|
else {
|
|
4342
4516
|
this._tries_during_lesson = tries_during_lesson;
|
|
@@ -4358,7 +4532,7 @@ var AICCCMIStudentData = (function (_super) {
|
|
|
4358
4532
|
return result;
|
|
4359
4533
|
};
|
|
4360
4534
|
return AICCCMIStudentData;
|
|
4361
|
-
}(student_data
|
|
4535
|
+
}(student_data.CMIStudentData));
|
|
4362
4536
|
|
|
4363
4537
|
|
|
4364
4538
|
;// ./src/cmi/aicc/paths.ts
|
|
@@ -4369,17 +4543,17 @@ var AICCCMIStudentData = (function (_super) {
|
|
|
4369
4543
|
|
|
4370
4544
|
|
|
4371
4545
|
var CMIPaths = (function (_super) {
|
|
4372
|
-
(0,tslib_es6
|
|
4546
|
+
(0,tslib_es6.__extends)(CMIPaths, _super);
|
|
4373
4547
|
function CMIPaths() {
|
|
4374
4548
|
return _super.call(this, {
|
|
4375
|
-
children: api_constants
|
|
4549
|
+
children: api_constants.aicc_constants.paths_children,
|
|
4376
4550
|
}) || this;
|
|
4377
4551
|
}
|
|
4378
4552
|
return CMIPaths;
|
|
4379
|
-
}(array
|
|
4553
|
+
}(array.CMIArray));
|
|
4380
4554
|
|
|
4381
4555
|
var CMIPathsObject = (function (_super) {
|
|
4382
|
-
(0,tslib_es6
|
|
4556
|
+
(0,tslib_es6.__extends)(CMIPathsObject, _super);
|
|
4383
4557
|
function CMIPathsObject() {
|
|
4384
4558
|
var _this = _super.call(this) || this;
|
|
4385
4559
|
_this._location_id = "";
|
|
@@ -4390,12 +4564,21 @@ var CMIPathsObject = (function (_super) {
|
|
|
4390
4564
|
_this._time_in_element = "";
|
|
4391
4565
|
return _this;
|
|
4392
4566
|
}
|
|
4567
|
+
CMIPathsObject.prototype.reset = function () {
|
|
4568
|
+
this._initialized = false;
|
|
4569
|
+
this._location_id = "";
|
|
4570
|
+
this._date = "";
|
|
4571
|
+
this._time = "";
|
|
4572
|
+
this._status = "";
|
|
4573
|
+
this._why_left = "";
|
|
4574
|
+
this._time_in_element = "";
|
|
4575
|
+
};
|
|
4393
4576
|
Object.defineProperty(CMIPathsObject.prototype, "location_id", {
|
|
4394
4577
|
get: function () {
|
|
4395
4578
|
return this._location_id;
|
|
4396
4579
|
},
|
|
4397
4580
|
set: function (location_id) {
|
|
4398
|
-
if (checkAICCValidFormat(location_id, regex
|
|
4581
|
+
if (checkAICCValidFormat(location_id, regex.aicc_regex.CMIString256)) {
|
|
4399
4582
|
this._location_id = location_id;
|
|
4400
4583
|
}
|
|
4401
4584
|
},
|
|
@@ -4407,7 +4590,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4407
4590
|
return this._date;
|
|
4408
4591
|
},
|
|
4409
4592
|
set: function (date) {
|
|
4410
|
-
if (checkAICCValidFormat(date, regex
|
|
4593
|
+
if (checkAICCValidFormat(date, regex.aicc_regex.CMIString256)) {
|
|
4411
4594
|
this._date = date;
|
|
4412
4595
|
}
|
|
4413
4596
|
},
|
|
@@ -4419,7 +4602,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4419
4602
|
return this._time;
|
|
4420
4603
|
},
|
|
4421
4604
|
set: function (time) {
|
|
4422
|
-
if (checkAICCValidFormat(time, regex
|
|
4605
|
+
if (checkAICCValidFormat(time, regex.aicc_regex.CMITime)) {
|
|
4423
4606
|
this._time = time;
|
|
4424
4607
|
}
|
|
4425
4608
|
},
|
|
@@ -4431,7 +4614,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4431
4614
|
return this._status;
|
|
4432
4615
|
},
|
|
4433
4616
|
set: function (status) {
|
|
4434
|
-
if (checkAICCValidFormat(status, regex
|
|
4617
|
+
if (checkAICCValidFormat(status, regex.aicc_regex.CMIStatus2)) {
|
|
4435
4618
|
this._status = status;
|
|
4436
4619
|
}
|
|
4437
4620
|
},
|
|
@@ -4443,7 +4626,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4443
4626
|
return this._why_left;
|
|
4444
4627
|
},
|
|
4445
4628
|
set: function (why_left) {
|
|
4446
|
-
if (checkAICCValidFormat(why_left, regex
|
|
4629
|
+
if (checkAICCValidFormat(why_left, regex.aicc_regex.CMIString256)) {
|
|
4447
4630
|
this._why_left = why_left;
|
|
4448
4631
|
}
|
|
4449
4632
|
},
|
|
@@ -4455,7 +4638,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4455
4638
|
return this._time_in_element;
|
|
4456
4639
|
},
|
|
4457
4640
|
set: function (time_in_element) {
|
|
4458
|
-
if (checkAICCValidFormat(time_in_element, regex
|
|
4641
|
+
if (checkAICCValidFormat(time_in_element, regex.aicc_regex.CMITime)) {
|
|
4459
4642
|
this._time_in_element = time_in_element;
|
|
4460
4643
|
}
|
|
4461
4644
|
},
|
|
@@ -4476,7 +4659,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4476
4659
|
return result;
|
|
4477
4660
|
};
|
|
4478
4661
|
return CMIPathsObject;
|
|
4479
|
-
}(base_cmi
|
|
4662
|
+
}(base_cmi.BaseCMI));
|
|
4480
4663
|
|
|
4481
4664
|
|
|
4482
4665
|
;// ./src/cmi/aicc/cmi.ts
|
|
@@ -4489,10 +4672,10 @@ var CMIPathsObject = (function (_super) {
|
|
|
4489
4672
|
|
|
4490
4673
|
|
|
4491
4674
|
var CMI = (function (_super) {
|
|
4492
|
-
(0,tslib_es6
|
|
4675
|
+
(0,tslib_es6.__extends)(CMI, _super);
|
|
4493
4676
|
function CMI(initialized) {
|
|
4494
4677
|
if (initialized === void 0) { initialized = false; }
|
|
4495
|
-
var _this = _super.call(this, api_constants
|
|
4678
|
+
var _this = _super.call(this, api_constants.aicc_constants.cmi_children) || this;
|
|
4496
4679
|
if (initialized)
|
|
4497
4680
|
_this.initialize();
|
|
4498
4681
|
_this.student_preference = new AICCStudentPreferences();
|
|
@@ -4531,7 +4714,7 @@ var CMI = (function (_super) {
|
|
|
4531
4714
|
return result;
|
|
4532
4715
|
};
|
|
4533
4716
|
return CMI;
|
|
4534
|
-
}(cmi
|
|
4717
|
+
}(cmi.CMI));
|
|
4535
4718
|
|
|
4536
4719
|
|
|
4537
4720
|
// EXTERNAL MODULE: ./src/cmi/scorm12/nav.ts
|
|
@@ -4549,26 +4732,26 @@ var utilities = __webpack_require__(864);
|
|
|
4549
4732
|
|
|
4550
4733
|
|
|
4551
4734
|
var AICCImpl = (function (_super) {
|
|
4552
|
-
(0,tslib_es6
|
|
4735
|
+
(0,tslib_es6.__extends)(AICCImpl, _super);
|
|
4553
4736
|
function AICCImpl(settings) {
|
|
4554
4737
|
var _this = _super.call(this, settings) || this;
|
|
4555
4738
|
_this.cmi = new CMI();
|
|
4556
|
-
_this.nav = new nav
|
|
4739
|
+
_this.nav = new nav.NAV();
|
|
4557
4740
|
return _this;
|
|
4558
4741
|
}
|
|
4559
4742
|
AICCImpl.prototype.getChildElement = function (CMIElement, value, foundFirstIndex) {
|
|
4560
4743
|
var newChild = _super.prototype.getChildElement.call(this, CMIElement, value, foundFirstIndex);
|
|
4561
4744
|
if (!newChild) {
|
|
4562
|
-
if ((0,utilities
|
|
4745
|
+
if ((0,utilities.stringMatches)(CMIElement, "cmi\\.evaluation\\.comments\\.\\d+")) {
|
|
4563
4746
|
newChild = new CMIEvaluationCommentsObject();
|
|
4564
4747
|
}
|
|
4565
|
-
else if ((0,utilities
|
|
4748
|
+
else if ((0,utilities.stringMatches)(CMIElement, "cmi\\.student_data\\.tries\\.\\d+")) {
|
|
4566
4749
|
newChild = new CMITriesObject();
|
|
4567
4750
|
}
|
|
4568
|
-
else if ((0,utilities
|
|
4751
|
+
else if ((0,utilities.stringMatches)(CMIElement, "cmi\\.student_data\\.attempt_records\\.\\d+")) {
|
|
4569
4752
|
newChild = new CMIAttemptRecordsObject();
|
|
4570
4753
|
}
|
|
4571
|
-
else if ((0,utilities
|
|
4754
|
+
else if ((0,utilities.stringMatches)(CMIElement, "cmi\\.paths\\.\\d+")) {
|
|
4572
4755
|
newChild = new CMIPathsObject();
|
|
4573
4756
|
}
|
|
4574
4757
|
}
|
|
@@ -4583,7 +4766,7 @@ var AICCImpl = (function (_super) {
|
|
|
4583
4766
|
|
|
4584
4767
|
|
|
4585
4768
|
var __webpack_export_target__ = this;
|
|
4586
|
-
for(var
|
|
4769
|
+
for(var __webpack_i__ in __webpack_exports__) __webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
4587
4770
|
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
|
|
4588
4771
|
/******/ })()
|
|
4589
4772
|
;
|