Merge pull request #3008 from crazyserver/MOBILE-3806-2
MOBILE-3806 course: Fix hidden 0% progressmain
commit
d574776827
|
@ -30,7 +30,7 @@
|
|||
</ion-item>
|
||||
|
||||
<ion-card [attr.course-color]="course.color ? null : course.colorNumber" *ngIf="layout == 'card' || layout == 'summarycard'"
|
||||
class="core-course-list-card" [class.item-dimmed]="course.hidden" [attr.aria-label]="course.displayname || course.fullname">
|
||||
class="core-course-list-card" [class.item-dimmed]="course.hidden">
|
||||
<div (click)="openCourse()" class="core-course-thumb" [class.core-course-color-img]="course.courseImage"
|
||||
[style.background-color]="course.color">
|
||||
<img *ngIf="course.courseImage" [src]="course.courseImage" core-external-content alt="" />
|
||||
|
@ -51,7 +51,6 @@
|
|||
<div *ngIf="layout == 'card' && progress >= 0 && completionUserTracked !== false" lines="none" class="core-course-progress">
|
||||
<core-progress-bar [progress]="progress" a11yText="core.courses.aria:courseprogress"></core-progress-bar>
|
||||
</div>
|
||||
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-card>
|
||||
|
|
|
@ -157,7 +157,7 @@ export class CoreCoursesCourseListItemComponent implements OnInit, OnDestroy, On
|
|||
* Helper function to update course fields.
|
||||
*/
|
||||
protected updateCourseFields(): void {
|
||||
this.progress = 'progress' in this.course ? this.course.progress || -1 : -1;
|
||||
this.progress = 'progress' in this.course && typeof this.course.progress == 'number' ? this.course.progress : -1;
|
||||
this.completionUserTracked = 'completionusertracked' in this.course && this.course.completionusertracked;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue