From 3a74f4bcbb529018f43fca69da761484b1b678de Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 29 Aug 2018 16:30:24 +0200 Subject: [PATCH] MOBILE-2567 courses: Fix progress of courses and section download --- src/core/course/components/format/format.scss | 2 +- src/core/course/providers/module-prefetch-delegate.ts | 2 +- src/core/courses/pages/my-overview/my-overview.html | 2 +- src/core/courses/pages/my-overview/my-overview.scss | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/course/components/format/format.scss b/src/core/course/components/format/format.scss index 169018837..f10f68084 100644 --- a/src/core/course/components/format/format.scss +++ b/src/core/course/components/format/format.scss @@ -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 { diff --git a/src/core/course/providers/module-prefetch-delegate.ts b/src/core/course/providers/module-prefetch-delegate.ts index 722a2cc59..17a8d9f3c 100644 --- a/src/core/course/providers/module-prefetch-delegate.ts +++ b/src/core/course/providers/module-prefetch-delegate.ts @@ -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); diff --git a/src/core/courses/pages/my-overview/my-overview.html b/src/core/courses/pages/my-overview/my-overview.html index 0a9acea64..37fb4e54b 100644 --- a/src/core/courses/pages/my-overview/my-overview.html +++ b/src/core/courses/pages/my-overview/my-overview.html @@ -47,8 +47,8 @@ + {{prefetchCoursesData[courses.selected].badge}} - {{prefetchCoursesData[courses.selected].badge}} diff --git a/src/core/courses/pages/my-overview/my-overview.scss b/src/core/courses/pages/my-overview/my-overview.scss index 89812f8f7..d698dc081 100644 --- a/src/core/courses/pages/my-overview/my-overview.scss +++ b/src/core/courses/pages/my-overview/my-overview.scss @@ -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); + } }