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>
|
||||
|
||||
<!-- 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">
|
||||
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="pageContent"></core-format-text>
|
||||
</ion-item-divider>
|
||||
|
|
|
@ -547,10 +547,12 @@ export class CoreFormatTextDirective implements OnChanges {
|
|||
// Do the iframe responsive.
|
||||
if (iframe.parentElement.classList.contains('embed-responsive')) {
|
||||
iframe.addEventListener('load', () => {
|
||||
if (iframe.contentDocument) {
|
||||
const css = document.createElement('style');
|
||||
css.setAttribute('type', 'text/css');
|
||||
css.innerHTML = 'iframe {width: 100%;height: 100%;}';
|
||||
iframe.contentDocument.head.appendChild(css);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue