From f9fb7d546840ea67e34fc91644302282d092b771 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Mon, 29 Jul 2019 16:10:54 +0200 Subject: [PATCH] MOBILE-3044 lesson: Fix PTR in Reports tab --- .../lesson/components/index/addon-mod-lesson-index.html | 2 +- src/addon/mod/lesson/components/index/index.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/addon/mod/lesson/components/index/addon-mod-lesson-index.html b/src/addon/mod/lesson/components/index/addon-mod-lesson-index.html index 55cc163c8..655de6301 100644 --- a/src/addon/mod/lesson/components/index/addon-mod-lesson-index.html +++ b/src/addon/mod/lesson/components/index/addon-mod-lesson-index.html @@ -16,7 +16,7 @@ - + diff --git a/src/addon/mod/lesson/components/index/index.ts b/src/addon/mod/lesson/components/index/index.ts index 8a0acdba1..9c3458b72 100644 --- a/src/addon/mod/lesson/components/index/index.ts +++ b/src/addon/mod/lesson/components/index/index.ts @@ -384,10 +384,19 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo }); } + /** + * First tab selected. + */ + indexSelected(): void { + this.selectedTab = 0; + } + /** * Reports tab selected. */ reportsSelected(): void { + this.selectedTab = 1; + if (!this.groupInfo) { this.fetchReportData().catch((error) => { this.domUtils.showErrorModalDefault(error, 'Error getting report.');