From ecc1e6bad24bd31d378dcc86df4b0bad1be52f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 25 Sep 2018 09:32:07 +0200 Subject: [PATCH] MOBILE-2627 course: Fix loading all sections when few modules --- src/core/course/components/format/format.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/course/components/format/format.ts b/src/core/course/components/format/format.ts index 37b239a6e..87f516cd1 100644 --- a/src/core/course/components/format/format.ts +++ b/src/core/course/components/format/format.ts @@ -387,12 +387,13 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { }, 0); if (modulesLoaded >= CoreCourseFormatComponent.LOAD_MORE_ACTIVITIES) { - this.showSectionId = i; break; } } } + this.showSectionId = i; + this.canLoadMore = i < this.sections.length; if (this.canLoadMore) {