MOBILE-2661 course: Don't display hidden warnings if not needed
parent
3e12557451
commit
2135cdee7b
|
@ -82,7 +82,7 @@
|
|||
</ion-item>
|
||||
|
||||
<ng-container *ngFor="let module of section.modules">
|
||||
<core-course-module *ngIf="module.visibleoncoursepage !== 0" [module]="module" [courseId]="course.id" [downloadEnabled]="downloadEnabled" (completionChanged)="completionChanged.emit()"></core-course-module>
|
||||
<core-course-module *ngIf="module.visibleoncoursepage !== 0" [module]="module" [courseId]="course.id" [downloadEnabled]="downloadEnabled" [section]="section" (completionChanged)="completionChanged.emit()"></core-course-module>
|
||||
</ng-container>
|
||||
</section>
|
||||
</ng-template>
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="module.visible === 0 || module.availabilityinfo || module.handlerData.extraBadge || module.isStealth || (module.completionstatus && module.completionstatus.offline)">
|
||||
<div>
|
||||
<ion-badge item-end *ngIf="module.handlerData.extraBadge" [color]="module.handlerData.extraBadgeColor" text-wrap text-start>
|
||||
<core-format-text [text]="module.handlerData.extraBadge"></core-format-text>
|
||||
</ion-badge>
|
||||
<ion-badge item-end *ngIf="module.visible === 0" text-wrap>{{ 'core.course.hiddenfromstudents' | translate }}</ion-badge>
|
||||
<ion-badge item-end *ngIf="module.visible === 0 && (!section || section.visible)" text-wrap>{{ 'core.course.hiddenfromstudents' | translate }}</ion-badge>
|
||||
<ion-badge item-end *ngIf="module.visible !== 0 && module.isStealth" text-wrap>{{ 'core.course.hiddenoncoursepage' | translate }}</ion-badge>
|
||||
<ion-badge item-end *ngIf="module.availabilityinfo" text-wrap><core-format-text [text]="module.availabilityinfo"></core-format-text></ion-badge>
|
||||
<ion-badge item-end *ngIf="module.completionstatus && module.completionstatus.offline" color="warning" text-wrap>{{ 'core.course.manualcompletionnotsynced' | translate }}</ion-badge>
|
||||
|
|
|
@ -36,6 +36,7 @@ import { CoreConstants } from '../../../constants';
|
|||
export class CoreCourseModuleComponent implements OnInit, OnDestroy {
|
||||
@Input() module: any; // The module to render.
|
||||
@Input() courseId: number; // The course the module belongs to.
|
||||
@Input() section: any; // The section the module belongs to.
|
||||
@Input('downloadEnabled') set enabled(value: boolean) {
|
||||
this.downloadEnabled = value;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<core-format-text [text]="section.summary"></core-format-text>
|
||||
</ion-item>
|
||||
|
||||
<core-course-module *ngFor="let module of section.modules" [module]="module" [courseId]="siteHomeId" [downloadEnabled]="true"></core-course-module>
|
||||
<core-course-module *ngFor="let module of section.modules" [module]="module" [courseId]="siteHomeId" [downloadEnabled]="true" [section]="section"></core-course-module>
|
||||
</ng-container>
|
||||
|
||||
<!-- Site home items: news, categories, courses, etc. -->
|
||||
|
@ -29,7 +29,7 @@
|
|||
<core-format-text [text]="block.summary"></core-format-text>
|
||||
</ion-item>
|
||||
|
||||
<core-course-module *ngFor="let module of block.modules" [module]="module" [courseId]="siteHomeId" [downloadEnabled]="true"></core-course-module>
|
||||
<core-course-module *ngFor="let module of block.modules" [module]="module" [courseId]="siteHomeId" [downloadEnabled]="true" [section]="block"></core-course-module>
|
||||
</ng-container>
|
||||
</ion-list>
|
||||
|
||||
|
|
Loading…
Reference in New Issue