MOBILE-2567 courses: Fix progress of courses and section download

main
Dani Palou 2018-08-29 16:30:24 +02:00
parent c4f779b1d5
commit 3a74f4bcbb
4 changed files with 9 additions and 5 deletions

View File

@ -1,7 +1,7 @@
ion-badge.core-course-download-section-progress {
display: block;
@include float(start);
@include margin(12px, 12px, null, null);
@include margin(12px, 12px, null, 12px);
}
core-course-format {

View File

@ -1087,7 +1087,7 @@ export class CoreCourseModulePrefetchDelegate extends CoreDelegate {
}
return handler.prefetch(module, courseId).then(() => {
const index = moduleIds.indexOf(id);
const index = moduleIds.indexOf(module.id);
if (index > -1) {
// It's one of the modules we were expecting to download.
moduleIds.splice(index, 1);

View File

@ -47,8 +47,8 @@
<button *ngIf="prefetchCoursesData[courses.selected].icon && prefetchCoursesData[courses.selected].icon != 'spinner'" ion-button icon-only clear color="dark" (click)="prefetchCourses()">
<core-icon [name]="prefetchCoursesData[courses.selected].icon"></core-icon>
</button>
<ion-badge class="core-course-download-courses-progress" *ngIf="prefetchCoursesData[courses.selected].badge">{{prefetchCoursesData[courses.selected].badge}}</ion-badge>
<ion-spinner *ngIf="!prefetchCoursesData[courses.selected].icon || prefetchCoursesData[courses.selected].icon == 'spinner'"></ion-spinner>
<span float-end *ngIf="prefetchCoursesData[courses.selected].badge">{{prefetchCoursesData[courses.selected].badge}}</span>
</div>
</div>
<core-empty-box *ngIf="courses[courses.selected].length == 0 && courses.selected == 'inprogress'" image="assets/img/icons/courses.svg" [message]="'core.courses.nocoursesinprogress' | translate"></core-empty-box>

View File

@ -1,3 +1,7 @@
page-core-courses-my-courses {
page-core-courses-my-overview {
ion-badge.core-course-download-courses-progress {
display: block;
@include float(start);
@include margin(12px, 12px, null, 12px);
}
}