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