From 66ef17eff949b97c161e853812130ed44c849cbd Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 15 Mar 2022 08:16:19 +0100 Subject: [PATCH] MOBILE-3833 course: Don't automatically change section in all sections --- .../features/course/components/course-format/course-format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/features/course/components/course-format/course-format.ts b/src/core/features/course/components/course-format/course-format.ts index ee933d3c3..c43830b42 100644 --- a/src/core/features/course/components/course-format/course-format.ts +++ b/src/core/features/course/components/course-format/course-format.ts @@ -153,7 +153,7 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { if (!this.lastModuleViewed || data.timeaccess > this.lastModuleViewed.timeaccess) { this.lastModuleViewed = data; - if (this.selectedSection) { + if (this.selectedSection && this.selectedSection.id !== this.allSectionsId) { // Change section to display the one with the last viewed module const lastViewedSection = this.getViewedModuleSection(this.sections, data); if (lastViewedSection && lastViewedSection.id !== this.selectedSection?.id) {