Merge pull request #1908 from dpalou/MOBILE-2966

MOBILE-2966 quiz: Fix multichoice question broken due to clear option
main
Juan Leyva 2019-05-14 17:30:10 +02:00 committed by GitHub
commit e63b1ff8ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -135,8 +135,8 @@
</ion-item>
<ion-item>
<a ion-button block icon-end [href]="moduleUrl" core-link>
<ion-icon name="open"></ion-icon>
{{ 'core.openinbrowser' | translate }}
<ion-icon name="open"></ion-icon>
</a>
</ion-item>
</ion-card>

View File

@ -461,6 +461,11 @@ export class CoreQuestionBaseComponent {
},
parent = element.parentElement;
if (option.value == '-1') {
// It's the clear choice option, ignore it.
continue;
}
this.question.optionsName = option.name;
this.question.disabled = this.question.disabled && element.disabled;