Merge pull request #1446 from dpalou/MOBILE-2540
MOBILE-2540 lesson: Fix more than one choice in single choice questionsmain
commit
c10b49b270
|
@ -37,7 +37,8 @@
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<!-- Question page. -->
|
<!-- Question page. -->
|
||||||
<form *ngIf="question" ion-list [formGroup]="questionForm">
|
<!-- We need to set ngIf loaded to make formGroup directive restart every time a page changes, see MOBILE-2540. -->
|
||||||
|
<form *ngIf="question && loaded" ion-list [formGroup]="questionForm">
|
||||||
<ion-item-divider text-wrap color="light">
|
<ion-item-divider text-wrap color="light">
|
||||||
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="pageContent"></core-format-text>
|
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="pageContent"></core-format-text>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
|
|
|
@ -547,10 +547,12 @@ export class CoreFormatTextDirective implements OnChanges {
|
||||||
// Do the iframe responsive.
|
// Do the iframe responsive.
|
||||||
if (iframe.parentElement.classList.contains('embed-responsive')) {
|
if (iframe.parentElement.classList.contains('embed-responsive')) {
|
||||||
iframe.addEventListener('load', () => {
|
iframe.addEventListener('load', () => {
|
||||||
const css = document.createElement('style');
|
if (iframe.contentDocument) {
|
||||||
css.setAttribute('type', 'text/css');
|
const css = document.createElement('style');
|
||||||
css.innerHTML = 'iframe {width: 100%;height: 100%;}';
|
css.setAttribute('type', 'text/css');
|
||||||
iframe.contentDocument.head.appendChild(css);
|
css.innerHTML = 'iframe {width: 100%;height: 100%;}';
|
||||||
|
iframe.contentDocument.head.appendChild(css);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue