MOBILE-4470 lesson: Fix multichoice option not selected in review
Fixes a regression caused by 2449aca
main
parent
1d135e62d2
commit
f1ccc63795
|
@ -269,9 +269,14 @@ export class AddonModLessonHelperProvider {
|
|||
|
||||
if (option.checked || multiChoiceQuestion.multi) {
|
||||
// Add the control.
|
||||
const value = multiChoiceQuestion.multi ?
|
||||
{ value: option.checked, disabled: option.disabled } : option.checked;
|
||||
questionForm.addControl(option.name, this.formBuilder.control(value));
|
||||
if (multiChoiceQuestion.multi) {
|
||||
questionForm.addControl(
|
||||
option.name,
|
||||
this.formBuilder.control({ value: option.checked, disabled: option.disabled }),
|
||||
);
|
||||
} else {
|
||||
questionForm.addControl(option.name, this.formBuilder.control(option.value));
|
||||
}
|
||||
controlAdded = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue