Merge pull request #3174 from dpalou/MOBILE-3833

MOBILE-3833 course: Don't automatically change section in all sections
main
Pau Ferrer Ocaña 2022-03-15 11:29:33 +01:00 committed by GitHub
commit 254cc73d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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) {