<ion-header>
    <ion-toolbar>
        <ion-buttons slot="start">
            <ion-back-button [text]="'core.back' | translate"></ion-back-button>
        </ion-buttons>
        <ion-title>{{ title }}</ion-title>
    </ion-toolbar>
</ion-header>
<ion-content>
    <ion-refresher slot="fixed" [disabled]="!loaded" (ionRefresh)="refreshData($event.target)">
        <ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
    </ion-refresher>
    <core-loading [hideUntil]="loaded">
        <core-empty-box *ngIf="!sections || !sections.length" icon="qr-scanner"
            [message]="'core.course.nocontentavailable' | translate">
        </core-empty-box>

        <ion-list>
            <ng-container *ngFor="let section of sections" >
                <ng-container *ngFor="let module of section.modules">
                    <core-course-module *ngIf="module.visibleoncoursepage !== 0" [module]="module" [section]="section"
                        [courseId]="courseId" [downloadEnabled]="downloadEnabled">
                    </core-course-module>
                </ng-container>
            </ng-container>
        </ion-list>
    </core-loading>
</ion-content>
