Moodle for mobile

Render default layout in Course Format Plugin (Mobile Support)

 
Picture of Mark Johnson
Re: Render default layout in Course Format Plugin (Mobile Support)
Core developersParticularly helpful MoodlersPlugin developers

A bit of an update on this, while you can't just reuse the whole template, you can reuse the core-course-module component which can save you a lot of time.  This very basic example will give you a list of all the course modules from all sections, you can copy more from the core-course-format component's template in the app if you want.

    <ng-container *ngFor="let section of sections">
           <ng-container *ngFor="let module of section.modules">
                <core-course-module *ngIf="module.visibleoncoursepage !== 0" [module]="module" [courseId]="course.id" [downloadEnabled]="downloadEnabled" (completionChanged)="onCompletionChanged()"></core-course-module>
            </ng-container>
    </ng-container>
 
Average of ratings: -