commons-assessment 12.0.28 → 12.0.29
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/bundles/commons-assessment.umd.js +8 -11
- package/bundles/commons-assessment.umd.js.map +1 -1
- package/esm2015/lib/modules/assessment-taker/assessment-taker.component.js +4 -4
- package/esm2015/lib/modules/assessment-taker/components/question-type-objective/question-type-objective.component.js +6 -9
- package/fesm2015/commons-assessment.js +8 -11
- package/fesm2015/commons-assessment.js.map +1 -1
- package/package.json +1 -1
|
@@ -1439,17 +1439,14 @@
|
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
1441
|
QuestionTypeObjectiveComponent.prototype.writeValue = function (value) {
|
|
1442
|
-
var _a, _b
|
|
1442
|
+
var _a, _b;
|
|
1443
1443
|
if (value) {
|
|
1444
|
-
|
|
1445
|
-
var option = (
|
|
1446
|
-
|
|
1447
|
-
this.formControl.patchValue(selectedOption);
|
|
1448
|
-
this.optionDetection(option, true);
|
|
1449
|
-
}
|
|
1444
|
+
this.formControl.patchValue(value);
|
|
1445
|
+
var option = (_b = (_a = this.question) === null || _a === void 0 ? void 0 : _a.defaultOptionsList) === null || _b === void 0 ? void 0 : _b.find(function (o) { return o.options.id === (value === null || value === void 0 ? void 0 : value.id); });
|
|
1446
|
+
this.optionDetection(option, true);
|
|
1450
1447
|
}
|
|
1451
1448
|
else {
|
|
1452
|
-
this.formControl.patchValue(
|
|
1449
|
+
this.formControl.patchValue(null);
|
|
1453
1450
|
}
|
|
1454
1451
|
};
|
|
1455
1452
|
QuestionTypeObjectiveComponent.prototype.registerOnChange = function (fn) {
|
|
@@ -2407,7 +2404,7 @@
|
|
|
2407
2404
|
};
|
|
2408
2405
|
AssessmentTakerComponent.prototype.getPrefilledAnswer = function (qId, isChild, parentId, parentOptionId) {
|
|
2409
2406
|
if (isChild === void 0) { isChild = false; }
|
|
2410
|
-
var _a, _b, _c, _d, _e
|
|
2407
|
+
var _a, _b, _c, _d, _e;
|
|
2411
2408
|
if (!((_a = this.assesseeResponse) === null || _a === void 0 ? void 0 : _a.aiadefaultResponseList))
|
|
2412
2409
|
return null;
|
|
2413
2410
|
var answerObj = this.assesseeResponse.aiadefaultResponseList.find(function (a) {
|
|
@@ -2426,7 +2423,7 @@
|
|
|
2426
2423
|
return null;
|
|
2427
2424
|
var qType = (_b = question.questionType) === null || _b === void 0 ? void 0 : _b.code;
|
|
2428
2425
|
if (qType === 'QUESTION_TYPE.OBJECTIVE') {
|
|
2429
|
-
return
|
|
2426
|
+
return answerObj.optionId;
|
|
2430
2427
|
}
|
|
2431
2428
|
else if (qType === 'QUESTION_TYPE.MULTI_SELECT' || qType === 'QUESTION_TYPE.PREFERENCE') {
|
|
2432
2429
|
var sortedList = __spreadArray([], __read((answerObj.drobjectiveresponseList || [])));
|
|
@@ -2439,7 +2436,7 @@
|
|
|
2439
2436
|
return answerObj.attachmentResponseList || [];
|
|
2440
2437
|
}
|
|
2441
2438
|
else {
|
|
2442
|
-
return (
|
|
2439
|
+
return (_e = (_d = (_c = answerObj.drsubjectiveresponseList) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.responseText) !== null && _e !== void 0 ? _e : null;
|
|
2443
2440
|
}
|
|
2444
2441
|
};
|
|
2445
2442
|
AssessmentTakerComponent.prototype.getValidatorsForQuestion = function (question, isMandatory) {
|